/* Dynamic neuro theme: home page */
:root {
  --bg: #05070d; --bg2: #0a0f1c; --ink: #e3e9f4; --ink2: #9aa6bd; --ink3: #66728a;
  --line: rgba(160, 185, 235, 0.13); --line2: rgba(160, 185, 235, 0.24);
  --acc: #8fb4ff; --acc2: #5fe0a8;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(20px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.nh { margin: 0; background: var(--bg); color: var(--ink); font: 300 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.nh a { color: inherit; }
.nh-skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 50; }
.nh-skip:focus { left: 8px; }
.neuro-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.6; }
body.nh > main, body.nh > footer, body.nh > header, body.nh > section { position: relative; z-index: 1; }

/* nav */
.nh-nav { position: fixed !important; top: 0; left: 0; right: 0; z-index: 20 !important; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad); background: linear-gradient(to bottom, rgba(5,7,13,0.85), rgba(5,7,13,0)); backdrop-filter: blur(2px); }
.nh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 15px var(--sans); letter-spacing: 0.01em; white-space: nowrap; }
.nh-brand-mark { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(from 200deg, #ff5b6e, #5fe0a8, #6f8cff, #ff5b6e); box-shadow: 0 0 18px rgba(111,140,255,0.6); }
.nh-nav nav { display: flex; gap: clamp(12px, 2vw, 28px); flex-wrap: wrap; justify-content: flex-end; }
.nh-nav nav a { font: 400 13px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink2); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nh-nav nav a:hover, .nh-nav nav a:focus-visible { color: var(--ink); border-color: var(--acc); }
@media (max-width: 760px) { .nh-nav nav a:nth-child(-n+2) { display: none; } .nh-nav { padding-top: 14px; } .nh-nav nav { gap: 12px; } }
@media (max-width: 520px) { .nh-nav { flex-direction: column; align-items: flex-start; gap: 6px; } .nh-nav nav { justify-content: flex-start; } }

/* hero */
.nh-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px var(--pad) 110px; overflow: hidden;
  background: radial-gradient(60% 70% at 68% 48%, rgba(40,70,160,0.22), transparent 70%), radial-gradient(40% 40% at 15% 85%, rgba(95,224,168,0.06), transparent 70%); }
.nh-stage { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.6s ease; }
.nh-stage.is-ready { opacity: 1; }
.nh-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.nh-hero-copy { position: relative; z-index: 2; max-width: 640px; pointer-events: none; }
.nh-hero-copy a, .nh-hero-copy button { pointer-events: auto; }
.nh-kicker { display: flex; align-items: center; gap: 10px; font: 400 12.5px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink2); margin: 0 0 22px; }
.nh-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 0 0 rgba(95,224,168,0.6); animation: nhPulse 2.4s infinite; flex: none; }
@keyframes nhPulse { 70% { box-shadow: 0 0 0 10px rgba(95,224,168,0); } 100% { box-shadow: 0 0 0 0 rgba(95,224,168,0); } }
.nh-hero h1 { font: 400 clamp(52px, 8.4vw, 118px)/0.92 var(--serif); letter-spacing: -0.02em; margin: 0 0 26px; text-shadow: 0 2px 40px rgba(5,7,13,0.8); }
.nh-tagline { font: 300 clamp(19px, 2vw, 24px)/1.4 var(--sans); color: var(--ink); margin: 0 0 36px; max-width: 30ch; text-shadow: 0 1px 20px rgba(5,7,13,0.9); }
.nh-tagline span { display: block; margin-top: 10px; font: 400 13px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--acc); }
.nh-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.nh-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(10,15,28,0.55); backdrop-filter: blur(6px);
  font: 500 14px var(--sans); color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s, background .2s; }
.nh-btn:hover, .nh-btn:focus-visible { border-color: var(--acc); background: rgba(143,180,255,0.12); transform: translateY(-1px); }
.nh-btn-solid { background: var(--ink); color: var(--bg) !important; border-color: var(--ink); }
.nh-btn-solid:hover, .nh-btn-solid:focus-visible { background: #fff; color: var(--bg); }
.nh-btn-ghost { background: transparent; }
.nh-hero-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.nh-mode { display: flex; align-items: center; gap: 6px; font: 400 12px var(--mono); color: var(--ink3); text-transform: uppercase; letter-spacing: 0.08em; flex-wrap: wrap; }
.nh-mode span { margin-right: 6px; }
.nh-mode button { display: inline-flex; align-items: center; gap: 7px; font: inherit; color: var(--ink2); background: rgba(10,15,28,0.5); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: all .2s; }
.nh-mode button[aria-pressed="true"] { color: var(--ink); border-color: var(--line2); background: rgba(143,180,255,0.1); }
.nh-sw { width: 14px; height: 6px; border-radius: 3px; }
.nh-sw-dec { background: linear-gradient(90deg, #ff4d5e, #3fe07a, #4d7dff); }
.nh-sw-net { background: linear-gradient(90deg, #5fe0a8, #f2a65a, #7aa2ff, #e86a8a, #c49bff); }
.nh-legend { list-style: none; margin: 0 0 0 8px; padding: 0; display: none; gap: 12px; flex-wrap: wrap; }
body[data-fibre-mode="family"] .nh-legend { display: flex; }
.nh-legend li { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); text-transform: none; letter-spacing: 0.02em; }
.nh-legend li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.nh-scroll { width: 26px; height: 42px; border: 1px solid var(--line2); border-radius: 14px; display: flex; justify-content: center; padding-top: 8px; flex: none; }
.nh-scroll span { width: 3px; height: 8px; border-radius: 2px; background: var(--ink2); animation: nhScroll 2s infinite; }
@keyframes nhScroll { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 900px) {
  .nh-hero { justify-content: flex-end; padding-bottom: 130px; }
  .nh-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72%; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, rgba(5,7,13,0.97) 55%, rgba(5,7,13,0)); }
  .nh-kicker { font-size: 11.5px; }
  .nh-hero-copy { max-width: none; }
  .nh-scroll { display: none; }
}

/* sections */
.nh-section { padding: clamp(80px, 12vh, 140px) var(--pad); max-width: 1320px; margin: 0 auto; }
.nh-label { font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--acc); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.nh-label::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.7; }
.nh-h2 { font: 400 clamp(32px, 4.2vw, 56px)/1.05 var(--serif); letter-spacing: -0.01em; margin: 0 0 48px; max-width: 22ch; }
.nh-h2 em { color: var(--ink2); }

/* about */
.nh-about { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.nh-avatar { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line2); filter: saturate(0.9) contrast(1.02);
  box-shadow: 0 0 0 8px rgba(143,180,255,0.04), 0 0 80px rgba(80,120,255,0.18); }
.nh-social { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nh-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink2); text-decoration: none; font-size: 17px; transition: all .2s; }
.nh-social a:hover, .nh-social a:focus-visible { color: var(--ink); border-color: var(--acc); background: rgba(143,180,255,0.1); }
.nh-prose p { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; color: var(--ink); margin: 0 0 1em; max-width: 62ch; }
.nh-prose p:first-child::first-line { color: #fff; }
.nh-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.nh-stats div { padding: 22px 36px 0 0; margin-right: 36px; }
.nh-stats dt { font: 400 44px/1 var(--serif); color: #fff; }
.nh-stats dd { margin: 8px 0 0; font: 400 12px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink3); }
@media (max-width: 760px) { .nh-about { grid-template-columns: 1fr; } .nh-about-id { max-width: 220px; } .nh-social { justify-content: flex-start; } }

/* research themes */
.nh-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.nh-theme { position: relative; overflow: hidden; isolation: isolate; padding: 28px 26px 26px; min-height: 340px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(170deg, rgba(14,20,36,0.85), rgba(7,10,18,0.9)); transition: border-color .3s, transform .3s; }
.nh-theme:hover { border-color: color-mix(in srgb, var(--hue) 55%, transparent); transform: translateY(-3px); }
.nh-theme-flow, .nh-theme-video { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.nh-theme-video { opacity: 0.45; }
.nh-theme-flow { opacity: 0.5; background:
  radial-gradient(120% 60% at 110% -10%, color-mix(in srgb, var(--hue) 45%, transparent), transparent 60%),
  repeating-radial-gradient(140% 90% at 120% -20%, transparent 0 14px, color-mix(in srgb, var(--hue) 22%, transparent) 15px, transparent 16px);
  background-size: 100% 100%, 100% 100%; animation: nhFlow 14s ease-in-out infinite alternate; }
.nh-theme:nth-child(2) .nh-theme-flow { animation-delay: -4s; } .nh-theme:nth-child(3) .nh-theme-flow { animation-delay: -8s; } .nh-theme:nth-child(4) .nh-theme-flow { animation-delay: -11s; }
@keyframes nhFlow { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.15) translate(-4%, 5%); } }
.nh-theme::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6,9,16,0.95) 30%, rgba(6,9,16,0.2)); }
.nh-theme-idx { font: 400 13px var(--mono); color: var(--hue); }
.nh-theme h3 { font: 400 30px/1.05 var(--serif); margin: 84px 0 12px; }
.nh-tags { margin-top: auto !important; }
.nh-theme p { margin: 0 0 18px; color: var(--ink2); font-size: 15.5px; line-height: 1.55; }
.nh-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.nh-tags li { font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }

/* cinematic loop */
.nh-loop { position: relative; margin: 0 auto; max-width: 1320px; padding: 0 var(--pad); }
.nh-loop video { width: 100%; display: block; border-radius: 18px; border: 1px solid var(--line); background: #000; aspect-ratio: 21/9; object-fit: cover; }
.nh-loop p { font: 400 12px var(--mono); color: var(--ink3); text-transform: uppercase; letter-spacing: 0.08em; margin: 12px 0 0; }

/* publications */
.nh-pubs { list-style: none; padding: 0; margin: 0 0 36px; border-top: 1px solid var(--line); }
.nh-pubs li { border-bottom: 1px solid var(--line); }
.nh-pubs a { display: grid; grid-template-columns: 220px 1fr; column-gap: 32px; row-gap: 6px; padding: 26px 0; text-decoration: none; transition: background .25s, padding .25s; }
.nh-pubs a:hover, .nh-pubs a:focus-visible { background: linear-gradient(90deg, rgba(143,180,255,0.07), transparent); padding-left: 14px; }
.nh-pub-meta { font: 400 12px/1.6 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc); grid-row: span 2; }
.nh-pub-title { font: 400 clamp(21px, 2vw, 26px)/1.2 var(--serif); color: var(--ink); }
.nh-pub-auth { font-size: 14px; color: var(--ink3); }
.nh-pub-auth b { color: var(--ink2); font-weight: 500; }
@media (max-width: 700px) { .nh-pubs a { grid-template-columns: 1fr; } .nh-pub-meta { grid-row: auto; } }

.nh-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 40px var(--pad); border-top: 1px solid var(--line); font: 400 12px var(--mono); color: var(--ink3); text-transform: uppercase; letter-spacing: 0.06em; }
.nh-foot p { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
