/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:         #070b12;
    --bg-alt:     #0c1220;
    --surface:    #101827;
    --surface-2:  #162135;
    --border:     #1a2942;
    --border-2:   #203453;
    --primary:    #3b82f6;
    --primary-d:  #2563eb;
    --primary-l:  #60a5fa;
    --cyan:       #06b6d4;
    --accent:     #10b981;
    --accent-d:   #059669;
    --text:       #e2e8f0;
    --muted:      #94a3b8;
    --muted-2:    #64748b;
    --white:      #f8fafc;
    --nav-h:      64px;
    --radius:     12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
}

html {
    scroll-behavior: smooth;
    /* Prevent iOS rubber-band on horizontal axis */
    overscroll-behavior-x: none;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    /* Enable smooth momentum scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    /* Safe-area for notched phones */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* ── Typography ───────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.15; }
h1, h2 { font-family: 'Syne', 'Inter', sans-serif; }
strong { color: var(--white); font-weight: 600; }

.company-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .2s, color .2s;
}
.company-link:hover {
    color: var(--primary-l);
    border-bottom-color: var(--primary);
}
a { text-decoration: none; color: inherit; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .22s ease;
    border: 1.5px solid transparent;
    letter-spacing: .01em;
}
.btn svg { flex-shrink: 0; }
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(59,130,246,.25);
}
.btn-primary:hover {
    background: var(--primary-d);
    border-color: var(--primary-d);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59,130,246,.35);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-2);
}
.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--white);
    background: rgba(59,130,246,.06);
    transform: translateY(-2px);
}
.btn-linkedin {
    background: #0077b5;
    color: var(--white);
    border-color: #0077b5;
    box-shadow: 0 4px 20px rgba(0,119,181,.2);
}
.btn-linkedin:hover {
    background: #005f8f;
    border-color: #005f8f;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,119,181,.35);
}

/* ── Navigation ───────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 16px; left: 16px; right: 16px;
    max-width: 1232px;
    margin: 0 auto;
    z-index: 100;
    border-radius: var(--radius-lg);
    transition: background .3s, box-shadow .3s, border-color .3s;
    border: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(7, 11, 18, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    border-color: var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-family: 'Syne', sans-serif;
    font-size: .95rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    flex-shrink: 0;
    transition: opacity .2s;
}
.nav-logo:hover { opacity: .85; }
.nav-links { display: flex; list-style: none; gap: 2px; }
.nav-links a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .2s, background .2s;
    cursor: pointer;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--white);
    background: rgba(255,255,255,.06);
}
.nav-links .nav-cta {
    background: rgba(59,130,246,.15);
    color: var(--primary-l) !important;
    border: 1px solid rgba(59,130,246,.3);
    padding: 8px 16px;
}
.nav-links .nav-cta:hover {
    background: var(--primary);
    color: var(--white) !important;
    border-color: var(--primary);
}
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all .3s;
    transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav { top: 8px; left: 8px; right: 8px; }
    .nav-burger { display: flex; }
    /* burger tap target */
    .nav-burger { min-width: 44px; min-height: 44px; justify-content: center; }
    .nav-links {
        display: none;
        position: absolute;
        top: calc(var(--nav-h) + 4px); left: 0; right: 0;
        flex-direction: column;
        background: rgba(7,11,18,.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 8px 12px 16px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        gap: 2px;
    }
    .nav-links.open { display: flex; }
    /* large tap targets on mobile */
    .nav-links a { font-size: 1rem; padding: 14px 16px; min-height: 48px; display: flex; align-items: center; }
    .nav-links .nav-cta { justify-content: center; margin-top: 4px; }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height – accounts for mobile browser chrome */
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: calc(var(--nav-h) + 32px);
}
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    touch-action: none;
}
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
    z-index: 1;
}
.hero::before {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 60%, rgba(59,130,246,.12) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 25%, rgba(6,182,212,.07) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(10,15,20,.9) 0%, transparent 50%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}
.hero-text { max-width: 680px; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border: 1px solid var(--border-2);
    border-radius: 100px;
    font-size: .75rem;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
    background: rgba(255,255,255,.02);
}
.hero-tag-dot {
    width: 7px; height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: blink 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.hero-content h1 {
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: -3px;
    color: var(--white);
    line-height: 1.0;
}
.accent {
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
    margin-bottom: 36px;
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--muted-2);
}
.hero-meta-item svg { color: var(--primary); opacity: .7; }
.hero-meta-sep { color: var(--border-2); }

.hero-scroll {
    position: absolute;
    bottom: 36px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    z-index: 2;
}
.hero-scroll span {
    font-size: .68rem;
    color: var(--muted-2);
    letter-spacing: 3px;
    text-transform: uppercase;
}
.scroll-line {
    width: 1px; height: 44px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: .3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.1); }
}

@media (max-width: 768px) {
    .hero { padding-top: calc(var(--nav-h) + 56px); align-items: flex-start; padding-bottom: 80px; }
    .hero-content { padding: 0 20px; }
    .hero-content h1 { letter-spacing: -1.5px; }
    .hero-content p { font-size: 1rem; }
    .hero-meta { gap: 6px; flex-direction: column; align-items: flex-start; }
    .hero-meta-sep { display: none; }
    .hero-scroll { display: none; }
}

/* ── Sections ─────────────────────────────────────────────────── */
.section { padding: 108px 0; }
.section-alt { background: var(--bg-alt); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.2);
    padding: 4px 12px;
    border-radius: 100px;
}
.section-header h2 {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
    margin-bottom: 14px;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── About ────────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; gap: 48px; } }
.about-text p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}
.about-text p:last-of-type { margin-bottom: 28px; }
.about-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--primary-l);
    transition: gap .2s, color .2s;
    cursor: pointer;
}
.about-cta:hover { gap: 12px; color: var(--white); }
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 20px;
    text-align: center;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: default;
    position: relative;
    overflow: hidden;
}
.stat::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59,130,246,.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s;
    border-radius: inherit;
}
.stat:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(59,130,246,.15); }
.stat:hover::before { opacity: 1; }
.stat:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stat-number { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--primary-l); margin-bottom: 4px; }
.stat-label { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.stat-sub { font-size: .73rem; color: var(--muted-2); }

/* ── Services ─────────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}
.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 30px 30px;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: default;
    position: relative;
    overflow: hidden;
}
.service-card-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0;
    transition: opacity .3s;
}
.service-card:hover { border-color: var(--border-2); transform: translateY(-5px); box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 50px rgba(59,130,246,.1); }
.service-card:hover .service-card-top { opacity: 1; }
.service-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.service-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, rgba(59,130,246,.15) 0%, rgba(6,182,212,.1) 100%);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    color: var(--primary-l);
    transition: background .3s, box-shadow .3s;
}
.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(59,130,246,.25) 0%, rgba(6,182,212,.15) 100%);
    box-shadow: 0 4px 20px rgba(59,130,246,.2);
}
.service-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: .9rem; line-height: 1.75; margin-bottom: 20px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service-tags span {
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted-2);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    padding-left: 36px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 8%, var(--border) 92%, transparent);
}
.timeline-item {
    position: relative;
    margin-bottom: 44px;
    transition: transform .2s;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -41px; top: 5px;
    width: 10px; height: 10px;
    background: var(--border-2);
    border: 2px solid var(--bg-alt);
    border-radius: 50%;
    transition: background .3s, box-shadow .3s;
}
.timeline-dot--current {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(16,185,129,.15), 0 0 12px rgba(16,185,129,.3);
}
.timeline-item:hover .timeline-dot { background: var(--primary); box-shadow: 0 0 0 4px rgba(59,130,246,.15); }
.timeline-date {
    font-size: .73rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.timeline-body h4 { font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 5px; }
.timeline-role {
    display: inline-block;
    font-size: .82rem;
    color: var(--primary-l);
    margin-bottom: 10px;
    font-weight: 500;
}
.timeline-body p { color: var(--muted); font-size: .9rem; line-height: 1.7; }

/* ── Education ────────────────────────────────────────────────── */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 780px;
    margin: 0 auto;
}
.edu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex; gap: 18px; align-items: flex-start;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: default;
}
.edu-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.edu-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.edu-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, rgba(59,130,246,.15) 0%, rgba(6,182,212,.1) 100%);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 10px;
    display: grid; place-items: center;
    color: var(--primary-l);
    flex-shrink: 0;
}
.edu-year { font-size: .75rem; color: var(--muted-2); margin-bottom: 5px; font-weight: 500; }
.edu-body h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.edu-body p { color: var(--primary-l); font-size: .85rem; margin-bottom: 6px; }
.edu-body small { color: var(--muted); font-size: .8rem; line-height: 1.6; display: block; }
.edu-thesis { color: var(--muted-2) !important; margin-top: 4px; }

/* ── Skills ───────────────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    cursor: default;
}
.skill-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.skill-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.skill-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.skill-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, rgba(59,130,246,.12) 0%, rgba(6,182,212,.08) 100%);
    border: 1px solid rgba(59,130,246,.15);
    border-radius: 10px;
    display: grid; place-items: center;
    color: var(--primary-l);
    flex-shrink: 0;
}
.skill-card h4 { font-size: .95rem; font-weight: 700; color: var(--white); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
    display: inline-block;
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 8px;
    transition: color .2s, border-color .2s, background .2s;
}
.skill-tag:hover { color: var(--text); border-color: var(--border-2); background: rgba(255,255,255,.07); }
.skill-tag--highlight {
    color: var(--primary-l);
    background: rgba(59,130,246,.08);
    border-color: rgba(59,130,246,.2);
}
.skill-tag--highlight:hover {
    background: rgba(59,130,246,.14);
    border-color: rgba(59,130,246,.4);
    color: var(--white);
}
.skill-tag--green {
    color: var(--accent);
    background: rgba(16,185,129,.08);
    border-color: rgba(16,185,129,.2);
}
.skill-tag--green:hover {
    background: rgba(16,185,129,.14);
    border-color: rgba(16,185,129,.4);
    color: var(--white);
}

/* ── Languages ────────────────────────────────────────────────── */
.languages-section { max-width: 600px; margin: 0 auto; }
.languages-title { font-size: .95rem; font-weight: 700; color: var(--white); margin-bottom: 20px; text-align: center; }
.languages-bar { display: flex; flex-direction: column; gap: 14px; }
.lang-item {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    gap: 14px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    transition: border-color .2s;
    cursor: default;
}
.lang-item:hover { border-color: var(--border-2); }
.lang-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lang-name { color: var(--white); font-weight: 600; font-size: .88rem; }
.lang-bar {
    height: 5px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.lang-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: 10px;
    transition: width 1s cubic-bezier(.16,1,.3,1);
}
.lang-level { color: var(--primary-l); font-size: .78rem; font-weight: 600; text-align: right; }

/* ── Footer / Contact ─────────────────────────────────────────── */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 100px 0 40px;
    position: relative;
    overflow: hidden;
}
.footer-glow {
    position: absolute;
    top: -120px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(59,130,246,.08) 0%, transparent 65%);
    pointer-events: none;
}
.footer-content {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
}
.footer-content .section-tag { margin-bottom: 20px; }
.footer-content h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -1.5px;
}
.footer-content p {
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto 36px;
    font-size: 1.02rem;
    line-height: 1.75;
}
.contact-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 28px;
    color: var(--muted-2);
    font-size: .8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-tagline { color: var(--border-2); font-style: italic; font-size: .78rem; }

/* ── Fade-in animations ───────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: none; }
.section-header.fade-in {
    clip-path: inset(0 0 30% 0);
    transition: opacity .9s ease, transform .9s cubic-bezier(0.16,1,.3,1), clip-path .9s cubic-bezier(0.16,1,.3,1);
}
.section-header.fade-in.visible { clip-path: inset(0 0 0% 0); }

/* ── Scroll progress bar ──────────────────────────────────────── */
#progress-bar {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--cyan), var(--accent));
    z-index: 300;
    transition: width .1s linear;
    pointer-events: none;
}

/* ── Custom cursor ────────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
    *, *::before, *::after { cursor: none !important; }
}
.cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--primary-l);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity .3s;
    will-change: left, top;
}
.cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(59,130,246,.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width .3s ease, height .3s ease, border-color .3s, background .3s, opacity .3s;
    will-change: left, top;
}
body.cur-hover .cursor-ring {
    width: 54px; height: 54px;
    border-color: var(--primary);
    background: rgba(59,130,246,.05);
}
body.cur-hover .cursor-dot { opacity: 0; }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── Marquee strip ────────────────────────────────────────────── */
.marquee-strip {
    overflow: hidden;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    user-select: none;
}
.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marqueeScroll 42s linear infinite;
}
.marquee-strip:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    display: inline-block;
    padding: 0 22px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.marquee-track .mdot { color: var(--primary); opacity: .5; padding: 0 4px; letter-spacing: 0; }
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Responsive helpers ───────────────────────────────────────── */
@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .section-header { margin-bottom: 44px; }
    .services-grid, .skills-grid { grid-template-columns: 1fr; }
    .edu-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    .about-grid { gap: 36px; }
    .timeline { padding-left: 28px; }
    .timeline-dot { left: -33px; }
    .contact-buttons { flex-direction: column; align-items: stretch; }
    .contact-buttons .btn { justify-content: center; min-height: 52px; }
    .stat { padding: 20px 14px; }
    .stat-number { font-size: 1.6rem; }
    .lang-item { grid-template-columns: 80px 1fr 50px; }
    .footer { padding: 72px 0 32px; }
    /* ensure footer has safe-area bottom padding on mobile */
    .footer-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ── Small phones (375px) ─────────────────────────────────────── */
@media (max-width: 480px) {
    :root { --nav-h: 58px; }
    .container { padding: 0 16px; }
    .about-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; min-height: 50px; font-size: 1rem; }
    .hero-tag { font-size: .68rem; }
    .section-header h2 { letter-spacing: -.5px; }
    .service-card { padding: 28px 22px 24px; }
    .skill-card { padding: 22px 18px; }
    .edu-card { flex-direction: column; gap: 14px; }
    .edu-icon { width: 40px; height: 40px; }
    .timeline { padding-left: 24px; }
    .timeline-dot { left: -29px; }
    /* Minimum readable text on small screens */
    body { font-size: 16px; }
    .service-card p, .timeline-body p { font-size: .93rem; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .fade-in { transition: none; opacity: 1; transform: none; clip-path: none !important; }
    .scroll-line { animation: none; opacity: .5; }
    .hero-tag-dot { animation: none; }
    .marquee-track { animation: none; }
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
