:root {
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --ink: #1C1C1E;
    --ink-soft: #5C5C66;
    --ink-muted: #8E8E93;
    --line: rgba(28, 28, 30, 0.08);
    --shadow: 0 1px 2px rgba(28,28,30,.04), 0 8px 32px rgba(28,28,30,.06);
    --shadow-lg: 0 2px 4px rgba(28,28,30,.04), 0 20px 60px rgba(28,28,30,.08);
    --radius: 16px;
    --radius-lg: 24px;
    --nav-h: 72px;
    --nav-bg: rgba(250, 250, 248, 0.88);
    --hero-glow-1: rgba(181, 234, 215, 0.35);
    --hero-glow-2: rgba(199, 206, 234, 0.30);
    --hero-glow-3: rgba(255, 218, 193, 0.25);
    --hero-video-scrim: linear-gradient(125deg, rgba(250, 250, 248, 0.92) 0%, rgba(250, 250, 248, 0.78) 42%, rgba(250, 250, 248, 0.86) 100%);
    --hero-glass: rgba(255, 255, 255, 0.62);
    --hero-glass-border: rgba(255, 255, 255, 0.55);
    --hero-text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    --btn-primary-bg: var(--ink);
    --btn-primary-fg: #ffffff;
    --macaron-mint: #B5EAD7;
    --macaron-lavender: #C7CEEA;
    --macaron-peach: #FFDAC1;
    --macaron-sky: #B5D8EB;
    --macaron-blush: #FFB7B2;
    --macaron-lemon: #FFF5BA;
    --macaron-sage: #C9E4C5;
    --macaron-lilac: #E2CFEA;
    --macaron-mint-dark: #7BC4A8;
    --macaron-lavender-dark: #9BA3D4;
    --macaron-peach-dark: #E8B89A;
    --macaron-sky-dark: #7EB8D4;
    --macaron-blush-dark: #E8958F;
    --macaron-lemon-dark: #E8D87A;
    --macaron-sage-dark: #9BC497;
    --macaron-lilac-dark: #C4A8D0;
}

[data-theme="dark"] {
    --bg: #111113;
    --surface: #1C1C1F;
    --ink: #F4F4F5;
    --ink-soft: #A1A1AA;
    --ink-muted: #71717A;
    --line: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 32px rgba(0,0,0,.28);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.24), 0 20px 60px rgba(0,0,0,.36);
    --nav-bg: rgba(17, 17, 19, 0.9);
    --hero-glow-1: rgba(123, 196, 168, 0.14);
    --hero-glow-2: rgba(155, 163, 212, 0.12);
    --hero-glow-3: rgba(232, 184, 154, 0.10);
    --hero-video-scrim: linear-gradient(125deg, rgba(17, 17, 19, 0.9) 0%, rgba(17, 17, 19, 0.72) 45%, rgba(17, 17, 19, 0.88) 100%);
    --hero-glass: rgba(28, 28, 31, 0.72);
    --hero-glass-border: rgba(255, 255, 255, 0.1);
    --hero-text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    --btn-primary-bg: #F4F4F5;
    --btn-primary-fg: #111113;
    --macaron-mint: #8FD4BC;
    --macaron-lavender: #A8B2E0;
    --macaron-peach: #E8C4A8;
    --macaron-sky: #8FC0DC;
    --macaron-blush: #E8A8A2;
    --macaron-lemon: #E8DCA0;
    --macaron-sage: #A8D0A4;
    --macaron-lilac: #C8B0D8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 10000;
    padding: 10px 18px;
    background: var(--ink);
    color: var(--bg);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    left: 16px;
    outline: 2px solid var(--macaron-mint);
    outline-offset: 2px;
}

html[data-theme="dark"] { background: #0a0a0c; }

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s ease, color .3s ease;
}

[data-theme="dark"] body { background: transparent; }

/* Aurora borealis — dark mode, behind all sections except hero video */
.aurora-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}
[data-theme="dark"] .aurora-container { opacity: 1; }
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: auroraFloat 20s infinite ease-in-out;
    mix-blend-mode: screen;
}
.aurora-1 {
    width: 620px; height: 620px;
    background: linear-gradient(135deg, #8FD4BC, #A8B2E0);
    top: 8%; left: -12%;
    animation-duration: 26s;
}
.aurora-2 {
    width: 520px; height: 520px;
    background: linear-gradient(135deg, #8FC0DC, #5B8DEF);
    top: 42%; right: -14%;
    animation-delay: -6s;
    animation-duration: 31s;
}
.aurora-3 {
    width: 700px; height: 700px;
    background: linear-gradient(135deg, #E8C4A8, #E8A8A2);
    bottom: -18%; left: 28%;
    animation-delay: -11s;
    animation-duration: 29s;
}
.aurora-4 {
    width: 480px; height: 480px;
    background: linear-gradient(135deg, #C8B0D8, #A8B2E0);
    top: 62%; left: 18%;
    animation-delay: -16s;
    animation-duration: 33s;
}
@keyframes auroraFloat {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(10%, 12%) scale(1.08) rotate(90deg); }
    50% { transform: translate(-6%, 8%) scale(0.92) rotate(180deg); }
    75% { transform: translate(12%, -8%) scale(1.04) rotate(270deg); }
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h);
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transition: background .3s, border-color .3s;
}
.nav-inner {
    max-width: 1080px; margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
    font-size: 14px; font-weight: 600; color: var(--ink);
    text-decoration: none; white-space: nowrap;
}
.nav-brand span { color: var(--ink-muted); font-weight: 400; }
.nav-links { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
    font-size: 13px; font-weight: 500; color: var(--ink-soft);
    text-decoration: none; padding: 8px 12px; border-radius: 999px;
    transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 999px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border: none; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-outline {
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.nav-cta { display: flex; gap: 8px; align-items: center; }
.theme-toggle {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
    transition: transform .2s, background .2s, color .2s, border-color .2s;
    padding: 0;
}
.theme-toggle:hover {
    transform: scale(1.06);
    color: var(--ink);
    border-color: var(--macaron-lavender);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hero */
.hero {
    padding: calc(var(--nav-h) + 24px) 0 clamp(40px, 6vh, 72px);
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    isolation: isolate;
    z-index: 2;
    min-height: auto;
}
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-video-scrim);
    transition: background .35s ease;
}
.hero-video-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, var(--hero-glow-1), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 10%, var(--hero-glow-2), transparent 55%),
        radial-gradient(ellipse 50% 40% at 70% 80%, var(--hero-glow-3), transparent 50%);
    pointer-events: none;
}
.hero > .container {
    position: relative;
    z-index: 1;
}
.hero-intro,
.hero-body {
    padding: 24px 28px;
    background: var(--hero-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hero-glass-border);
    box-shadow: var(--shadow);
}
.hero-intro h1,
.hero-intro .hero-role {
    text-shadow: var(--hero-text-shadow);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    grid-template-areas:
        "intro portrait"
        "body  contact";
    gap: 28px 48px;
    align-items: start;
    position: relative;
}
.hero-intro { grid-area: intro; align-self: center; }
.hero-portrait {
    grid-area: portrait;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 280px;
    justify-self: end;
}
.hero-body { grid-area: body; }
.hero-contact { grid-area: contact; justify-self: end; width: 100%; max-width: 280px; }
.hero-portrait-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--macaron-mint), var(--macaron-lavender), var(--macaron-peach));
}
.hero-portrait img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 260 / 356;
}
.hero-portrait figcaption {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-align: center;
    border-top: 1px solid var(--line);
}
.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-muted); margin-bottom: 20px;
}
.hero-kicker::before {
    content: ''; width: 24px; height: 2px;
    background: linear-gradient(90deg, var(--macaron-mint), var(--macaron-lavender));
}
.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08; margin-bottom: 12px;
}
.hero h1 em { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.hero-role { font-size: 18px; color: var(--ink-soft); margin-bottom: 8px; }
.hero-org { font-size: 15px; color: var(--ink-muted); margin-bottom: 0; }
.hero-summary { max-width: 560px; color: var(--ink-soft); font-size: 16px; line-height: 1.75; margin-bottom: 32px; }
@media (prefers-reduced-motion: reduce) {
    .hero-video { display: none; }
    .aurora-container { display: none; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); overflow: hidden;
    width: 100%; border: 1px solid var(--line);
}
.hero-card-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--macaron-lavender) 0%, var(--macaron-mint) 100%);
}
.hero-card-header h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 4px; }
.hero-card-header p { font-size: 15px; font-weight: 600; }
.hero-card-body { padding: 20px 24px; }
.contact-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: var(--ink-soft); padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: none; }
.contact-row a { color: var(--ink); text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -32px; position: relative; z-index: 2; padding-bottom: 64px; }
.stat-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow);
    overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-header { height: 6px; }
.stat-header.mint { background: var(--macaron-mint); }
.stat-header.lavender { background: var(--macaron-lavender); }
.stat-header.sky { background: var(--macaron-sky); }
.stat-header.peach { background: var(--macaron-peach); }
.stat-body { padding: 20px 22px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 13px; color: var(--ink-muted); }

/* Sections */
section { padding: 72px 0; position: relative; z-index: 1; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-theme="dark"] section.alt {
    background: rgba(28, 28, 31, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .stat-card,
[data-theme="dark"] .exp-card,
[data-theme="dark"] .edu-card,
[data-theme="dark"] .skill-group,
[data-theme="dark"] .project-card,
[data-theme="dark"] .achieve-item,
[data-theme="dark"] .pub-item,
[data-theme="dark"] .fellow-card,
[data-theme="dark"] .ip-card,
[data-theme="dark"] .ref-card,
[data-theme="dark"] .hero-card,
[data-theme="dark"] .hero-portrait {
    background: rgba(28, 28, 31, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
[data-theme="dark"] footer {
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.section-head { margin-bottom: 40px; }
.section-head .macaron-bar {
    display: inline-block; height: 4px; width: 48px; border-radius: 2px; margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 8px; }
.section-head p { color: var(--ink-muted); max-width: 520px; font-size: 15px; }

.macaron-bar.mint { background: var(--macaron-mint); }
.macaron-bar.lavender { background: var(--macaron-lavender); }
.macaron-bar.peach { background: var(--macaron-peach); }
.macaron-bar.sky { background: var(--macaron-sky); }
.macaron-bar.blush { background: var(--macaron-blush); }
.macaron-bar.sage { background: var(--macaron-sage); }
.macaron-bar.lemon { background: var(--macaron-lemon); }
.macaron-bar.lilac { background: var(--macaron-lilac); }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
    font-size: 13px; font-weight: 500; padding: 8px 14px;
    border-radius: 999px; background: var(--bg); color: var(--ink-soft);
    border: 1px solid var(--line);
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.exp-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow);
    overflow: hidden; transition: box-shadow .25s;
}
.exp-card:hover { box-shadow: var(--shadow-lg); }
.exp-header {
    padding: 20px 24px; display: flex; flex-wrap: wrap;
    justify-content: space-between; align-items: flex-start; gap: 12px;
}
.exp-header.mint { background: linear-gradient(135deg, rgba(181,234,215,.45), rgba(181,234,215,.15)); }
.exp-header.lavender { background: linear-gradient(135deg, rgba(199,206,234,.45), rgba(199,206,234,.15)); }
.exp-header.sky { background: linear-gradient(135deg, rgba(181,216,235,.45), rgba(181,216,235,.15)); }
.exp-header.peach { background: linear-gradient(135deg, rgba(255,218,193,.45), rgba(255,218,193,.15)); }
.exp-header.blush { background: linear-gradient(135deg, rgba(255,183,178,.45), rgba(255,183,178,.15)); }
.exp-header.sage { background: linear-gradient(135deg, rgba(201,228,197,.45), rgba(201,228,197,.15)); }
.exp-role { font-size: 17px; font-weight: 600; }
.exp-org { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.exp-period {
    font-size: 12px; font-weight: 600; letter-spacing: .04em;
    padding: 6px 12px; border-radius: 999px;
    background: var(--surface); color: var(--ink-muted);
    border: 1px solid var(--line); white-space: nowrap;
}
.exp-body { padding: 20px 24px 24px; }
.exp-body ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.exp-body li {
    font-size: 14px; color: var(--ink-soft); padding-left: 18px; position: relative;
}
.exp-body li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--macaron-mint-dark);
}

/* Education grid */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .2s;
}
.edu-card:hover { transform: translateY(-2px); }
.edu-top { padding: 14px 20px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); }
.edu-top.mint { background: var(--macaron-mint); }
.edu-top.lavender { background: var(--macaron-lavender); }
.edu-top.sky { background: var(--macaron-sky); }
.edu-top.peach { background: var(--macaron-peach); }
.edu-top.blush { background: var(--macaron-blush); }
.edu-top.lemon { background: var(--macaron-lemon); }
.edu-body { padding: 18px 20px; }
.edu-degree { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.edu-school { font-size: 13px; color: var(--ink-muted); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow);
}
.skill-group-header {
    padding: 16px 20px; font-size: 13px; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
}
.skill-group-header.tech { background: var(--macaron-sky); color: var(--ink); }
.skill-group-header.soft { background: var(--macaron-peach); color: var(--ink); }
.skill-group-header.comp { background: var(--macaron-sage); color: var(--ink); }
.skill-list { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.skill-item { font-size: 14px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.skill-item::before { content: '—'; color: var(--ink-muted); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project-card {
    background: var(--bg); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
}
.project-card .exp-header { padding: 16px 20px; }
.project-card .exp-body { padding: 16px 20px 20px; }
.project-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* Achievements */
.achieve-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.achieve-item {
    display: flex; gap: 16px; align-items: flex-start;
    padding: 18px 20px; background: var(--surface);
    border-radius: var(--radius); border: 1px solid var(--line);
    transition: box-shadow .2s;
}
.achieve-item:hover { box-shadow: var(--shadow); }
.achieve-year {
    flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; text-align: center; line-height: 1.2;
}
.achieve-year.mint { background: var(--macaron-mint); }
.achieve-year.lavender { background: var(--macaron-lavender); }
.achieve-year.sky { background: var(--macaron-sky); }
.achieve-year.peach { background: var(--macaron-peach); }
.achieve-year.blush { background: var(--macaron-blush); }
.achieve-year.sage { background: var(--macaron-sage); }
.achieve-year.lemon { background: var(--macaron-lemon); }
.achieve-year.lilac { background: var(--macaron-lilac); }
.achieve-title { font-size: 14px; font-weight: 500; color: var(--ink-soft); line-height: 1.5; }

/* Missions list */
.mission-list { display: flex; flex-direction: column; gap: 0; }
.mission-item {
    display: grid; grid-template-columns: 140px 1fr; gap: 24px;
    padding: 20px 0; border-bottom: 1px solid var(--line);
    align-items: baseline;
}
.mission-item:last-child { border-bottom: none; }
.mission-date { font-size: 13px; font-weight: 600; color: var(--macaron-sky-dark); }
.mission-event { font-size: 14px; color: var(--ink-soft); }

/* Publications */
.pub-group { margin-bottom: 32px; }
.pub-group h3 {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-muted); margin-bottom: 14px;
    padding-bottom: 10px; border-bottom: 2px solid var(--macaron-lavender);
    display: inline-block;
}
.pub-list { display: flex; flex-direction: column; gap: 12px; }
.pub-item {
    font-size: 14px; color: var(--ink-soft); line-height: 1.65;
    padding: 14px 18px; background: var(--surface);
    border-radius: 12px; border: 1px solid var(--line);
}

/* Fellowships */
.fellow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fellow-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow);
}
.fellow-top {
    padding: 14px 18px; background: linear-gradient(135deg, var(--macaron-lilac), var(--macaron-lavender));
    font-size: 12px; font-weight: 600; color: var(--ink-soft);
}
.fellow-body { padding: 18px; }
.fellow-role { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.fellow-org { font-size: 13px; color: var(--ink-muted); }

/* IP */
.ip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ip-card {
    padding: 20px 22px; background: var(--surface);
    border-radius: var(--radius); border: 1px solid var(--line);
    border-top: 4px solid var(--macaron-peach);
}
.ip-card h4 { font-size: 15px; margin-bottom: 6px; }
.ip-card p { font-size: 13px; color: var(--ink-muted); }

/* Reference */
.ref-card {
    max-width: 480px; padding: 32px;
    background: var(--surface); border-radius: var(--radius-lg);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--macaron-mint);
}
.ref-card h3 { font-size: 18px; margin-bottom: 4px; }
.ref-card .ref-title { font-size: 14px; color: var(--ink-muted); margin-bottom: 20px; }
.ref-detail { font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }
.ref-detail a { color: var(--ink); }

/* Footer */
footer {
    padding: 40px 0; text-align: center;
    font-size: 13px; color: var(--ink-muted);
    border-top: 1px solid var(--line);
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "portrait"
            "intro"
            "body"
            "contact";
        gap: 24px;
    }
    .hero-intro { align-self: auto; }
    .hero-portrait,
    .hero-contact {
        justify-self: center;
        max-width: 320px;
    }
    .hero-card { min-width: 0; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .edu-grid, .project-grid, .skills-grid, .achieve-grid, .fellow-grid, .ip-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .mission-item { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 480px) {
    .stats { grid-template-columns: 1fr 1fr; }
    section { padding: 56px 0; }
}

/* Hero background pan + zoom */
.hero-bg,
.hero-background {
  overflow: hidden;
}
.hero-bg img,
.hero-background img {
  animation: heroPanZoom 24s ease-in-out infinite alternate;
  transform-origin: center;
  will-change: transform;
}
@keyframes heroPanZoom {
  0% { transform: scale(1) translate3d(0,0,0); }
  50% { transform: scale(1.10) translate3d(-1.5%, 1%, 0); }
  100% { transform: scale(1.16) translate3d(1.5%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg img,
  .hero-background img {
    animation: none !important;
    transform: none !important;
  }
}
/* Reduce overlay darkness */
.hero-overlay {
  background: rgba(0,0,0,0.4) !important;
}


/* heroes1 people fit — abd-razzif */
@media (max-width: 900px) {
    .hero {
        padding: calc(var(--nav-h) + 16px) 0 40px;
        overflow: visible;
        min-height: auto;
    }
    .hero > .container { min-width: 0; }
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .hero-intro,
    .hero-body {
        padding: 18px 16px;
        min-width: 0;
        max-width: 100%;
    }
    .hero-portrait,
    .hero-contact {
        max-width: min(100%, 320px);
        width: 100%;
    }
    .hero-portrait img { max-width: 100%; height: auto; }
    .hero h1 { font-size: clamp(28px, 8vw, 40px); }
    .hero-summary { font-size: 15px; margin-bottom: 20px; }
    .hero-actions { gap: 10px; }
    .stats {
        margin-top: 16px;
        padding: 0 0 40px;
        gap: 12px;
    }
}
@media (max-width: 900px) and (max-height: 780px) {
    .hero { padding: calc(var(--nav-h) + 12px) 0 28px; }
    .hero-intro, .hero-body { padding: 14px 14px; }
    .hero-kicker { margin-bottom: 12px; }
}
