/* Modern color scheme */
:root {
    --primary: #2d3436;
    --secondary: #636e72;
    --accent: #0984e3;
    --background: #f5f6fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --gradient-start: #74b9ff;
    --gradient-end: #0984e3;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
}

/* Dark mode — same blue accent, dark surfaces */
[data-theme="dark"] {
    --primary: #f5f7fa;      /* was #e8ecf1 — near-white for headings */
    --secondary: #cdd6e0;    /* was #9aa4b2 — much brighter body text */
    --background: #0e1116;
    --card-bg: #171c24;
    --text: #f5f7fa;         /* was #e8ecf1 — bright near-white */
}

[data-theme="dark"] .header { background: rgba(14, 17, 22, 0.95); }
[data-theme="dark"] .btn-resume,
[data-theme="dark"] .theme-toggle { border-color: rgba(232, 236, 241, 0.2); }
[data-theme="dark"] .achievements,
[data-theme="dark"] .highlight-box { background: rgba(9, 132, 227, 0.12); }
/* Dark mode — same blue accent, dark surfaces */
[data-theme="dark"] {
    --primary: #e8ecf1;
    --secondary: #9aa4b2;
    --background: #0e1116;
    --card-bg: #171c24;
    --text: #e8ecf1;
}
[data-theme="dark"] .header { background: rgba(14, 17, 22, 0.95); }
[data-theme="dark"] .btn-resume,
[data-theme="dark"] .theme-toggle { border-color: rgba(245, 247, 250, 0.25); }
[data-theme="dark"] .achievements,
[data-theme="dark"] .highlight-box { background: rgba(9, 132, 227, 0.12); }
[data-theme="dark"] .btn-outline { color: var(--text); border-color: rgba(245, 247, 250, 0.2); }
[data-theme="dark"] .cert-key { color: #7ab8f5; }
[data-theme="dark"] .cert-value { color: var(--text); }
[data-theme="dark"] .cert-card .muted { color: var(--secondary); }

/* Dark mode: replace black shadows with a soft blue glow */
[data-theme="dark"] .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(9, 132, 227, 0.12);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 24px rgba(9, 132, 227, 0.25),
                0 2px 8px rgba(116, 185, 255, 0.15);
    border-color: rgba(9, 132, 227, 0.35);
}

[data-theme="dark"] .competencies-grid .card:hover {
    box-shadow: 0 12px 30px rgba(9, 132, 227, 0.28);
}

[data-theme="dark"] .profile-card:hover {
    box-shadow: 0 6px 20px rgba(9, 132, 227, 0.25);
}

[data-theme="dark"] .stat-card {
    box-shadow: 0 6px 14px rgba(9, 132, 227, 0.08);
}

[data-theme="dark"] .btn-outline { color: var(--text); border-color: rgba(232, 236, 241, 0.15); }
[data-theme="dark"] .stat-card { border-color: rgba(232, 236, 241, 0.08); }
[data-theme="dark"] .cert-key { color: #7ab8f5; }
[data-theme="dark"] .cert-value { color: var(--text); }
[data-theme="dark"] .cert-card .muted { color: var(--secondary); }

/* Dark mode: brighter tech-stack tags */
[data-theme="dark"] .tech-tag {
    color: #74b9ff;
    background: rgba(9, 132, 227, 0.18);
    border: 1px solid rgba(116, 185, 255, 0.25);
    font-weight: 600;
}

[data-theme="dark"] .hl { color: #74b9ff; }

/* Hero Section */
.hero-section {
    padding: 6rem 2rem;
    max-width: 1200px;      /* same container width as .section */
    margin: 0 auto 2rem;    /* centers the container itself, like .section */
    text-align: left;
    background: var(--background);
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 760px;
    margin: 0;              /* was `0 auto` — this was centering it; now flush left */
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(9,132,227,0.08);
    border: 1px solid rgba(9,132,227,0.18);
    color: var(--accent);
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 3px;
    margin-bottom: 28px;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 9.5vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: inherit;
    animation: fadeInUp 1s ease;
    white-space: nowrap;
}
.hero-title .line-2 { color: var(--accent); }

.hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--secondary);
    max-width: 680px;
    margin: 0 0 26px;
}
.hero-description strong { color: var(--text); font-weight: 700; }

/* Key skill highlights — accent blue */
.hl { color: var(--accent); font-weight: 700; }

.hero-cta { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; margin-top: 28px; }
.btn-primary {
    padding: 12px 28px;
    background: var(--accent);
    color: white;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.18s, box-shadow 0.18s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 20px rgba(9,132,227,0.25); }
.btn-outline {
    padding: 12px 28px;
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(45,52,54,0.15);
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Floating stats on the right (desktop) */
.hero-stats {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 1;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid rgba(45,52,54,0.06);
    padding: 14px 18px;
    min-width: 140px;
    box-shadow: 0 6px 14px rgba(3,10,18,0.04);
}
.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.55rem;
    color: var(--secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* RESPONSIVE FIX: hero stats flow below description instead of overlapping */
@media (max-width: 1100px) {
    .hero-stats {
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 12px;
        margin-top: 2.5rem;
    }
    .stat-card { flex: 1 1 150px; min-width: 140px; max-width: 220px; }
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    overflow-x: hidden;
}

/* Custom cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

/* Header styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo mark (home) */
.logo-mark {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.logo-mark:hover { opacity: 0.7; }
.logo-dot { color: var(--accent); }

/* Nav actions: Résumé button + theme toggle */
.nav-actions { display: flex; align-items: center; gap: 0.9rem; }
.btn-resume {
    padding: 0.55rem 1.4rem;
    border: 1px solid rgba(45, 52, 54, 0.25);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}
.btn-resume:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(45, 52, 54, 0.15);
    background: transparent;
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.25s ease;
}
.theme-toggle:hover { background: rgba(9, 132, 227, 0.1); color: var(--accent); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Role descriptions */
.role-title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.role-description {
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.role-date {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Achievements section */
.achievements {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(9, 132, 227, 0.05);
    border-radius: 8px;
}

.achievements h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.achievements ul {
    list-style-type: none;
    padding-left: 0;
}

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Project descriptions */
.project-description {
    color: var(--secondary);
    margin: 1rem 0;
    line-height: 1.6;
}

/* Education details */
.education-details {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.education-description {
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.highlight-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(9, 132, 227, 0.05);
    border-radius: 8px;
}

.highlight-box h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.project-title {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Interests section */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.interest-item {
    text-align: center;
    padding: 1rem;
}

.interest-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.interest-description {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.lifestyle-text {
    color: var(--secondary);
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Section styles */
.section {
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.section:hover h2::after {
    transform: scaleX(1);
}

/* Card styles */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-header i {
    font-size: 1.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
}

.card-header h3 {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Date tag styles */
.date-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    background: rgba(9, 132, 227, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    margin-top: 1rem;
}

/* Project styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--gradient-end);
}

/* Tech stack tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background: rgba(9, 132, 227, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
}

/* Contact styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.contact-item:hover {
    background: rgba(9, 132, 227, 0.1);
    transform: translateX(5px);
}

/* Footer styles */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0;
    margin-top: 6rem;
}

[data-theme="dark"] .footer {
    background: var(--card-bg);
    color: var(--text);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .footer-links a { color: var(--text); }

.footer-links a:hover {
    opacity: 1;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
    background: var(--accent);
    color: #fff;
    border: none;
    outline: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 1.5rem;
    transition: background 0.3s;
}

#scrollToTopBtn:hover {
    background: var(--gradient-end);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink-caret {
    0%, 100% { border-color: #0074D9; }
    50% { border-color: transparent; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-actions { gap: 0.5rem; }
    .btn-resume { padding: 0.45rem 1rem; font-size: 0.8rem; }
    .theme-toggle { width: 36px; height: 36px; }

    .hero-section { padding: 4rem 1.5rem; }
    .hero-title { font-size: 2.8rem; }

    .section {
        margin: 4rem auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-description {
        font-size: 1rem;
    }

    .interests-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .achievements {
        padding: 0.75rem;
    }

    .highlight-box {
        padding: 0.75rem;
    }
}

/* Print styles */
@media print {
    .header {
        position: static;
    }

    .hero-section {
        height: auto;
        padding: 4rem 0;
    }

    .card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Education Section - Match Previous Experience */
.education-grid {
    display: block;
}

.education-grid .card {
    width: 100%;
    margin-bottom: 20px;
}

.previous-experience .card {
    margin-bottom: 2rem;
}

#experience ~ .section .card {
    margin-bottom: 2rem;
}

.company-date {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 500;
    margin-left: 0.5rem;
    font-style: italic;
}

/* Scroll adjustments for all sections */
#experience,
#skills,
#projects,
#education,
#contact {
    scroll-margin-top: 90px;
}

/* Core Competencies Section */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.competencies-grid .card {
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.competencies-grid .card-header {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid rgba(9, 132, 227, 0.15);
    padding-bottom: 20px;
}

.competencies-grid .card-header i {
    font-size: 1.8rem;
    color: var(--accent);
}

.competencies-grid .card-header h3 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--primary);
    font-weight: 600;
}

.competencies-grid ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    flex-grow: 1;
}

.competencies-grid li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    line-height: 1.6;
    padding: 10px 0;
    font-size: 1rem;
}

.competencies-grid li i {
    margin-right: 15px;
    color: var(--accent);
    min-width: 25px;
    text-align: center;
    font-size: 1rem;
    margin-top: 3px;
}

.competencies-grid .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

/* Coding Profiles Section */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.profile-card {
    text-align: center;
    padding: 2rem;
    transition: transform 0.3s ease;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.profile-card .card-header i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.profile-description {
    margin: 1rem 0;
    color: var(--secondary);
    font-size: 0.95rem;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.profile-button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.profile-button i {
    font-size: 1.1em;
}

/* Certification key/value styles */
.cert-row{margin:6px 0;font-size:0.95rem}
.cert-key{font-weight:700;color:#0b3b73;margin-right:8px}
.cert-value{color:#222}
.cert-value a{color:inherit;text-decoration:underline}
.cert-card .muted{opacity:0.85;color:#556}

/* Temporarily hide Coding Profiles section. Remove this rule to re-enable. */
#profiles{display:none !important}


/* Achievements section */
.achievement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.achievement-list li {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid rgba(9, 132, 227, 0.1);
    flex-wrap: wrap;
}
.achievement-list li:last-child { border-bottom: none; }
.achievement-name {
    font-weight: 600;
    color: var(--text);
    flex: 1 1 260px;
}
.achievement-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f1c40f;          /* gold */
    font-size: 1rem;
    font-weight: 600;
}
.achievement-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}
.achievement-link:hover { color: var(--gradient-end); }
#achievements { scroll-margin-top: 90px; }

