/* ============================================
   NILS GALLIST — Tech Artist · Digital Theater · Research
   Concept: "Orbit" — a dark stage where light-lines
   perform. Pure-black canvas, off-white type,
   concentric wireframe motifs, numbered section nav.
   ============================================
   TOC
   1.  Tokens & Reset
   2.  Typography
   3.  Layout helpers
   4.  Buttons & links
   5.  Custom cursor
   6.  Preloader
   7.  Topbar
   8.  Overlay menu
   9.  Side section-nav (numbered)
   10. Hero + orbit motif + hero meta
   11. Marquee
   12. Panels / section heads
   13. About (home) + portrait
   14. Work list
   15. Partners
   16. Contact CTA
   17. Page hero (sub-pages)
   18. Bio (about page)
   19. Timeline
   20. Projects grid
   21. Footer
   22. Reveal animations
   23. Responsive
   24. Reduced motion
   ============================================ */

/* ============ 1. TOKENS & RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #060606;
    --bg-soft: #0e0e0e;
    --fg: #f4f3ef;
    --muted: rgba(244, 243, 239, 0.55);
    --dim: rgba(244, 243, 239, 0.35);
    --faint: rgba(244, 243, 239, 0.12);
    --line: rgba(244, 243, 239, 0.14);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Syne', var(--font-sans);
    --ease: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --gutter: 2.5rem;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============ 2. TYPOGRAPHY ============ */
.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.eyebrow::before {
    content: '';
    width: 26px; height: 1px;
    background: var(--dim);
    display: inline-block;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 0.98; letter-spacing: -0.02em; }
em { font-style: italic; font-family: 'Syne', serif; }

/* ============ 3. LAYOUT HELPERS ============ */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.divider { height: 1px; background: var(--line); border: 0; }

/* ============ 4. BUTTONS & LINKS ============ */
.btn-cta {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.82rem; font-weight: 500;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--fg);
    border-radius: 100px;
    background: var(--fg); color: var(--bg);
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
    white-space: nowrap;
}
.btn-cta:hover { background: transparent; color: var(--fg); }
.btn-cta span { transition: transform 0.4s var(--ease); }
.btn-cta:hover span { transform: translateX(4px); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; font-weight: 500;
    padding: 1rem 2rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--fg);
    transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.btn-outline:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-outline span { transition: transform 0.4s var(--ease); }
.btn-outline:hover span { transform: translateX(4px); }

.text-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-weight: 500; font-size: 0.9rem;
    color: var(--fg);
    border-bottom: 1px solid var(--dim);
    padding-bottom: 3px;
    transition: gap 0.4s var(--ease), border-color 0.3s var(--ease);
}
.text-link:hover { gap: 0.9rem; border-color: var(--fg); }

/* ============ 5. CUSTOM CURSOR ============ */
.cursor-dot {
    position: fixed; width: 7px; height: 7px;
    background: var(--fg); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease);
    mix-blend-mode: difference;
}
.cursor-dot.grow { width: 46px; height: 46px; background: var(--fg); }
@media (hover: none) { .cursor-dot { display: none; } }

/* ============ 6. PRELOADER ============ */
.preloader {
    position: fixed; inset: 0;
    background: var(--bg); z-index: 10000;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2rem;
    transition: transform 0.9s var(--ease);
}
.preloader.done { transform: translateY(-100%); }
.preloader-mark { width: min(360px, 62vw); opacity: 0.95; }
.preloader-mark img { width: 100%; }
.preloader-bar {
    width: min(220px, 50vw); height: 1px;
    background: rgba(255,255,255,0.16); overflow: hidden;
}
.preloader-bar span {
    display: block; height: 100%; background: var(--fg);
    width: 0; animation: loadBar 1.4s var(--ease) forwards;
}
@keyframes loadBar { to { width: 100%; } }

/* ============ 7. TOPBAR ============ */
.topbar {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; padding: 1.6rem 0;
    transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}
.topbar.scrolled {
    padding: 1rem 0;
    background: rgba(6, 6, 6, 0.72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.logo-mark {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.35rem; letter-spacing: -0.02em; color: var(--fg);
}
.logo-mark .dot { font-style: italic; }

.menu-btn {
    display: inline-flex; align-items: center; gap: 0.75rem;
    background: none; border: none; cursor: pointer;
    color: var(--fg); font-family: var(--font-sans);
    font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 0;
}
.menu-btn .grid {
    display: grid; grid-template-columns: repeat(2, 5px);
    grid-auto-rows: 5px; gap: 3px;
}
.menu-btn .grid i {
    width: 5px; height: 5px; background: var(--fg); border-radius: 50%;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.menu-btn:hover .grid i:nth-child(1) { transform: translate(-1px, -1px); }
.menu-btn:hover .grid i:nth-child(4) { transform: translate(1px, 1px); }
.menu-btn .label { transition: opacity 0.3s var(--ease); }

/* ============ 8. OVERLAY MENU ============ */
.overlay-menu {
    position: fixed; inset: 0; background: var(--bg-soft);
    z-index: 1002; display: flex; flex-direction: column; justify-content: center;
    padding: 2rem var(--gutter);
    transform: translateY(-100%);
    transition: transform 0.7s var(--ease);
}
.overlay-menu.open { transform: translateY(0); }
.overlay-close {
    position: absolute; top: 1.7rem; right: var(--gutter);
    background: none; border: none; color: var(--fg); cursor: pointer;
    font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 0.6rem;
}
.overlay-close .x { font-size: 1.4rem; line-height: 1; }
.overlay-menu nav { display: flex; flex-direction: column; gap: 0.4rem; max-width: 1440px; margin: 0 auto; width: 100%; }
.overlay-menu nav a {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 9vw, 6rem);
    font-weight: 700; line-height: 1.08;
    display: flex; align-items: baseline; gap: 1.2rem;
    color: var(--fg);
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s var(--ease);
}
.overlay-menu nav a .idx {
    font-family: var(--font-sans); font-size: 0.8rem; font-weight: 400;
    color: var(--dim);
}
.overlay-menu nav a:hover { color: var(--muted); }
.overlay-menu.open nav a { opacity: 1; transform: translateY(0); }
.overlay-menu.open nav a:nth-child(1) { transition-delay: 0.15s; }
.overlay-menu.open nav a:nth-child(2) { transition-delay: 0.22s; }
.overlay-menu.open nav a:nth-child(3) { transition-delay: 0.29s; }
.overlay-menu.open nav a:nth-child(4) { transition-delay: 0.36s; }
.overlay-footer {
    max-width: 1440px; margin: 3.5rem auto 0; width: 100%;
    display: flex; gap: 2rem; flex-wrap: wrap;
    font-size: 0.85rem; color: var(--muted);
}
.overlay-footer a { transition: color 0.3s var(--ease); }
.overlay-footer a:hover { color: var(--fg); }

/* ============ 9. SIDE SECTION-NAV ============ */
.sidenav {
    position: fixed; top: 50%; right: 1.6rem;
    transform: translateY(-50%);
    z-index: 900;
    display: flex; flex-direction: column; gap: 1.4rem;
}
.sidenav a {
    display: flex; align-items: center; gap: 0.8rem;
    justify-content: flex-end;
    color: var(--dim);
    transition: color 0.35s var(--ease);
}
.sidenav a .s-label {
    font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    opacity: 0; transform: translateX(6px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
    white-space: nowrap;
}
.sidenav a .s-num {
    font-size: 0.72rem; font-variant-numeric: tabular-nums;
    position: relative; padding-right: 2px;
}
.sidenav a .s-num::after {
    content: ''; position: absolute; right: -1.6rem; top: 50%;
    width: 0; height: 1px; background: var(--fg);
    transition: width 0.35s var(--ease);
}
.sidenav a:hover { color: var(--fg); }
.sidenav a:hover .s-label { opacity: 1; transform: translateX(0); }
.sidenav a.active { color: var(--fg); }
.sidenav a.active .s-label { opacity: 1; transform: translateX(0); }
.sidenav a.active .s-num::after { width: 1rem; }

/* ============ 10. HERO + ORBIT ============ */
.hero {
    min-height: 100vh; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    padding: 7rem 0 2.6rem;
}
.hero-inner { position: relative; z-index: 3; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { margin-bottom: 2rem; }
.hero-wordmark {
    width: min(760px, 82vw);
    opacity: 0; transform: translateY(30px);
    transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
    transition-delay: 0.15s;
}
.hero-wordmark.shown { opacity: 1; transform: translateY(0); }
.hero-wordmark img { width: 100%; }
.hero-tagline {
    margin-top: 2.4rem; max-width: 440px;
    font-size: 1rem; line-height: 1.65; color: var(--muted);
}
.hero-tagline strong { color: var(--fg); font-weight: 600; }

/* orbit wireframe motif */
.orbit {
    position: absolute; top: 50%; left: 68%;
    transform: translate(-50%, -50%);
    width: min(680px, 74vw); aspect-ratio: 1;
    z-index: 1; pointer-events: none;
    opacity: 0; transition: opacity 1.6s var(--ease-out) 0.3s;
}
.orbit.shown { opacity: 0.5; }
.orbit svg { width: 100%; height: 100%; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--fg); stroke-width: 0.5; opacity: 0.5; }
.orbit .ring-dash { stroke-dasharray: 2 6; opacity: 0.4; }
.orbit .spin-slow { transform-origin: 50% 50%; animation: spin 48s linear infinite; }
.orbit .spin-rev { transform-origin: 50% 50%; animation: spin 60s linear infinite reverse; }
.orbit .dot-node { fill: var(--fg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* particle network layered over the orbit motif */
.orbit-fx {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 2; pointer-events: none;
    opacity: 0; transition: opacity 1.6s var(--ease-out) 0.35s;
}
.orbit-fx.shown { opacity: 1; }

.hero-meta {
    position: relative; z-index: 3; margin-top: 2rem;
    display: flex; gap: 3.5rem 4rem; flex-wrap: wrap; width: 100%;
}
.hero-meta .col { display: flex; flex-direction: column; gap: 0.35rem; }
.hero-meta .k { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.hero-meta .v { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.hero-meta .v a { color: var(--muted); border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.hero-meta .v a:hover { color: var(--fg); border-color: var(--fg); }
.scroll-cue {
    position: absolute; right: 0; bottom: 3rem; z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
    font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim);
}
.scroll-cue svg { animation: scrollBounce 2s var(--ease) infinite; }
.container-cue { right: var(--gutter); }
@keyframes scrollBounce { 0%,100% { transform: translateY(0);} 50% { transform: translateY(7px);} }

/* ============ 11. MARQUEE ============ */
.marquee-section {
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 1.4rem 0; overflow: hidden; background: var(--bg);
}
.marquee { display: flex; }
.marquee-track { display: flex; animation: marqueeScroll 34s linear infinite; white-space: nowrap; }
.marquee-track span {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.1rem, 2.6vw, 1.8rem); color: var(--fg);
}
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* ============ 12. PANELS / SECTION HEADS ============ */
.panel { padding: 8rem 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 4.5rem; }
.section-title { font-size: clamp(2.3rem, 6vw, 5rem); font-weight: 800; margin-top: 1.2rem; }

/* ============ 13. ABOUT (home) + PORTRAIT ============ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 5rem; align-items: center; }
.portrait {
    width: 100%; aspect-ratio: 4/5; background: var(--bg-soft);
    overflow: hidden; position: relative;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
}
.portrait img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) contrast(1.02);
    transition: filter 0.6s var(--ease), transform 0.8s var(--ease);
}
.portrait:hover img { filter: grayscale(0%); transform: scale(1.04); }
.portrait-placeholder { position: absolute; color: var(--dim); font-family: var(--font-display); font-size: 1.1rem; }
.portrait.no-img img { display: none; }
.about-copy .intro-big {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.8vw, 2.4rem);
    font-weight: 600; line-height: 1.2; letter-spacing: -0.02em;
    margin-bottom: 2rem;
}
.about-copy p { color: var(--muted); line-height: 1.75; margin-bottom: 1.4rem; max-width: 52ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2.5rem 0; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.stat-num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; line-height: 1; }
.stat-num::after { content: '+'; color: var(--dim); }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.4; }

/* ============ 14. WORK LIST ============ */
.work-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.work-item {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem;
    padding: 2rem 0; border-bottom: 1px solid var(--line);
    transition: padding 0.4s var(--ease); position: relative;
}
.work-item::before {
    content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0;
    background: var(--bg-soft); z-index: -1; transition: width 0.4s var(--ease);
}
.work-item:hover { padding-left: 1.5rem; }
.work-num { font-size: 0.8rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.work-info h3 { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 700; }
.work-info span { font-size: 0.8rem; color: var(--muted); }
.work-arrow { font-size: 1.4rem; color: var(--muted); transition: transform 0.4s var(--ease), color 0.3s; }
.work-item:hover .work-arrow { transform: translateX(8px); color: var(--fg); }
.work-cta { margin-top: 3.5rem; }

/* ============ 15. PARTNERS ============ */
.partners-wrap { margin-top: 1rem; }
.partners-frame {
    border: 1px solid var(--line); border-radius: 4px;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.partners-frame img { width: 100%; max-width: 1000px; margin: 0 auto; opacity: 0.9; }
.partners-note { margin-top: 1.6rem; font-size: 0.82rem; color: var(--dim); }

/* ============ 16. CONTACT CTA ============ */
.contact-cta { padding: 9rem 0; text-align: center; border-top: 1px solid var(--line); }
.cta-title { font-size: clamp(2.5rem, 8vw, 7rem); font-weight: 800; line-height: 0.95; margin-bottom: 2.5rem; }
.contact-cta .btn-cta { font-size: 1rem; padding: 1.1rem 2.3rem; }
.contact-cta .cta-social { margin-top: 2.5rem; display: flex; gap: 2rem; justify-content: center; font-size: 0.85rem; color: var(--muted); }
.contact-cta .cta-social a { transition: color 0.3s var(--ease); }
.contact-cta .cta-social a:hover { color: var(--fg); }

/* ============ 17. PAGE HERO (sub-pages) ============ */
.page-hero { padding: 12rem 0 4rem; }
.page-title { font-size: clamp(2.8rem, 9vw, 8rem); font-weight: 800; line-height: 0.92; margin-top: 1.5rem; }
.page-title .line { display: block; overflow: hidden; }
.page-title .reveal-text { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease-out); }
.page-title .reveal-text.shown { transform: translateY(0); }
.page-title .line:nth-child(2) .reveal-text { transition-delay: 0.15s; }
.page-sub { max-width: 520px; margin-top: 2rem; font-size: 1rem; color: var(--muted); line-height: 1.7; }

/* ============ 18. BIO (about page) ============ */
.bio { padding: 4rem 0 8rem; }
.bio-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 5rem; }
.bio-aside { position: sticky; top: 7rem; align-self: start; }
.bio-aside .eyebrow { margin-bottom: 1.5rem; }
.bio-lead { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 2rem; }
.bio-body p { margin-bottom: 1.5rem; font-size: 1rem; line-height: 1.75; color: var(--muted); max-width: 60ch; }
.bio-body p strong { font-weight: 600; color: var(--fg); }
.bio-block { margin-top: 3.5rem; }
.bio-h { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 1.2rem; font-family: var(--font-sans); padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.bio-list { display: flex; flex-direction: column; gap: 1rem; }
.bio-list li { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; font-size: 0.95rem; }
.bio-list li span:first-child { font-weight: 600; }
.bio-list li span:last-child { color: var(--muted); }
.bio-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.bio-tags span { border: 1px solid var(--line); border-radius: 100px; padding: 0.5rem 1.1rem; font-size: 0.85rem; color: var(--fg); transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.bio-tags span:hover { background: var(--fg); color: var(--bg); }

/* ============ 19. TIMELINE ============ */
.timeline-section { padding: 6rem 0 8rem; border-top: 1px solid var(--line); }
.timeline { margin-top: 1rem; }
.timeline-item { display: grid; grid-template-columns: 200px 1fr; gap: 3rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-year { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.4rem; }
.timeline-body h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); margin-bottom: 0.7rem; }
.timeline-body p { color: var(--muted); line-height: 1.7; max-width: 55ch; }

/* ============ 20. PROJECTS GRID ============ */
.projects { padding: 2rem 0 8rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; margin-bottom: 3.5rem; }
.project-card { display: block; position: relative; }
.project-thumb {
    width: 100%; aspect-ratio: 4/3; overflow: hidden; margin-bottom: 1.4rem; position: relative;
    background: linear-gradient(135deg, #171717, #080808);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: transform 0.7s var(--ease), filter 0.7s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.06); filter: grayscale(0%); }
.project-thumb .thumb-ghost {
    position: absolute; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.5rem, 6vw, 4rem); color: rgba(255,255,255,0.06);
    letter-spacing: -0.02em; pointer-events: none;
}
.project-meta { padding-right: 1rem; }
.project-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.project-top h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); transition: transform 0.4s var(--ease); }
.project-card:hover .project-top h3 { transform: translateX(6px); }
.project-arrow { font-size: 1.1rem; color: var(--muted); transition: transform 0.4s var(--ease), color 0.3s; }
.project-card:hover .project-arrow { transform: translate(4px, -4px); color: var(--fg); }
.project-tag { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 0.8rem; }
.project-meta p { font-size: 0.9rem; line-height: 1.6; color: var(--muted); max-width: 42ch; }
.projects-empty { border: 1px dashed var(--line); border-radius: 6px; padding: 4rem 2rem; text-align: center; color: var(--muted); }
.projects-empty strong { color: var(--fg); font-weight: 600; }
.projects-empty code { background: rgba(255,255,255,0.08); padding: 0.15rem 0.45rem; border-radius: 3px; color: var(--fg); font-size: 0.85em; }
.projects-note { font-size: 0.95rem; color: var(--muted); }
.projects-note a { color: var(--fg); border-bottom: 1px solid var(--fg); padding-bottom: 2px; }

/* ============ 21. FOOTER ============ */
.footer { padding: 4rem 0 2.5rem; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand .logo-mark { font-size: 1.35rem; }
.footer-brand p { margin-top: 0.6rem; font-size: 0.85rem; color: var(--muted); max-width: 24ch; }
.footer-col h4 { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; font-family: var(--font-sans); font-weight: 500; }
.footer-col a, .footer-col span { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.6rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--dim); }

/* ============ 22. REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.shown { opacity: 1; transform: translateY(0); }

/* ============ 23. RESPONSIVE ============ */
@media (max-width: 1080px) {
    .sidenav { display: none; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .bio-grid { grid-template-columns: 1fr; gap: 3rem; }
    .bio-aside { position: static; }
    .portrait { max-width: 420px; }
    .orbit { left: 50%; opacity: 0.28; }
    .orbit.shown { opacity: 0.28; }
}

@media (max-width: 768px) {
    :root { --gutter: 1.4rem; }
    .hero { min-height: 100svh; padding: 6.25rem 0 2.4rem; }
    .orbit, .orbit-fx { display: none; }
    .hero-eyebrow { display: none; }
    .hero-wordmark { width: min(760px, 90vw); }
    .hero-tagline { margin-top: 1.7rem; font-size: 1.02rem; line-height: 1.6; max-width: 30rem; }
    .hero-meta { position: static; margin-top: 2.6rem; gap: 1.6rem 2rem; padding-top: 1.9rem; border-top: 1px solid var(--line); }
    .scroll-cue { display: none; }
    .panel, .contact-cta, .timeline-section { padding: 5rem 0; }
    .stats { grid-template-columns: 1fr; gap: 1.5rem; }
    .work-item { grid-template-columns: auto 1fr; gap: 1rem; padding: 1.5rem 0; }
    .work-arrow { display: none; }
    .page-hero { padding: 9rem 0 3rem; }
    .project-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .timeline-item { grid-template-columns: 1fr; gap: 0.6rem; padding: 2rem 0; }
    .timeline-year { padding-top: 0; }
    .bio-list li { grid-template-columns: 1fr; gap: 0.2rem; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .menu-btn .label { display: none; }
}

@media (max-width: 480px) {
    .footer-inner { grid-template-columns: 1fr; }
    .contact-cta .cta-social { flex-direction: column; gap: 0.8rem; align-items: center; }
}

/* ============ 24. REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal, .hero-wordmark { opacity: 1; transform: none; }
    .reveal-text { transform: none !important; }
    .marquee-track, .orbit .spin-slow, .orbit .spin-rev { animation: none; }
    .orbit { opacity: 0.4; }
}

/* ============ 25. RESEARCH / PUBLICATIONS ============ */
.overlay-menu.open nav a:nth-child(5) { transition-delay: 0.43s; }
.overlay-menu.open nav a:nth-child(6) { transition-delay: 0.50s; }

.research-teaser-intro { max-width: 58ch; color: var(--muted); margin: 0 0 3rem; font-size: 1.05rem; line-height: 1.7; }

.research-intro { padding: 2rem 0 5rem; }
.research-links { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 2.5rem; font-size: 0.85rem; color: var(--muted); }
.research-links a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.research-links a:hover { color: var(--fg); border-color: var(--fg); }

.pubs { padding: 6rem 0 8rem; border-top: 1px solid var(--line); }
.pub-list { display: flex; flex-direction: column; }
.pub-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 2.5rem; padding: 2.2rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.pub-item:last-child { border-bottom: 1px solid var(--line); }
.pub-year { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--dim); font-variant-numeric: tabular-nums; }
.pub-body h3 { font-size: clamp(1.1rem, 1.9vw, 1.45rem); line-height: 1.3; margin-bottom: 0.5rem; }
.pub-authors { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.3rem; }
.pub-venue { font-size: 0.85rem; color: var(--dim); font-style: italic; }
.pub-doi { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 0.45rem 1rem; white-space: nowrap; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); }
a.pub-doi:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

@media (max-width: 768px) {
    .research-intro { padding-bottom: 3.5rem; }
    .pubs { padding: 4.5rem 0 5rem; }
    .pub-item { grid-template-columns: 1fr; gap: 0.7rem; padding: 1.8rem 0; }
    .pub-doi { justify-self: start; }
}
