/* =============================================================================
   Hemang (Case) Keswani — site styles
   ============================================================================= */

:root {
    --bg: #07060c;
    --bg-2: #0c0a15;
    --surface: rgba(255, 255, 255, 0.028);
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #eeedf6;
    --muted: #a3a0b6;
    --dim: #6f6c84;
    --violet: #a78bfa;
    --violet-2: #7c3aed;
    --violet-glow: rgba(139, 92, 246, 0.35);
    --cyan: #67e8f9;
    --amber: #fbbf24;

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --radius: 18px;
    --radius-sm: 10px;
    --max: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Film grain + vignette overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--violet-2); color: #fff; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- Background */
#field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60vw 50vh at 85% -10%, rgba(124, 58, 237, 0.20), transparent 60%),
        radial-gradient(50vw 40vh at -10% 30%, rgba(34, 211, 238, 0.07), transparent 60%),
        radial-gradient(70vw 60vh at 50% 120%, rgba(124, 58, 237, 0.12), transparent 60%);
}

/* ---------------------------------------------------------------- Nav */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--violet-2), var(--violet), var(--cyan));
    z-index: 60;
}

.nav {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), var(--max));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 9, 18, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled { background: rgba(10, 9, 18, 0.82); border-color: var(--line-2); }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--violet-2), #4c1d95);
    box-shadow: 0 0 20px var(--violet-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}

.brand-name .nick { color: var(--violet); font-family: var(--font-mono); font-size: 0.82em; font-weight: 500; }

.nav-links { display: flex; gap: 2px; list-style: none; }

.nav-links a {
    display: block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    color: var(--muted);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: #fff; background: rgba(139, 92, 246, 0.18); }

.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before {
    position: absolute;
    left: 11px;
    width: 16px;
    height: 1.5px;
    background: var(--text);
    content: "";
    transition: transform 0.3s var(--ease);
}
.nav-toggle span { top: 15px; }
.nav-toggle span::before { left: 0; top: 7px; }
.nav.open .nav-toggle span { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-toggle span::before { transform: translateY(-7px) rotate(-90deg); }

/* ---------------------------------------------------------------- Layout */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

section { position: relative; padding-block: clamp(80px, 12vw, 140px); }

.section-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 8px 28px;
    margin-bottom: clamp(36px, 6vw, 64px);
}

.section-index {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--violet);
    letter-spacing: 0.12em;
    padding-bottom: 0.9em;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.3rem, 6.4vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.section-title .ghost { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.35); }

.section-lede {
    grid-column: 2;
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.05rem;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--violet);
}

/* ---------------------------------------------------------------- Cards */
.card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
    padding: clamp(22px, 3vw, 32px);
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.3s, transform 0.5s var(--ease);
}

/* pointer spotlight */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.16), transparent 45%);
}

.card:hover { border-color: rgba(167, 139, 250, 0.35); }
.card:hover::before { opacity: 1; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--muted);
    background: rgba(255,255,255,0.02);
    white-space: nowrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Hero */
.hero {
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    background: rgba(255,255,255,0.025);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3.4rem, 11vw, 9rem);
    line-height: 0.86;
    letter-spacing: -0.055em;
}

.hero-name .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.1em; }
.hero-name .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
.hero-name .line:nth-child(2) > span { animation-delay: 0.08s; }
.hero-name .line:nth-child(3) > span { animation-delay: 0.16s; }

.hero-name .nick {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.42em;
    letter-spacing: -0.02em;
    vertical-align: 0.55em;
    margin-left: 0.15em;
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-name .outline { color: transparent; -webkit-text-stroke: 1.5px rgba(238, 237, 246, 0.85); }

@keyframes rise { to { transform: translateY(0); } }

.hero-tagline {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: clamp(0.72rem, 1.4vw, 0.85rem);
    letter-spacing: 0.24em;
    color: var(--muted);
}

.hero-tagline b { color: var(--violet); font-weight: 500; }

.hero-bio {
    margin-top: 22px;
    max-width: 52ch;
    font-size: clamp(1.02rem, 1.6vw, 1.18rem);
    color: var(--muted);
}

.hero-bio strong { color: var(--text); font-weight: 500; }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 26px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--dim);
}

.hero-meta span b { color: var(--text); font-weight: 500; }

/* Small link pills (YouTube / LinkedIn / Gallery) */
.mini-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

.mini-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--muted);
    background: rgba(255,255,255,0.02);
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.3s var(--ease);
}

.mini-link svg { width: 14px; height: 14px; flex: none; }
.mini-link:hover { color: #fff; border-color: rgba(167, 139, 250, 0.6); background: rgba(139, 92, 246, 0.12); transform: translateY(-2px); }

.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: center; }
#core { width: 100%; height: 100%; }

.hero-visual .ring-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: var(--dim);
}
.ring-label.tl { top: 8%; left: 0; }
.ring-label.br { bottom: 8%; right: 0; text-align: right; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(48px, 8vw, 90px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(6px);
}

.stat { padding: 22px 24px; }
.stat + .stat { border-left: 1px solid var(--line); }

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-num small { font-size: 0.5em; color: var(--violet); margin-left: 2px; }
.stat-label { margin-top: 4px; font-size: 0.82rem; color: var(--dim); }

.scroll-cue {
    position: absolute;
    bottom: 22px;
    left: 50%;
    translate: -50% 0;
    width: 22px;
    height: 36px;
    border: 1.5px solid var(--line-2);
    border-radius: 12px;
}
.scroll-cue::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    width: 3px;
    height: 7px;
    translate: -50% 0;
    border-radius: 2px;
    background: var(--violet);
    animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------------------------------------------------------------- Marquee */
.marquee {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding-block: 18px;
    background: rgba(255,255,255,0.015);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 500;
    color: var(--dim);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 48px;
}

.marquee-track span::after { content: "✦"; font-size: 0.6em; color: var(--violet); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- Experience */
.exp-list { display: grid; gap: 18px; }

.exp {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
}

.exp-when { display: flex; flex-direction: column; gap: 6px; }
.exp-when .yr { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.exp-when .kind { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; }

.exp h3 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.exp h3 .at { color: var(--violet); }
.exp p { margin-top: 10px; color: var(--muted); max-width: 70ch; }

.bullets { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.97rem; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 10px; height: 1.5px; background: var(--violet); }
.bullets strong { color: var(--text); font-weight: 500; }

.exp .chips { margin-top: 18px; }

/* ---------------------------------------------------------------- Leadership bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }

.lead-main { grid-column: span 6; display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; }
.lead-main h3, .lead-side h3 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 10px;
}

.lead-main p { margin-top: 14px; color: var(--muted); }
.lead-main p strong { color: var(--text); font-weight: 500; }

.lead-media {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-height: 280px;
    border: 1px solid var(--line);
}

.lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lead-main:hover .lead-media img { transform: scale(1.04); }

.lead-media figcaption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(7, 6, 12, 0.75);
    backdrop-filter: blur(6px);
}

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }

.metric {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.25);
}

.metric b { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.metric span { font-size: 0.78rem; color: var(--dim); line-height: 1.35; display: block; margin-top: 2px; }

.lead-side { grid-column: span 3; }
.lead-side p { margin-top: 12px; color: var(--muted); }

.partner-row { display: grid; gap: 8px; margin-top: 16px; }
.partner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}
.partner span:last-child { font-family: var(--font-mono); color: var(--violet); font-size: 0.85rem; }

/* ---------------------------------------------------------------- Research */
.papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.paper { display: flex; flex-direction: column; padding: 0; }

.paper-thumb {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #f3f2f7;
}

.paper-thumb img {
    width: 100%;
    object-fit: cover;
    object-position: top;
    transform: translateY(0);
    transition: transform 1.6s var(--ease);
    filter: grayscale(0.2) contrast(1.05);
}

.paper:hover .paper-thumb img { transform: translateY(-14%); }

.paper-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(7, 6, 12, 0.9));
}

.paper-thumb .venue {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--violet-2);
}

.paper-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.paper h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.paper p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; flex: 1; }

.paper .kpi {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line-2);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--cyan);
}

.text-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--violet);
    letter-spacing: 0.04em;
}
.text-btn::after { content: "→"; transition: transform 0.3s var(--ease); }
.text-btn:hover::after, .card:hover .text-btn::after { transform: translateX(4px); }

/* ---------------------------------------------------------------- Community */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.impact .icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: rgba(139, 92, 246, 0.1);
    color: var(--violet);
    margin-bottom: 18px;
}
.impact .icon svg { width: 22px; height: 22px; }
.impact h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.impact p { margin-top: 10px; color: var(--muted); font-size: 0.97rem; }
.impact p strong { color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------------- Academics */
.acad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.score {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 14px 0 22px;
    background: linear-gradient(180deg, #fff 30%, var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.score .of { font-size: 0.4em; letter-spacing: -0.02em; -webkit-text-fill-color: var(--dim); }

.acad h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-top: 6px; }

.rows { display: grid; }
.row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}
.row b { font-family: var(--font-mono); font-weight: 500; color: var(--text); font-size: 0.86rem; }

.bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: -2px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet-2), var(--violet)); transition: width 1.4s var(--ease); }
.in .bar i { width: var(--w); }

/* ---------------------------------------------------------------- Arsenal */
.arsenal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.arsenal h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 6px 0 18px; }
.arsenal .chip { font-size: 0.8rem; color: var(--text); }
.arsenal button.chip { cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.arsenal button.chip:hover { border-color: var(--violet); background: rgba(139, 92, 246, 0.14); }
.arsenal button.chip::after { content: "↗"; color: var(--violet); }

/* ---------------------------------------------------------------- Gallery */
.gal-index {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: clamp(48px, 7vw, 80px);
}

.gal-index a {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 150px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.3s, transform 0.4s var(--ease);
}

.gal-index a img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.55;
    transition: opacity 0.4s, transform 1s var(--ease);
}

.gal-index a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(7,6,12,0.1), rgba(7,6,12,0.92));
}

.gal-index a:hover { border-color: rgba(167, 139, 250, 0.5); transform: translateY(-3px); }
.gal-index a:hover img { opacity: 0.8; transform: scale(1.06); }
.gal-index .n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--violet); }
.gal-index b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2; margin-top: 2px; }
.gal-index small { font-size: 0.75rem; color: var(--muted); }

.chapter {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: clamp(24px, 4vw, 56px);
    padding-block: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--line);
    scroll-margin-top: 90px;
}

.chapter-info { position: sticky; top: 100px; align-self: start; }

.chapter-info .num {
    font-family: var(--font-display);
    font-size: 4.2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(167, 139, 250, 0.55);
}

.chapter-info h3 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 10px;
}

.chapter-info p { margin-top: 12px; color: var(--muted); font-size: 0.97rem; }

.chapter-facts { list-style: none; margin-top: 20px; display: grid; gap: 8px; }
.chapter-facts li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    font-size: 0.86rem;
    color: var(--muted);
}
.chapter-facts li b { font-family: var(--font-display); color: var(--text); font-weight: 600; font-size: 1rem; white-space: nowrap; }

.tiles { columns: 3 220px; column-gap: 16px; }

.tile {
    break-inside: avoid;
    margin-bottom: 16px;
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-2);
    transition: border-color 0.3s, transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.tile:hover {
    border-color: rgba(167, 139, 250, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -18px rgba(124, 58, 237, 0.55);
}

.tile-media { position: relative; overflow: hidden; background: #111; }
.tile-media img, .tile-media video { width: 100%; height: auto; transition: transform 1s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.05); }

.tile.doc .tile-media { background: #f4f3f8; max-height: 260px; }
.tile.doc .tile-media img { object-fit: cover; object-position: top; }

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(7, 6, 12, 0.72);
    backdrop-filter: blur(6px);
}

.badge.hot { background: var(--violet-2); }

.play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.92);
    color: #111;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transition: transform 0.4s var(--ease);
}
.play svg { width: 18px; height: 18px; margin-left: 3px; }
.tile:hover .play { transform: scale(1.1); }

.tile-cap { padding: 12px 14px 14px; }
.tile-cap b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; line-height: 1.25; }
.tile-cap span { display: block; margin-top: 4px; font-size: 0.84rem; color: var(--muted); line-height: 1.45; }

/* ---------------------------------------------------------------- Contact */
.contact { text-align: center; }

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 9vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.92;
}

.contact-title em { font-style: normal; background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.contact p { margin: 22px auto 0; max-width: 46ch; color: var(--muted); }

.mail {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding: 16px 28px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2.4vw, 1.1rem);
    color: #fff;
    background: linear-gradient(135deg, var(--violet-2), #5b21b6);
    box-shadow: 0 10px 40px -10px var(--violet-glow), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.4s var(--ease), box-shadow 0.4s;
    word-break: break-all;
}

.mail:hover { transform: translateY(-3px); box-shadow: 0 18px 50px -10px rgba(139, 92, 246, 0.6); }

.contact .mini-links { justify-content: center; margin-top: 22px; }

footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 36px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--dim);
}

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------------------------------------------------------------- Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: 1fr 380px;
    background: rgba(5, 4, 10, 0.94);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lb-stage { position: relative; display: grid; place-items: center; padding: 64px 72px; min-height: 0; }

.lb-stage img, .lb-stage video {
    max-width: 100%;
    max-height: calc(100svh - 128px);
    object-fit: contain;
    border-radius: 10px;
}

.lb-stage iframe { width: 100%; height: calc(100svh - 128px); border: 0; border-radius: 10px; background: #fff; }
.lb-stage iframe.yt { aspect-ratio: 16 / 9; height: auto; max-height: calc(100svh - 128px); background: #000; }

.lb-info {
    border-left: 1px solid var(--line);
    padding: 72px 28px 28px;
    overflow-y: auto;
    background: rgba(12, 10, 21, 0.9);
}

.lb-info h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-top: 10px; }
.lb-info .lb-cap { margin-top: 10px; color: var(--text); }
.lb-info .lb-detail { margin-top: 16px; color: var(--muted); font-size: 0.93rem; line-height: 1.7; }
.lb-info .lb-count { margin-top: 24px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim); }
.lb-info .text-btn { margin-top: 14px; }

.lb-btn {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-2);
    background: rgba(255,255,255,0.05);
    transition: background 0.2s, border-color 0.2s;
}
.lb-btn:hover { background: rgba(139, 92, 246, 0.2); border-color: var(--violet); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { top: 16px; right: 16px; position: fixed; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* ---------------------------------------------------------------- Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
    .nav-links a { padding: 7px 9px; font-size: 0.82rem; }
    .gal-index { grid-template-columns: repeat(3, 1fr); }
    .papers, .impact-grid, .acad-grid, .arsenal { grid-template-columns: 1fr 1fr; }
    .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
    .lb-info { border-left: 0; border-top: 1px solid var(--line); padding: 20px 22px 24px; max-height: 36svh; }
    .lb-stage { padding: 64px 64px 16px; }
    .lb-stage img, .lb-stage video { max-height: calc(64svh - 90px); }
    .lb-stage iframe { height: calc(64svh - 90px); }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 10px;
        border: 1px solid var(--line-2);
        border-radius: var(--radius);
        background: rgba(10, 9, 18, 0.96);
        backdrop-filter: blur(18px);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s, transform 0.3s var(--ease);
    }
    .nav.open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
    .nav-links a { padding: 12px 14px; font-size: 0.95rem; border-radius: 12px; }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 300px; margin-bottom: -20px; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }

    .section-head { grid-template-columns: 1fr; }
    .section-lede { grid-column: 1; }
    .section-index { padding-bottom: 0; }

    .exp { grid-template-columns: 1fr; gap: 12px; }
    .exp-when { flex-direction: row; align-items: baseline; gap: 12px; }

    .lead-main { grid-template-columns: 1fr; }
    .lead-side { grid-column: span 6; }

    .chapter { grid-template-columns: 1fr; }
    .chapter-info { position: static; }
    .chapter-info .num { font-size: 3rem; }
}

@media (max-width: 640px) {
    .brand-name { font-size: 0.92rem; }
    .papers, .impact-grid, .acad-grid, .arsenal { grid-template-columns: 1fr; }
    .gal-index { grid-template-columns: 1fr 1fr; }
    .gal-index a { min-height: 110px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .tiles { columns: 2 140px; column-gap: 10px; }
    .tile { margin-bottom: 10px; }
    .tile-cap { padding: 10px 11px 12px; }
    .tile-cap b { font-size: 0.9rem; }
    .tile-cap span { font-size: 0.78rem; }
    .lb-stage { padding: 60px 12px 12px; }
    .lb-prev, .lb-next { top: auto; bottom: 8px; translate: none; width: 38px; height: 38px; }
    .lb-prev { left: 12px; }
    .lb-next { right: 12px; }
    .stat { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
