@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Syne:wght@700;800&display=swap');

/* =================================================================
   REDESIGN v2 — Alvin-Leung-led, light-but-bold, CMS-driven
   Loaded AFTER styles.css. Single typeface (Hanken Grotesk).
   Homepage = hybrid: banded project tiles (left) + sticky bio /
   experiences (right). Click a tile -> full-screen case-study overlay.
   ================================================================= */

/* ----------------------------- Tokens ---------------------------- */
:root {
    --paper:        #E7ECF3;   /* cool blue-gray base (matches Works) */
    --paper-2:      #DBE2EC;   /* slightly deeper cool tone for alt sections */
    --surface:      #FFFFFF;
    --ink:          #1B2A41;   /* deep navy ink, from the NA mark */
    --ink-2:        #1B2A41;   /* no gray text: secondary = ink */
    --ink-3:        #34425C;   /* labels: dark navy, not gray */
    --line:         rgba(27,42,65,0.13);
    --line-strong:  rgba(27,42,65,0.20);

    /* fallback band accents when an org has no color */
    --a-1:#C6502E; --a-2:#284A73; --a-3:#C99A2E; --a-4:#2C7A6F; --a-5:#6E7A49;
    --accent:       #E0613C;          /* vibrant warm coral (the pop) */
    --accent-2:     #243F66;          /* navy secondary */
    --accent-ink:   #FFFFFF;

    /* remap legacy vars so untouched legacy rules blend in */
    --cream:#E9EDF3; --cream-dark:#DCE3EC; --brown:#1B2A41; --brown-light:#4F5E76;
    --brown-dark:#1B2A41; --blue:#243F66; --blue-light:#E2E8F1; --blue-dark:#172A45;
    --text-primary:#1B2A41; --text-secondary:#1B2A41; --text-light:#34425C;

    --font-head:    'Syne', 'Hanken Grotesk', sans-serif;  /* distinctive display voice for big titles */
    --font-display: 'Hanken Grotesk', sans-serif;
    --font-body:    'Hanken Grotesk', sans-serif;
    --font-serif:   'Cormorant Garamond', Georgia, serif;
    --ease:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
    --maxw:    1280px;
    --gutter:  clamp(16px, 3vw, 40px);
    --nav-h:   72px;
    --side-w:  104px;   /* left rail width (desktop) */
}

/* ----------------------------- Base ------------------------------ */
html { scroll-behavior: smooth; font-size: 93.75%; } /* 15px base: tightens the overall scale so pages feel screen-sized, not zoomed-in */
body {
    background:
        radial-gradient(135% 90% at 100% 0%, rgba(36,63,102,0.075), transparent 56%),
        radial-gradient(120% 80% at 0% 100%, rgba(224,97,60,0.05), transparent 52%),
        radial-gradient(rgba(27,42,65,.05) 1px, transparent 1.3px),
        var(--paper);
    background-size: auto, auto, 15px 15px, auto;
    background-position: 0 0, 0 0, -2px -2px, 0 0;
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-body); font-weight: 400; line-height: 1.5;
    -webkit-font-smoothing: antialiased; letter-spacing: -0.005em;
}
body, body * { font-family: var(--font-body); }
::selection { background: var(--ink); color: var(--paper); }
::-moz-selection { background: var(--ink); color: var(--paper); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.025em; line-height: 1.04; font-weight: 700; }
.section-container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
img { display: block; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation-duration:.001ms!important; transition-duration:.001ms!important; scroll-behavior:auto!important; }
}

.custom-cursor { background: var(--ink); }
.custom-cursor.hover { background: var(--accent); }
.loader { background: var(--paper); }
.loader-logo { color: var(--ink); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; }

/* ============================== NAV ============================== */
.navbar { position: fixed; inset: 0 0 auto 0; z-index: 1000; padding: 0; background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); transition: box-shadow .4s var(--ease); }
.navbar.scrolled { box-shadow: 0 12px 32px -20px rgba(27,42,65,.45); }
.nav-container { max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo .logo-text { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.04em; color: var(--ink); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; font-size: .92rem; font-weight: 500; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: color .25s var(--ease), background .25s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after { content:''; position:absolute; left:14px; right:14px; bottom:3px; height:2px; background: var(--accent); border-radius:2px; transform: scaleX(0); transform-origin: center; transition: transform .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a { display: inline-flex; align-items: center; justify-content: center; }
.nav-ico { width: 20px; height: 20px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .88rem; font-weight: 600; transition: transform .25s var(--ease), background .25s var(--ease); }
.nav-cta:hover { background: var(--ink); transform: translateY(-1px); }
.nav-cta:hover .cta-arrow { transform: translate(2px,-2px); }
.nav-cta .cta-arrow { transition: transform .25s var(--ease); }
.lang-toggle { color: var(--ink-2); }
.lang-toggle:hover { background: rgba(19,20,24,.06); color: var(--ink); }
.lang-dropdown { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 44px -18px rgba(0,0,0,.3); }
.lang-option:hover { background: var(--paper-2); }
.mobile-menu-btn span { background: var(--ink); }
.mobile-menu { background: var(--paper); }
.mobile-menu-content a { color: var(--ink); font-family: var(--font-display); }
.mobile-cta { background: var(--ink) !important; color: var(--paper) !important; }

/* =================================================================
   HOMEPAGE — hybrid shell
   ================================================================= */
.home-shell {
    max-width: var(--maxw); margin: 0 auto; padding: calc(var(--nav-h) + 40px) var(--gutter) 40px;
    display: grid; grid-template-columns: minmax(0,1fr) clamp(320px, 30vw, 460px); gap: clamp(16px, 2vw, 28px);
    align-items: start;
}
.home-main { min-width: 0; }

/* ---- bio / experiences (sticky) ---- */
.home-bio { position: sticky; top: calc(var(--nav-h) + 40px); align-self: start; }
/* shared "depth box": translucent surface + dot texture + soft corner glows */
.bio-inner, #home-projects, .home-focus, .home-now, .depth-card,
.about-quick-facts, .skill-category, .resume-frame-wrapper,
.pub-list, .speak-list, .coursework, .edu-grid, .honors-grid {
    position: relative; overflow: hidden;
    border: 1px solid var(--line); border-radius: 20px;
    background-color: rgba(255,255,255,.72);
    background-image:
        radial-gradient(130% 90% at 96% 2%, rgba(224,97,60,.07), transparent 46%),
        radial-gradient(130% 90% at 2% 100%, rgba(52,64,110,.06), transparent 44%);
    background-size: auto, auto;
    background-position: 0 0, 0 0;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 1px 2px rgba(27,42,65,.05),
        0 30px 54px -36px rgba(27,42,65,.42);
    -webkit-backdrop-filter: blur(9px) saturate(118%); backdrop-filter: blur(9px) saturate(118%);
    transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s var(--ease);
}
/* subtle hover lift on the depth cards */
.bio-inner:hover, .home-now:hover, .home-focus:hover, .depth-card:hover,
.skill-category:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.95),
        0 2px 4px rgba(27,42,65,.06),
        0 40px 70px -40px rgba(27,42,65,.5);
}
/* internal padding so list rows don't touch the card edge */
.pub-list, .speak-list, .coursework { padding: clamp(6px, 1vw, 12px) clamp(18px, 2.2vw, 28px); }
.edu-grid, .honors-grid { padding: clamp(20px, 2.4vw, 30px); }
.about-quick-facts { padding: 4px clamp(18px, 2vw, 24px); }
/* drop the now-redundant row dividers at the card's top/bottom edges */
.pub-row:first-child { border-top: 0; }
.pub-row:last-child { border-bottom: 0; }
body[data-motion="off"] .bio-inner, body[data-motion="off"] .home-now,
body[data-motion="off"] .home-focus, body[data-motion="off"] .depth-card { transition: none; }
body[data-motion="off"] .bio-inner:hover, body[data-motion="off"] .home-now:hover,
body[data-motion="off"] .home-focus:hover, body[data-motion="off"] .depth-card:hover { transform: none; }
.bio-inner > *, .home-focus > *, .home-now > * { position: relative; z-index: 1; }
.bio-inner { display: flex; flex-direction: column; gap: 26px; padding: clamp(20px, 2.4vw, 30px); }
#home-projects { padding: clamp(2px, 0.6vw, 8px) clamp(18px, 2.2vw, 28px); }
.home-focus { padding: clamp(20px, 2.4vw, 30px); }
.proj-folder { position: relative; z-index: 1; }
/* "Right now" current-engagements card */
.home-now { padding: clamp(20px, 2.4vw, 28px); margin-bottom: clamp(16px, 2vw, 26px); }
.home-now .header-label { margin-bottom: 16px; }
.now-list { display: flex; flex-direction: column; }
.now-row { display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px); padding: 13px 0; border-top: 1px solid var(--line); }
.now-row:first-child { border-top: 0; }
.now-when { flex: none; width: clamp(92px, 11vw, 120px); color: var(--ink-3); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.now-what { display: flex; flex-direction: column; gap: 2px; }
.now-org { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 1.4vw, 1.2rem); letter-spacing: -0.02em; color: var(--ink); }
.now-detail { color: var(--ink-2); font-size: .95rem; }
.bio-photo { width: 100%; max-width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: center 26%; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 24px 50px -34px rgba(27,42,65,.5); opacity: 0; animation: bioPhotoIn .7s var(--ease) .1s forwards; }
@keyframes bioPhotoIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 1080px) { .bio-photo { max-width: 360px; } }
.bio-lead { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.3vw, 2.15rem); line-height: 1.12; letter-spacing: -0.03em; color: var(--ink); }
.bio-text { font-size: clamp(1.5rem, 2.3vw, 2.05rem); font-weight: 500; line-height: 1.16; letter-spacing: -0.025em; color: var(--ink); }
.bio-text.muted { color: var(--ink-2); }
.bio-pills { display: flex; flex-wrap: wrap; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: .95rem; font-weight: 600; color: var(--ink); transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.pill svg { width: 18px; height: 18px; }
.pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(224,97,60,.65); }
.bio-note { font-size: 1.02rem; color: var(--ink-2); font-weight: 500; }

/* bio quick facts */
.bio-facts { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.bio-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bio-fact .bf-label { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.bio-fact .bf-val { color: var(--ink); font-weight: 600; text-align: right; }
/* "right now" */
.bio-now { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.bio-now h3 { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-family: var(--font-body); }
.bio-now p { color: var(--ink-2); font-size: 1.02rem; line-height: 1.5; }

/* Homepage "What I do" — lives in the left column, fills the space by the bio */
.home-focus { margin-top: clamp(20px,2.5vw,32px); }
.home-focus .header-label { margin-bottom: 18px; }
.focus-grid { display: grid; grid-template-columns: 1fr; gap: clamp(12px,1.4vw,18px); }
/* colored generative-art boxes — same build as the project tiles, sized for copy */
.focus-card { --band: var(--ink); position: relative; overflow: hidden; border: 0; border-radius: 18px; min-height: 200px; padding: clamp(22px,2.4vw,30px) clamp(24px,2.6vw,32px); display: flex; flex-direction: column; justify-content: flex-end; background: var(--band); color: #fff;
    background-image: radial-gradient(rgba(255,255,255,.13) 1.3px, transparent 1.4px); background-size: 15px 15px; background-position: -4px -4px;
    transition: transform .55s var(--ease), box-shadow .55s var(--ease); will-change: transform; }
.focus-card .focus-art { position: absolute; inset: 0; z-index: 0; opacity: 1; transition: transform .8s var(--ease); }
.focus-card .focus-art .tile-art { position: absolute; inset: 0; width: 100%; height: 100%; }
/* tile-style legibility wash: only top + bottom, art stays crisp in the middle */
.focus-card::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(8,8,10,.22) 0%, rgba(8,8,10,0) 26%, rgba(8,8,10,0) 52%, rgba(8,8,10,.34) 100%); }
.focus-card:hover { transform: translateY(-5px); box-shadow: 0 36px 70px -38px rgba(27,42,65,.6); }
.focus-card:hover .focus-art { transform: scale(1.06); }
.focus-body { position: relative; z-index: 1; }
.focus-num { display: block; margin-bottom: 6px; font-family: var(--font-display); font-weight: 800; font-size: .78rem; color: rgba(255,255,255,.82); letter-spacing: .14em; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.focus-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem,2vw,1.85rem); letter-spacing: -0.025em; margin: 0 0 8px; color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,.35); }
.focus-text { color: rgba(255,255,255,.95); font-size: .98rem; line-height: 1.5; text-shadow: 0 1px 14px rgba(0,0,0,.3); max-width: 64ch; text-wrap: balance; }

/* Homepage closing CTA */
.home-cta { background: var(--ink); color: #fff; }
.home-cta .section-container { padding-top: clamp(56px,8vw,100px); padding-bottom: clamp(56px,8vw,100px); }
.home-cta-inner { max-width: 760px; }
.home-cta-title { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem,4.5vw,3.4rem); letter-spacing: -0.035em; line-height: 1.04; }
.home-cta-text { color: rgba(255,255,255,.85); font-size: clamp(1.05rem,1.6vw,1.3rem); margin-top: 16px; max-width: 52ch; }
.home-cta-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 15px 30px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; transition: transform .25s var(--ease), background .25s var(--ease); }
.home-cta-btn:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }

.bio-exp { border-top: 1px solid var(--line); padding-top: 18px; }
.bio-exp h3 { font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; font-family: var(--font-body); }
.exp-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.exp-row:last-child { border-bottom: none; }
.exp-row .exp-name { font-weight: 500; color: var(--ink); }
.exp-row .exp-name small { display:block; color: var(--ink-3); font-weight: 400; font-size: .85rem; }
.exp-row .exp-when { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- banded project tiles ---- */
.proj-band { margin-bottom: clamp(16px, 2vw, 26px); }
.proj-band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 4px 4px 12px; flex-wrap: wrap; }
.proj-band-head .band-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 1.6vw, 1.5rem); letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 12px; }
.proj-band-head .band-name::before { content:''; width: 11px; height: 11px; border-radius: 50%; background: var(--band, var(--ink)); }
.proj-band-head .band-meta { color: var(--ink-3); font-size: .92rem; font-weight: 500; }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.proj-grid.cols-1 { grid-template-columns: 1fr; }

.proj-tile {
    --band: var(--ink);
    position: relative; display: block; width: 100%; text-align: left;
    border-radius: 18px; overflow: hidden; aspect-ratio: 16/11;
    background: var(--band); color: #fff; cursor: pointer;
    transition: transform .55s var(--ease), box-shadow .55s var(--ease);
    will-change: transform;
}
.proj-tile:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -34px rgba(19,20,24,.55); }
.tile-media { position: absolute; inset: 0; overflow: hidden; background: var(--band); }
.tile-media img, .tile-media video { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; will-change: transform; }
/* lighter overlay only at top/bottom for text legibility (no flat dimming) */
.tile-media::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(8,8,10,.22) 0%, rgba(8,8,10,0) 22%, rgba(8,8,10,0) 70%, rgba(8,8,10,.18) 100%); }
.proj-tile.no-img .tile-media::after { background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, transparent 24%, transparent 72%, rgba(0,0,0,.14) 100%); }
/* Designed cover for image-less tiles: halftone texture + ghost monogram */
.proj-tile.no-img .tile-media {
    background-image: radial-gradient(rgba(255,255,255,.12) 1.3px, transparent 1.4px);
    background-size: 15px 15px; background-position: -4px -4px;
}
.proj-tile.no-img.dark-label .tile-media { background-image: radial-gradient(rgba(0,0,0,.10) 1.3px, transparent 1.4px); }
.tile-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-mono {
    position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
    font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em;
    font-size: clamp(4.5rem, 13vw, 9rem); line-height: 1; color: rgba(255,255,255,.17);
    transition: transform .6s var(--ease);
}
.proj-tile.dark-label .tile-mono { color: rgba(0,0,0,.16); }
.proj-tile:hover .tile-mono { transform: scale(1.06); }
.tile-head { position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: clamp(16px,1.6vw,22px); z-index: 2; }
.tile-tags { order: -1; text-align: left; font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.85); line-height: 1.3; text-shadow: 0 1px 12px rgba(0,0,0,.3); max-width: 100%; }
.tile-tags:empty { display: none; }
.tile-label { font-family: var(--font-display); font-weight: 700; font-size: clamp(.9rem, 1.05vw, 1.05rem); line-height: 1.18; letter-spacing: -0.015em; color: #fff; max-width: 100%; overflow-wrap: break-word; word-break: normal; hyphens: manual; text-wrap: balance; text-shadow: 0 1px 14px rgba(0,0,0,.3); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tile-cta { position: absolute; left: clamp(16px,1.6vw,22px); bottom: clamp(16px,1.6vw,22px); z-index:2; display:inline-flex; align-items:center; gap:8px; font-size:.85rem; font-weight:600; color:#fff; opacity:0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.proj-tile:hover .tile-cta { opacity:1; transform:none; }
.proj-tile.dark-label .tile-label, .proj-tile.dark-label .tile-tags, .proj-tile.dark-label .tile-cta { color: #131418; text-shadow:none; }

.home-empty { padding: 60px 24px; border: 1px dashed var(--line-strong); border-radius: 18px; color: var(--ink-3); text-align: center; }

/* ---- project overlay (case study) ---- */
.proj-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(15,16,19,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s var(--ease), visibility .4s var(--ease); padding: clamp(10px, 1.4vw, 20px); display: grid; }
.proj-overlay.open { pointer-events: auto; }
.proj-overlay.open { opacity: 1; visibility: visible; }
.po-bar { position: absolute; inset: clamp(18px,2.4vw,30px) clamp(18px,2.4vw,30px) auto auto; z-index: 4; pointer-events: none; }
.po-close { pointer-events: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92); color: #131418; display: grid; place-items: center; font-size: 1.4rem; transition: transform .25s var(--ease), background .25s var(--ease); box-shadow: 0 8px 24px -10px rgba(0,0,0,.5); }
.po-close:hover { transform: scale(1.08) rotate(90deg); background: #fff; }

/* "Next project" — lives on the card, animated */
.po-next-card { --next-band: var(--accent); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: clamp(30px,4vw,46px); padding: clamp(20px,2.4vw,28px) clamp(22px,2.6vw,30px); text-align: left; border-radius: 16px; cursor: pointer; color: #fff; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease); }
.po-panel.dark-label .po-next-card { color: #131418; background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.16); }
.po-next-card::before { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--next-band); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease); }
.po-next-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }
.po-panel.dark-label .po-next-card:hover { background: rgba(0,0,0,.1); border-color: rgba(0,0,0,.28); }
.po-next-card:hover::before { transform: scaleY(1); }
.po-next-meta { display: flex; align-items: center; gap: 10px; }
.po-next-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.po-next-org { font-size: .8rem; font-weight: 600; opacity: .8; display: inline-flex; align-items: center; gap: 8px; }
.po-next-org::before { content:''; width: 8px; height: 8px; border-radius: 50%; background: var(--next-band); }
.po-next-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.po-next-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem,2.4vw,1.9rem); letter-spacing: -0.025em; line-height: 1.05; transition: transform .4s var(--ease); }
.po-next-card:hover .po-next-title { transform: translateX(4px); }
.po-next-arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--next-band); color: #fff; transition: transform .4s var(--ease); }
.po-next-card:hover .po-next-arrow { transform: translateX(6px) rotate(-2deg); }
.po-next-arrow svg { transition: transform .4s var(--ease); }
.po-next-card:hover .po-next-arrow svg { animation: poNextNudge .8s var(--ease) infinite; }
@keyframes poNextNudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
.po-panel {
    --band: var(--ink);
    place-self: center; width: min(960px, 100%); max-height: 90vh; overflow: auto; border-radius: 22px;
    background: var(--band); color: #fff;
    box-shadow: 0 50px 110px -50px rgba(0,0,0,.7);
    transform: scale(.965) translateY(10px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.proj-overlay.open .po-panel { transform: none; opacity: 1; }
.po-panel.dark-label { color: #131418; }
.po-inner { max-width: 820px; margin: 0 auto; padding: clamp(40px,5vw,64px) clamp(26px,4vw,56px) clamp(40px,5vw,60px); }
.po-role { font-size: .9rem; font-weight: 600; opacity: .8; margin: 8px 0 0; }
.po-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px,4vw,60px); align-items: start; }
.po-grid--solo { grid-template-columns: 1fr; max-width: 780px; }
.po-panel .po-title, .po-panel h2, .po-panel h4 { color: inherit; }
.po-media { border-radius: 16px; overflow: hidden; background: rgba(0,0,0,.18); aspect-ratio: 4/3; }
.po-media img, .po-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.po-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem,3.4vw,3rem); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 18px; }
.po-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.po-tag { border: 1.5px solid currentColor; border-radius: 999px; padding: 5px 14px; font-size: .82rem; font-weight: 500; opacity: .9; }
.po-desc { font-size: 1.12rem; line-height: 1.5; opacity: .94; margin-bottom: 26px; }
.po-section { margin-top: 22px; }
.po-section h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; font-family: var(--font-body); font-weight: 600; }
.po-section p { font-size: 1.04rem; line-height: 1.55; opacity: .95; }
.po-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; border-bottom: 2px solid currentColor; padding-bottom: 3px; font-weight: 600; }
@media (max-width: 820px) { .po-grid { grid-template-columns: 1fr; } }

/* =================================================================
   SHARED SECTION PRIMITIVES (all pages)
   ================================================================= */
.header-label, .intro-label, .cta-label, .section-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; font-family: var(--font-body); }
.header-label .label-dot, .label-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.label-line { width: 34px; height: 1px; background: var(--line-strong); }
.header-title, .section-title, .page-title, .gallery-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.02; color: var(--ink); }
.section-title::after { display: none; }

/* ============================ FOOTER ============================ */
/* Bold dark editorial footer (matches overlay / case-study aesthetic) */
/* Footer removed — the side rail carries nav + contact */
.footer { display: none; }
.footer-legacy { background: var(--ink); color: var(--paper); border-top: none; padding: clamp(60px,9vw,120px) 0 34px; margin-top: clamp(40px,6vw,90px); }
.footer-main { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 46px; border-bottom: 1px solid rgba(255,255,255,.14); }
.footer-logo { font-family: var(--font-serif); font-weight: 600; font-size: 2rem; color: var(--paper); letter-spacing: .16em; }
.footer-tagline { color: var(--paper); font-family: var(--font-head); font-weight: 800; font-size: clamp(1.5rem,3.2vw,2.4rem); letter-spacing: -0.02em; line-height: 1.05; margin-top: 14px; max-width: 16ch; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: rgba(255,255,255,.66); font-weight: 500; transition: color .25s var(--ease); }
.footer-nav a:hover { color: var(--paper); }
.footer-social { display: flex; gap: 12px; }
.social-link { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.82); transition: all .25s var(--ease); }
.social-link:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); transform: translateY(-2px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 26px; gap: 20px; flex-wrap: wrap; }
.footer-copyright { color: rgba(255,255,255,.5); font-size: .88rem; }
.footer-name-large { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.8rem,7vw,4.8rem); color: rgba(255,255,255,.12); letter-spacing: .14em; line-height: .9; }

/* Header wordmark — clean bold NA (no dot) */
.nav-logo .logo-text { position: relative; }

/* Social (email + LinkedIn) — icons only, sit next to Contact */
.nav-social { display: flex; align-items: center; gap: 8px; }
.nav-soc { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-2); transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.nav-soc svg { width: 19px; height: 19px; }
.nav-soc:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); transform: translateY(-1px); }

/* ====================== PAGE HEADER (subpages) ================== */
.page-header { padding: calc(var(--nav-h) + 56px) 0 44px; background: color-mix(in srgb, var(--ink) 9%, var(--paper)); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-header .page-title, .page-header h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.8rem,8vw,5.6rem); letter-spacing: -0.025em; line-height: .98; }
.page-header .page-subtitle, .page-header p { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; margin-top: 12px; }
.page-bg-text { position: absolute; right: var(--gutter); top: 50%; bottom: auto; transform: translateY(-50%); max-width: 52%; overflow: hidden; white-space: nowrap; text-align: right; font-family: var(--font-head); font-weight: 800; font-size: clamp(2.4rem, 8vw, 6.5rem); line-height: .9; color: var(--line); letter-spacing: -0.03em; pointer-events: none; z-index: 0; }
@media (max-width: 720px) { .page-bg-text { display: none; } }
@media (max-width: 980px) { .cmdk-trigger-top { display: none; } }
.page-header .section-container { position: relative; z-index: 1; }

/* ====================== WORKS / GALLERIES ====================== */
.gallery-section { padding: clamp(40px,6vw,80px) 0; }
.gallery-alt { background: var(--paper-2); }
.gallery-header, .section-header { margin-bottom: 36px; }

.portfolio-org-block { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 16px; overflow: hidden; transition: box-shadow .3s var(--ease); }
.portfolio-org-block.expanded { box-shadow: 0 26px 64px -36px rgba(19,20,24,.45); }
.org-header { width: 100%; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 26px 28px; text-align: left; }
.org-name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.org-subtitle { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.org-role { color: var(--accent); font-weight: 600; font-size: .92rem; }
.org-years { color: var(--ink-3); font-size: .92rem; }
.org-desc { color: var(--ink-2); margin-top: 10px; max-width: 72ch; }
.org-meta { display: flex; align-items: center; gap: 14px; color: var(--ink-3); white-space: nowrap; }
.org-chevron { transition: transform .3s var(--ease); }
.portfolio-org-block.expanded .org-chevron { transform: rotate(180deg); }
.org-items { padding: 0 28px 28px; display: grid; grid-template-columns: repeat(auto-fill,minmax(290px,1fr)); gap: 18px; }
.portfolio-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.portfolio-item .item-image { aspect-ratio: 16/10; overflow: hidden; }
.portfolio-item .item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-content { padding: 18px; }
.item-header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.item-type { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.case-study-badge { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--paper); padding: 3px 8px; border-radius: 999px; }
.item-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; letter-spacing:-0.02em; }
.item-desc { color: var(--ink-2); font-size: .94rem; }
.item-date { display: block; color: var(--ink-3); font-size: .82rem; margin-top: 10px; }
.item-link, .case-study-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 600; color: var(--accent); }
.case-study-toggle svg { transition: transform .3s var(--ease); }
.case-study-toggle.expanded svg { transform: rotate(180deg); }
.case-study-content { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.case-study-section h5 { font-family: var(--font-display); font-size: .98rem; margin-bottom: 4px; }
.case-study-section p { color: var(--ink-2); font-size: .9rem; margin-bottom: 12px; }

.photography-gallery, .masonry-gallery, #photography-gallery { columns: 3 260px; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin-bottom: 16px; border-radius: 14px; overflow: hidden; position: relative; cursor: pointer; }
.gallery-item img { width: 100%; display: block; transition: transform .55s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(19,20,24,.3); opacity: 0; transition: opacity .3s var(--ease); }
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-zoom-icon { color: #fff; }
.gallery-empty, .skills-empty { padding: 48px; color: var(--ink-3); text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; }

#academics-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(330px,1fr)); gap: 18px; }
.academic-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.academic-image { aspect-ratio: 16/9; overflow: hidden; }
.academic-image img { width: 100%; height: 100%; object-fit: cover; }
.academic-content { padding: 22px; }
.academic-meta { display: flex; gap: 12px; color: var(--ink-3); font-size: .82rem; margin-bottom: 8px; }
.academic-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; letter-spacing:-0.02em; }
.academic-desc { color: var(--ink-2); font-size: .94rem; }
.academic-links { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.academic-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: .9rem; }
.works-cta, .cta-section { padding: clamp(60px,8vw,110px) 0; }

/* ========================== ABOUT PAGE ========================= */
.about-page { padding: clamp(40px,6vw,80px) 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(28px,5vw,64px); align-items: start; }
.about-image-col { width: 100%; max-width: 360px; }
.about-image-wrapper { position: relative; top: auto; width: 100%; border-radius: 18px; overflow: hidden; aspect-ratio: 4/5; border: 1px solid var(--line); box-shadow: 0 26px 56px -38px rgba(27,42,65,.5); }
.about-main-image { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: 0; transition: opacity .5s var(--ease); }
.about-main-image.loaded { opacity: 1; }
.about-image-frame { display: none; }
/* tidy facts card, same width as the photo */
.about-quick-facts { width: 100%; margin-top: clamp(24px, 3vw, 36px); display: block; }
.fact-item { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.fact-item:last-child { border-bottom: none; }
.fact-label { color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; flex: none; }
.fact-value { color: var(--ink); font-weight: 600; text-align: right; }
@media (max-width: 980px) { .about-grid { grid-template-columns: 1fr; } .about-image-col { max-width: 380px; } }
.about-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem,4vw,3rem); letter-spacing: -0.035em; }
.about-tagline { color: var(--accent); font-weight: 600; margin-top: 6px; }
.about-body { margin-top: 26px; max-width: 64ch; }
.about-body p { color: var(--ink-2); margin-bottom: 18px; font-size: 1.08rem; line-height: 1.65; }
.about-lead { font-size: 1.3rem !important; color: var(--ink) !important; font-weight: 500; }
.about-body strong { color: var(--ink); }
.about-divider { height: 1px; background: var(--line); margin: 26px 0; }
.about-quote { position: relative; padding: 0; margin: 32px 0; border: 0 !important; }
.about-quote p { color: var(--ink) !important; font-size: 1.2rem !important; font-style: italic; font-weight: 500; }
.quote-mark { display: none; }
.about-closing { font-size: 1.2rem; }
.about-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.about-cta-link { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; transition: transform .25s var(--ease), background .25s var(--ease); }
.about-cta-link.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.about-cta-link:hover { transform: translateY(-2px); }
.about-cta-link:not(.secondary):hover { background: var(--accent); }

.skills-section { padding: clamp(50px,7vw,90px) 0; background: var(--paper-2); }
#skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
@media (max-width: 900px) { #skills-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { #skills-grid { grid-template-columns: 1fr; } }
.skill-category { padding: 24px; }
.skill-category-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.skill-list { list-style: none; margin: 0; padding: 0; }
.skill-list li { position: relative; padding: 7px 0 7px 20px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.skill-list li::before { content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.skill-list li:last-child { border-bottom: none; }

.resume-section { padding: clamp(50px,7vw,90px) 0; }
.resume-frame-wrapper { overflow: hidden; }
#resumeFrame, .resume-frame { width: 100%; min-height: 78vh; border: none; background: var(--surface); display:block; }
.resume-actions { display: flex; margin-top: 20px; }
.resume-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
.resume-btn, .resume-btn span, .resume-btn svg { color: #fff; }
.resume-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(224,97,60,.7); }
.resume-btn.secondary, .resume-btn.secondary span, .resume-btn.secondary svg { background: transparent; color: var(--ink); }
.resume-btn.secondary { border-color: var(--ink); }
.resume-btn.secondary:hover, .resume-btn.secondary:hover span, .resume-btn.secondary:hover svg { background: var(--ink); color: #fff; border-color: var(--ink); }
.resume-cta { max-width: 620px; }
.resume-line { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.5; color: var(--ink); font-weight: 500; margin-bottom: 26px; }
.resume-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.timeline-section { padding: clamp(50px,7vw,90px) 0; }
#timeline, .timeline { position: relative; max-width: 780px; margin: 0 auto; padding-left: 28px; }
#timeline::before, .timeline::before { content:''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 0 0 34px 26px; }
.timeline-marker { position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); }
.timeline-date { font-size: .82rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.timeline-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 4px 0; letter-spacing:-0.02em; }
.timeline-org { color: var(--accent); font-weight: 600; font-size: .92rem; }
.timeline-desc { color: var(--ink-2); margin-top: 6px; }

/* ============================= BLOG =========================== */
.blog-posts-section { padding: clamp(40px,6vw,80px) 0; }
#blog-posts-grid, .posts-grid, .blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.blog-card, .post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.blog-card:hover, .post-card:hover { transform: translateY(-6px); box-shadow: 0 32px 64px -34px rgba(19,20,24,.45); }
.blog-card-image, .post-image { aspect-ratio: 16/9; overflow: hidden; }
.blog-card-image img, .post-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-content, .post-content { padding: 22px; }
.post-date, .blog-card-date { color: var(--ink-3); font-size: .82rem; }
.post-title, .blog-card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 8px 0; letter-spacing:-0.02em; }
.post-excerpt, .blog-card-excerpt { color: var(--ink-2); font-size: .94rem; }
.single-post-section { padding: 40px 0 80px; }

/* ============================ CONTACT ========================= */
.contact-section { padding: clamp(40px,6vw,80px) 0 90px; }
.contact-form input, .contact-form textarea, #contactForm input, #contactForm textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-family: var(--font-body); color: var(--ink); margin-bottom: 16px; font-size: 1rem; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.contact-form input:focus, .contact-form textarea:focus, #contactForm input:focus, #contactForm textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.submit-btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; transition: transform .3s var(--ease), background .3s var(--ease); }
.submit-btn:hover { background: var(--accent); transform: translateY(-2px); }

/* ============================ MISC ============================ */
.lightbox { background: rgba(15,16,19,.93); }
.lightbox-close, .lightbox-prev, .lightbox-next { color: #fff; }
.back-to-top { background: var(--ink); color: var(--paper); border-radius: 50%; }
.back-to-top:hover { background: var(--accent); }
.cta-section { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.cta-section .cta-content { text-align: center; position: relative; z-index: 2; }
.cta-section .cta-title, .cta-section h2 { color: var(--paper); font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem,6vw,4rem); letter-spacing: -0.035em; }
.cta-label { color: var(--accent); justify-content: center; }
.cta-button { display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; margin-top: 28px; transition: transform .3s var(--ease), background .3s var(--ease); }
.cta-button:hover { transform: translateY(-2px); background: var(--accent); color: #fff; }
.cta-bg-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-family: var(--font-display); font-weight: 800; font-size: 22vw; color: rgba(255,255,255,.05); letter-spacing: -0.04em; pointer-events: none; z-index: 1; white-space: nowrap; }

/* =================================================================
   MOTION
   ================================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; }
body[data-motion="off"] [data-reveal] { opacity: 1; transform: none; transition: none; }
[data-stagger] > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-stagger].in > * { opacity: 1; transform: none; }

/* Cinematic: tiles get scale+rise, media ken-burns parallax */
body[data-motion="cinematic"] .proj-tile { opacity: 0; transform: translateY(60px) scale(.94); transition: opacity .9s var(--ease), transform .9s var(--ease); }
body[data-motion="cinematic"] .proj-tile.in { opacity: 1; transform: none; }
body[data-motion="cinematic"] .bio-inner > * { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
body[data-motion="cinematic"] .bio-inner.in > * { opacity: 1; transform: none; }
body[data-motion="subtle"] .proj-tile, body[data-motion="off"] .proj-tile { opacity: 1 !important; transform: none; }

/* Folder-style project bands — collapsed by default, click to expand */
.proj-folder + .proj-folder { border-top: 1px solid var(--line); }
.folder-head { width:100%; display:flex; align-items:center; justify-content:space-between; gap:20px; padding: clamp(18px,2.3vw,30px) 4px; text-align:left; }
.folder-title { display:flex; align-items:center; gap:14px; font-family: var(--font-display); font-weight:700; font-size: clamp(1.25rem,2.3vw,1.95rem); letter-spacing:-0.02em; color: var(--ink); transition: color .3s var(--ease); }
.folder-title .dot { width:12px; height:12px; border-radius:50%; background: var(--band, var(--accent)); flex:none; }
.folder-meta { display:flex; align-items:center; gap:14px; color: var(--ink-3); font-size:.92rem; white-space:nowrap; }
.folder-chevron { transition: transform .35s var(--ease); }
.proj-folder.open .folder-chevron { transform: rotate(180deg); }
.proj-folder.open .folder-title, .folder-head:hover .folder-title { color: var(--band, var(--ink)); }
.folder-body[hidden] { display:none; }
.folder-body .proj-grid { padding: 2px 0 clamp(20px,2.6vw,34px); }
.motion-toggle { display: none !important; }

/* Motion toggle */
.motion-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 1500; display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: 0 16px 40px -20px rgba(0,0,0,.4); }
.motion-toggle .mt-label { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 0 8px 0 10px; }
.motion-toggle button { font-size: .78rem; font-weight: 600; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: all .25s var(--ease); }
.motion-toggle button.active { background: var(--ink); color: var(--paper); }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 1080px) {
    .home-shell { grid-template-columns: 1fr; }
    .home-bio { position: static; order: -1; margin-bottom: 12px; }
    .bio-inner { flex-direction: column; }
    .bio-lead, .bio-text { font-size: clamp(1.4rem, 4.5vw, 2rem); }
    .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-right { display: none; }
    .mobile-menu-btn { display: flex; }
    #blog-posts-grid, .posts-grid, .blog-grid { grid-template-columns: 1fr; }
    .photography-gallery, .masonry-gallery, #photography-gallery { columns: 2 200px; }
}
@media (max-width: 600px) {
    .proj-grid { grid-template-columns: 1fr; }
    .photography-gallery, .masonry-gallery, #photography-gallery { columns: 1; }
    .footer-main { flex-direction: column; }
    .motion-toggle .mt-label { display: none; }
}

/* ============== WORKS PAGE — grouped by organization ============== */
/* Distinct from the home page: open (not collapsed), indexed, two-column. */
.works-orgs { display: flex; flex-direction: column; }
.works-org { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 440px); gap: clamp(20px, 3vw, 48px); padding: clamp(26px, 3.5vw, 44px) 0; border-top: 1px solid var(--line); align-items: start; }
.works-org:last-child { border-bottom: 1px solid var(--line); }
.wo-head { display: flex; gap: 16px; position: sticky; top: calc(var(--nav-h) + 20px); }
.wo-index { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--band, var(--accent)); letter-spacing: .04em; padding-top: 4px; font-variant-numeric: tabular-nums; }
.wo-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -0.025em; line-height: 1.08; }
.wo-role { color: var(--ink-2); font-weight: 500; margin-top: 8px; font-size: .98rem; }
.wo-tags { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; align-items: center; }
.wo-band { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.wo-band .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--band, var(--accent)); }
.wo-years { color: var(--ink-3); font-size: .85rem; font-variant-numeric: tabular-nums; }
.wo-summary { color: var(--ink-2); font-size: .98rem; line-height: 1.6; margin-top: 16px; max-width: 46ch; }
.wo-grid { align-self: start; }
/* keep Works tiles compact, not full-column-width */
.wo-grid.proj-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.wo-grid.proj-grid.cols-1 { grid-template-columns: 1fr; }
.wo-grid .proj-tile { aspect-ratio: 4/3; }
@media (max-width: 860px) {
    .works-org { grid-template-columns: 1fr; gap: 18px; }
    .wo-head { position: static; }
}

/* ---- Works: simple sections (publications / honors / speaking / edu) ---- */
.works-list-section { padding: clamp(40px,6vw,80px) 0; }
.pub-list { display: flex; flex-direction: column; }
.pub-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 4px; border-top: 1px solid var(--line); transition: padding-left .3s var(--ease); }
.pub-row:last-child { border-bottom: 1px solid var(--line); }
.pub-row:hover { padding-left: 12px; }
.pub-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pub-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.05rem, 1.5vw, 1.3rem); letter-spacing: -0.02em; color: var(--ink); }
.pub-source { color: var(--ink-3); font-size: .9rem; }
.pub-arrow { color: var(--ink-3); flex: none; transition: color .25s var(--ease), transform .25s var(--ease); }
.pub-row:hover .pub-arrow { color: var(--accent); transform: translate(2px,-2px); }

.honors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(18px, 2.4vw, 34px); }
.honor-group-title { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-family: var(--font-body); }
.honor-list { list-style: none; margin: 0; padding: 0; }
.honor-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.honor-list li:first-child { border-top: none; }
.honor-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.015em; color: var(--ink); }
.honor-detail { display: block; color: var(--ink-2); font-size: .92rem; margin-top: 4px; line-height: 1.45; }

.speak-list { display: flex; flex-direction: column; max-width: 920px; }
.speak-row { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.speak-row:last-child { border-bottom: 1px solid var(--line); }
.speak-when { color: var(--ink-3); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: 2px; }
.speak-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.speak-role { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.speak-event { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; }
.speak-detail { color: var(--ink-2); font-size: .95rem; margin-top: 8px; line-height: 1.55; max-width: 70ch; }
@media (max-width: 600px) { .speak-row { grid-template-columns: 1fr; gap: 6px; } }

/* Education cards: clean surface, animated left accent on hover (no static bar) */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.edu-row { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px 30px; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease); }
.edu-row:hover { transform: translateY(-4px); box-shadow: 0 28px 60px -38px rgba(27,42,65,.4); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.edu-school { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; }
.edu-degree { color: var(--ink); font-weight: 600; margin-top: 10px; }
.edu-detail { color: var(--ink-2); margin-top: 4px; font-size: .95rem; line-height: 1.5; }
.edu-loc { display: inline-block; color: var(--ink-3); font-size: .78rem; margin-top: 14px; text-transform: uppercase; letter-spacing: .08em; }

/* ====================== ACADEMICS PAGE ====================== */
.academics-intro { padding: clamp(36px,4.5vw,60px) 0; background: color-mix(in srgb, var(--accent) 7%, var(--paper)); border-bottom: 1px solid var(--line); }
.academics-intro p { max-width: 66ch; font-size: clamp(1.1rem, 1.6vw, 1.38rem); line-height: 1.55; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.coursework { display: flex; flex-direction: column; gap: 14px; }
.term-block { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; }
.term-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.term-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px 20px; padding-top: 10px; }
.course-row { padding: 12px 14px; }
.course-top { display: flex; gap: 10px; align-items: flex-start; }
.course-code { font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--band, var(--accent)); font-variant-numeric: tabular-nums; flex: none; padding-top: 1px; }
.course-title { font-weight: 600; color: var(--ink); font-size: .98rem; letter-spacing: -0.01em; line-height: 1.3; }
.course-desc { color: var(--ink-2); font-size: .86rem; line-height: 1.5; margin-top: 6px; }
.term-block { --band: var(--accent); }

/* ===================== INTERACTION / MICROINTERACTIONS ===================== */
/* Works: each organization block warms slightly and its name takes the band color */
.works-org { border-radius: 16px; transition: background .4s var(--ease); }
.works-org:hover { background: color-mix(in srgb, var(--band, var(--accent)) 5%, transparent); }
.wo-name { transition: color .3s var(--ease); }
.works-org:hover .wo-name { color: var(--band, var(--accent)); }

/* Honors: rows nudge in and color on hover */
.honor-list li { transition: padding-left .3s var(--ease); }
.honor-list li:hover { padding-left: 9px; }
.honor-name { transition: color .3s var(--ease); }
.honor-list li:hover .honor-name { color: var(--accent); }

/* Speaking: same nudge */
.speak-row { transition: padding-left .3s var(--ease); }
.speak-row:hover { padding-left: 9px; }
.speak-event { transition: color .3s var(--ease); }
.speak-row:hover .speak-event { color: var(--accent); }

/* Coursework accordion (progressive disclosure for a long list) */
.term-block { --band: var(--accent); transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.term-block:hover { box-shadow: 0 22px 50px -40px rgba(27,42,65,.5); }
.term-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; padding: 2px 0 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; }
.term-head .term-title { margin: 0; padding: 0; border: none; }
.term-meta { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: .82rem; white-space: nowrap; }
.term-note { margin-right: auto; display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-family: var(--font-body); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.term-chevron { transition: transform .35s var(--ease); }
.term-block.open .term-chevron { transform: rotate(180deg); }
.term-body { overflow: hidden; }
.term-body[hidden] { display: none; }
.course-row { border-radius: 12px; transition: background .25s var(--ease); }
.course-row:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.course-title { transition: color .25s var(--ease); }
.course-row:hover .course-title { color: var(--accent); }

/* Course rows are buttons that open a detail modal */
.course-row { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.course-top { display: flex; align-items: flex-start; gap: 10px; }
.course-arrow { margin-left: auto; color: var(--ink-3); flex: none; transition: transform .25s var(--ease), color .25s var(--ease); }
.course-row:hover .course-arrow { color: var(--accent); transform: translateX(3px); }

/* Course detail modal */
.course-overlay { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: clamp(16px,4vw,40px); background: rgba(15,16,19,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s var(--ease), visibility .35s var(--ease); }
.course-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.course-modal { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 22px; padding: clamp(30px,4vw,46px); box-shadow: 0 40px 90px -40px rgba(0,0,0,.6); transform: translateY(12px) scale(.97); opacity: 0; transition: transform .4s var(--ease), opacity .4s var(--ease); }
.course-overlay.open .course-modal { transform: none; opacity: 1; }
.co-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); color: var(--ink); display: grid; place-items: center; font-size: 1.4rem; border: 0; cursor: pointer; transition: transform .25s var(--ease), background .25s var(--ease); }
.co-close:hover { transform: scale(1.08); background: var(--accent); color: #fff; }
.cm-term { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cm-code { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); margin-top: 14px; }
.cm-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem,3vw,2.1rem); letter-spacing: -0.03em; line-height: 1.06; margin: 6px 0 0; }
.cm-overview { color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; margin-top: 16px; }
.cm-skills-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 12px; font-family: var(--font-body); }
.cm-work { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.cm-work li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1rem; }
.cm-work li:last-child { border-bottom: none; }
.cm-work li::before { content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cm-skills { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.cm-skills li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1rem; font-weight: 500; }
.cm-skills li:last-child { border-bottom: none; }
.cm-skills li::before { content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }

/* ===================== DESKTOP LEFT SIDE RAIL ===================== */
@media (min-width: 981px) {
    body { padding-left: var(--side-w); }
    .navbar { box-sizing: border-box; inset: 0 auto 0 0; width: var(--side-w); height: 100vh; padding: 0; border-right: 1px solid var(--line); border-bottom: none; background: var(--surface); overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .navbar.scrolled { box-sizing: border-box; width: var(--side-w); padding: 0; box-shadow: 14px 0 30px -28px rgba(27,42,65,.4); }
    /* logo (top) · icons (centered, fill the middle) · contact (bottom) */
    .nav-container { box-sizing: border-box; width: var(--side-w); flex-direction: column; height: 100%; max-width: none; margin: 0; padding: 22px 12px; gap: 0; align-items: center; justify-content: flex-start; }
    .nav-logo { display: flex; justify-content: center; align-items: center; width: 100%; flex: none; }
    .nav-logo .logo-link { display: flex; justify-content: center; align-items: center; }
    .nav-logo .logo-text { font-size: 1.6rem; line-height: 1; }
    .nav-links { flex: 1 1 auto; flex-direction: column; gap: 8px; width: 100%; margin: 0; align-items: center; justify-content: center; }
    .nav-links a { width: 54px; height: 54px; padding: 0; display: grid; place-items: center; border-radius: 16px; color: var(--ink-2); position: relative; }
    .nav-links a .nav-ico { width: 25px; height: 25px; }
    .nav-links a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
    .nav-links a.active { background: var(--ink); color: #fff; }
    /* legacy uses ::after for an underline bar — kill it on the rail and put
       the tooltip on ::before so the two never merge into one broken box */
    .nav-links a::after { display: none !important; }
    .nav-links a[data-label]::before { content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; bottom: auto; right: auto; width: auto; height: auto; transform: translateY(-50%) translateX(-4px); background: var(--ink); color: #fff; padding: 6px 11px; border-radius: 8px; font-family: var(--font-body); font-size: .78rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 1100; box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
    .nav-links a[data-label]:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
    .nav-right { box-sizing: border-box; flex: none; flex-direction: column; gap: 10px; margin-top: 0; width: 100%; min-width: 0; align-items: center; }
    .language-selector { display: flex; justify-content: center; width: 100%; position: relative; }
    /* open to the right of the rail, not off the left edge */
    .lang-dropdown { top: auto; bottom: 0; left: calc(100% + 10px); right: auto; transform: none; min-width: 150px; z-index: 1200; box-shadow: 0 18px 44px -18px rgba(0,0,0,.35); }
    .nav-cta { box-sizing: border-box; display: flex; width: 100%; max-width: 100%; justify-content: center; align-items: center; gap: 0; padding: 12px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; border-radius: 14px; }
    .nav-cta .cta-text { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .nav-cta .cta-arrow { display: none; }

    /* rail: email + LinkedIn icons, centered just above Contact, with tooltips */
    .nav-social { width: 100%; justify-content: center; gap: 6px; margin-bottom: 2px; }
    .nav-soc { width: 42px; height: 42px; border-radius: 13px; color: var(--ink-2); }
    .nav-soc svg { width: 20px; height: 20px; }
    .nav-soc:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); transform: none; }
    .nav-soc[data-label]::before { content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(-4px); background: var(--ink); color: #fff; padding: 6px 11px; border-radius: 8px; font-family: var(--font-body); font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 1100; box-shadow: 0 10px 24px -10px rgba(0,0,0,.45); }
    .nav-soc[data-label]:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }

    /* search trigger sits directly under the NA logo */
    .cmdk-trigger-top { margin-top: 16px; flex: none; }

    /* No top bar on desktop -> pull content up */
    .home-shell { padding-top: 54px; }
    .home-bio { top: 54px; }
    .page-header { padding-top: 72px; }
    .scroll-indicator { display: none; }
}

/* ===================== Polish + accessibility ===================== */
/* Skip to content — hidden until keyboard-focused */
.skip-link { position: fixed; left: 16px; top: -64px; z-index: 3000; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); transition: top .25s var(--ease); }
.skip-link:focus { top: 16px; outline: none; }
[id="main"]:focus { outline: none; }

/* Visible keyboard focus everywhere; mouse/touch stays clean via :focus-visible */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, [tabindex]:focus-visible, .lang-option:focus-visible {
    outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px;
}

/* Animated underline for text links (footer + in-prose) */
.footer-nav a, .about-body a, .academics-intro a, .pub-title {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px; background-repeat: no-repeat; background-position: left 100%;
    transition: background-size .3s var(--ease), color .25s var(--ease);
    padding-bottom: 2px;
}
.footer-nav a:hover, .about-body a:hover, .academics-intro a:hover, a:hover > .pub-title { background-size: 100% 1.5px; }

/* Tactile press feedback on the main buttons */
.nav-cta:active, .about-cta-link:active, .resume-btn:active, .contact-submit:active,
.lang-toggle:active, .po-next-card:active { transform: translateY(0) scale(.97); }

/* Keep focus rings even when motion is reduced */
body[data-motion="off"] a:focus-visible, body[data-motion="off"] button:focus-visible { outline: 2.5px solid var(--accent); }

/* ===================== Creative features ===================== */
/* Band-reactive accent: smooth the recolor on the elements that use --accent */
.label-dot, .nav-cta, .nav-links a::after, .scroll-indicator,
.now-dot, .home-now .now-status i { transition: background-color .6s var(--ease), color .6s var(--ease); }

/* Bilingual greeting on the home bio */
.bio-greeting { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; color: var(--accent); margin: 0; min-height: 1.05em; transition: color .6s var(--ease); cursor: default; }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 4000; display: none; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; background: rgba(16,24,38,.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s var(--ease); }
.cmdk.open { display: flex; opacity: 1; }
.cmdk-panel { width: 100%; max-width: 540px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(16,24,38,.55); overflow: hidden; transform: translateY(-8px) scale(.99); transition: transform .18s var(--ease); }
.cmdk.open .cmdk-panel { transform: none; }
.cmdk-input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 18px 20px; font-family: var(--font-body); font-size: 1.02rem; color: var(--ink); outline: none; }
.cmdk-input::placeholder { color: var(--ink-3); }
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; }
.cmdk-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 11px; cursor: pointer; }
.cmdk-item.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cmdk-label { font-weight: 600; color: var(--ink); font-size: .96rem; }
.cmdk-kind { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cmdk-item.on .cmdk-kind { color: var(--accent); }
.cmdk-empty { padding: 18px 14px; color: var(--ink-3); font-size: .92rem; text-align: center; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .72rem; }
.cmdk-foot kbd { font-family: var(--font-body); background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 5px; padding: 1px 6px; margin-right: 3px; font-size: .7rem; }

/* Navbar search trigger (opens the command palette) */
.cmdk-trigger { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ===================== Running brand gradients ===================== */
:root { --grad-brand: linear-gradient(105deg, #E0613C 0%, #D2604E 20%, #B0496E 46%, #6E4E91 72%, #34406E 100%); }
@keyframes gradFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

/* Giant faded word on page headers -> flowing gradient text */
.page-bg-text { color: transparent; background: var(--grad-brand); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: .12; animation: gradFlow 16s linear infinite; }

/* Section dots flow through the palette */
.header-label .label-dot, .label-dot { background: var(--grad-brand); background-size: 300% 100%; animation: gradFlow 5s linear infinite; }

/* Primary buttons get a flowing gradient on hover */
.nav-cta, .about-cta-link:not(.secondary), .resume-btn, .contact-submit, .submit-btn, .po-next-card { background-size: 300% 100%; }
.nav-cta:hover, .about-cta-link:not(.secondary):hover, .resume-btn:hover, .contact-submit:hover, .submit-btn:hover {
    background-image: var(--grad-brand); color: #fff; animation: gradFlow 5s linear infinite;
}

/* Subtle moving wash inside page headers */
.page-header::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(115deg, transparent 32%, color-mix(in srgb, var(--accent) 9%, transparent) 50%, transparent 68%); background-size: 300% 100%; animation: gradFlow 11s linear infinite; }

/* Thin flowing accent rule under the home "now" + above the footer */
.home-now::after { content: ''; display: block; height: 2px; margin-top: clamp(18px,2.4vw,28px); border-radius: 2px; background: var(--grad-brand); background-size: 300% 100%; opacity: .7; animation: gradFlow 5s linear infinite; }

body[data-motion="off"] .page-bg-text,
body[data-motion="off"] .label-dot,
body[data-motion="off"] .page-header::after,
body[data-motion="off"] .home-now::after,
body[data-motion="off"] .nav-cta:hover,
body[data-motion="off"] .about-cta-link:hover { animation: none; }

/* ===================== Premium Works / Academics ===================== */
/* Reusable animated gradient border (sits on the rim, never over content) */
.gborder { position: relative; }
.gborder::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad-brand); background-size: 300% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .4; animation: gradFlow 8s linear infinite; transition: opacity .45s var(--ease); pointer-events: none; z-index: 2; }
.gborder:hover::before { opacity: 1; }

/* --- Works: institution groups (collapsible) --- */
.works-orgs { display: flex; flex-direction: column; gap: clamp(20px,2.6vw,30px); perspective: 1700px; }
.wo-group { display: block; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.55); padding: clamp(16px,1.9vw,24px) clamp(18px,2vw,26px); box-shadow: 0 26px 54px -44px rgba(27,42,65,.45); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); transition: box-shadow .4s var(--ease), border-color .3s var(--ease); }
.wo-group[open] { box-shadow: 0 32px 64px -46px rgba(27,42,65,.55); }
.wo-group:hover { border-color: var(--line-strong); }
.wo-group-head { display: flex; flex-direction: column; gap: 8px; padding: 0; cursor: pointer; list-style: none; transition: border-color .3s var(--ease); -webkit-tap-highlight-color: transparent; }
.wo-group[open] .wo-group-head { padding-bottom: clamp(12px,1.4vw,16px); border-bottom: 1px solid var(--line); }
.wo-group-head::-webkit-details-marker { display: none; }
.wo-group-head::marker { content: ''; }
.wo-group-top { display: flex; align-items: center; gap: 14px; }
.wo-group-head:hover .wo-group-title { color: var(--accent); }
.wo-group-head:hover .wo-group-chev { border-color: var(--accent); }
.wo-group-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); flex-shrink: 0; }
.wo-group-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad-brand); background-size: 300% 100%; animation: gradFlow 5s linear infinite; }
.wo-group-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem,2.4vw,2.15rem); letter-spacing: -.025em; color: var(--ink); line-height: 1; transition: color .3s var(--ease); }
.wo-group-count { margin-left: auto; font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wo-group-desc { margin: 0; max-width: 100ch; font-size: .92rem; line-height: 1.5; color: var(--ink-2); }
.wo-group-chev { width: 10px; height: 10px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translate(-2px,-2px); transition: transform .35s var(--ease), border-color .3s var(--ease); flex-shrink: 0; }
.wo-group[open] .wo-group-chev { transform: rotate(-135deg) translate(-2px,-2px); }
.wo-group-cards { display: flex; flex-direction: column; gap: clamp(16px,2vw,22px); perspective: 1700px; padding-top: clamp(16px,2vw,22px); }
.wo-group[open] .wo-group-cards { animation: woReveal .4s var(--ease); }
@keyframes woReveal { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
body[data-motion="off"] .wo-group[open] .wo-group-cards { animation: none; }

/* --- Works: Split-Diagonal + Floating-Layers org cards (driven by band color) --- */
.works-org {
  position: relative; display: block; overflow: hidden; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); min-height: 280px;
  transform-style: preserve-3d; transition: box-shadow .5s var(--ease), transform .14s var(--ease);
  will-change: transform;
}
.works-org:last-child { border-bottom: 1px solid var(--line); }
.works-org:hover { box-shadow: 0 56px 110px -56px color-mix(in srgb, var(--band) 62%, transparent); }
/* animated band rim that lights up on hover */
.works-org::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, color-mix(in srgb,var(--band) 85%,transparent), transparent 42%, color-mix(in srgb,var(--accent) 45%,transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5; transition: opacity .45s var(--ease); pointer-events: none; z-index: 6;
}
.works-org:hover::after { opacity: 1; }

/* left diagonal band zone */
.wo-stage {
  position: absolute; top: 0; left: 0; bottom: 0; width: 46%; z-index: 3;
  padding: clamp(26px,3vw,40px); padding-right: clamp(56px,6vw,86px); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background: linear-gradient(158deg, color-mix(in srgb, var(--band) 94%, #000) 0%, color-mix(in srgb, var(--band) 46%, #0c1830) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 66px) 100%, 0 100%);
  text-shadow: 0 1px 18px rgba(0,0,0,.20);
  transform-style: preserve-3d;
}
.wo-stage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
.wo-stage > * { position: relative; }
.wo-index {
  position: static; font-family: var(--font-display); font-weight: 900; padding: 0;
  font-size: clamp(2.3rem,3.8vw,3.4rem); line-height: .8; letter-spacing: .01em;
  color: rgba(255,255,255,.92); opacity: 1; font-variant-numeric: tabular-nums;
  transform: translateZ(22px);
}
.wo-id { transform: translateZ(38px); overflow-wrap: break-word; }
.wo-name { color: #fff; font-size: clamp(1.4rem,2.1vw,1.95rem); margin-top: 0; text-wrap: balance; }
.wo-role { color: rgba(255,255,255,.84); margin-top: 8px; }
.wo-years { display: block; margin-top: 12px; color: rgba(255,255,255,.78); font-size: .9rem; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.wo-tags { margin-top: 10px; }
.wo-band { color: rgba(255,255,255,.95); }
.wo-band .dot { background: #fff; }

/* right content zone */
.wo-body {
  margin-left: 43%; position: relative; z-index: 1; transform-style: preserve-3d;
  padding: clamp(28px,3vw,40px) clamp(26px,3vw,38px) clamp(28px,3vw,40px) clamp(48px,4.5vw,70px);
}
.wo-summary { color: var(--ink-2); margin: 0 0 22px; max-width: 50ch; transform: translateZ(14px); }
.wo-grid { transform-style: preserve-3d; }
.wo-grid.proj-grid { grid-template-columns: repeat(auto-fill, minmax(168px,1fr)); gap: 16px; }
.wo-grid.proj-grid.cols-1 { grid-template-columns: minmax(0,260px); }

/* floating project tiles — staggered depth + lift + cursor sheen */
.proj-tile { position: relative; transition: transform .3s var(--ease), box-shadow .35s var(--ease); }
.wo-grid .proj-tile:nth-child(3n+1) { transform: translateZ(30px); }
.wo-grid .proj-tile:nth-child(3n+2) { transform: translateZ(14px); }
.wo-grid .proj-tile:nth-child(3n+3) { transform: translateZ(44px); }
.wo-grid .proj-tile:hover { transform: translateZ(60px) scale(1.03); box-shadow: 0 42px 70px -32px color-mix(in srgb,var(--band) 78%, transparent); z-index: 4; }
.proj-tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease); background: radial-gradient(280px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.30), transparent 56%); mix-blend-mode: soft-light; }
.proj-tile:hover::after { opacity: 1; }

/* stack on narrow screens (no 3D / diagonal goes horizontal) */
@media (max-width: 820px) {
  .works-orgs, .wo-group-cards { perspective: none; }
  .works-org { min-height: 0; transform: none !important; }
  .wo-stage { position: relative; width: auto; transform: none; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), 0 100%); }
  .wo-stage .wo-index, .wo-stage .wo-id { transform: none; }
  .wo-body { margin-left: 0; transform: none; padding: 34px clamp(20px,5vw,30px) clamp(24px,5vw,34px); }
  .wo-body .wo-summary, .wo-grid .proj-tile { transform: none !important; }
}
body[data-motion="off"] .works-org { transform: none !important; }
body[data-motion="off"] .wo-stage .wo-index, body[data-motion="off"] .wo-id,
body[data-motion="off"] .wo-summary, body[data-motion="off"] .wo-grid .proj-tile { transform: none !important; }

/* --- Publication / speaking rows: animated accent bar + index --- */
.pub-row, .speak-row { position: relative; }
.pub-row::before { content: ''; position: absolute; left: 0; top: 50%; height: 0; width: 3px; border-radius: 3px; transform: translateY(-50%); background: var(--grad-brand); background-size: 300% 100%; transition: height .3s var(--ease); animation: gradFlow 5s linear infinite; }
.pub-row:hover::before { height: 64%; }
.pub-row:hover { padding-left: 18px; }
/* speaking rows: no hover spine/indent, and no divider above the first row */
.speak-row:first-child { border-top: 0; }

/* --- Academics: education cards --- */
.edu-row { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.edu-row::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s var(--ease); background: radial-gradient(440px circle at var(--mx,50%) var(--my,50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.edu-row:hover::after { opacity: 1; }
.edu-row:hover { box-shadow: 0 34px 70px -42px color-mix(in srgb, var(--accent) 55%, transparent); }

/* --- Academics: term accordions get a flowing accent spine + glow --- */
.term-block { position: relative; overflow: hidden; }
.term-block::before { content: ''; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 6px; border-radius: 999px; background: var(--grad-brand); background-size: 300% 100%; opacity: .55; animation: gradFlow 5s linear infinite; transition: opacity .4s var(--ease); }
.term-block:hover::before, .term-block.open::before { opacity: 1; }
.term-block::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s var(--ease); background: radial-gradient(280px circle at var(--mx,50%) var(--my,50%), color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%); }
.term-block:hover::after { opacity: 1; }
.term-head, .term-body { position: relative; z-index: 1; }
.course-row:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

body[data-motion="off"] .gborder::before, body[data-motion="off"] .works-org::before,
body[data-motion="off"] .pub-row::before, body[data-motion="off"] .term-block::before { animation: none; }
body[data-motion="off"] .proj-tile { transform: none !important; }
