/* Self-hosted fonts (SIL Open Font License): Inter and Fraunces, latin + latin-ext subsets. */
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/fraunces-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/fraunces-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/fraunces-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("assets/fonts/fraunces-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/inter-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/inter-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Metric-matched fallback so text does not shift while Inter loads. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"); ascent-override: 90.49%; descent-override: 22.56%; line-gap-override: 0%; size-adjust: 107.06%; }

:root {
  --bg: #f6f8fc;
  --bg-dark: #050b1f;
  --nav: #050b1f;
  --surface: #ffffff;
  --surface-dark: #0c1733;
  --ink: #0b1430;
  --ink-soft: #46536f;
  --ink-dark: #e8eeff;
  --ink-dark-soft: #9fb0d6;
  --line: #d9e0ee;
  --line-dark: #1d2b52;
  --accent: #2456e8;
  --accent-glow: #5ee6ff;
  --radius: 14px;
  --maxw: 1120px;
  --gutter: max(16px, calc((100% - var(--maxw)) / 2));
  --nav-h: 64px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); scrollbar-gutter: stable; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* NAV: fixed in place, solid background */
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav); color: var(--ink-dark); border-bottom: 1px solid var(--line-dark); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--nav-h); padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; color: var(--accent-glow); flex: none; }
.tabs { display: flex; gap: 4px; }
.tabs > li { position: relative; }
.tabs a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--ink-dark-soft); text-decoration: none; font-size: 0.93rem; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.tabs a[aria-current="page"] { color: #04122e; background: var(--accent-glow); }
.has-menu > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.menu { position: absolute; right: 0; top: 100%; min-width: 230px; padding: 8px; margin-top: 6px; background: var(--surface-dark); border: 1px solid var(--line-dark); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { border-radius: 8px; color: var(--ink-dark); }
.menu small { display: block; font-size: 0.78rem; color: var(--ink-dark-soft); }

/* PAGE HEAD */
.page-head { background: radial-gradient(1000px 500px at 80% 0%, #0c2a7a 0%, transparent 60%), var(--bg-dark); color: var(--ink-dark); padding: 72px var(--gutter) 64px; }
.page-head .lead { max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.page-head .eyebrow, .hero .eyebrow, .dark .eyebrow { color: var(--accent-glow); }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-dark-soft); margin: 20px 0 0; }

/* HERO (The idea) */
.hero { background: radial-gradient(1200px 600px at 75% 30%, #0c2a7a 0%, transparent 60%), var(--bg-dark); color: var(--ink-dark); display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 72px var(--gutter) 88px; overflow: hidden; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
.hero h1 em { font-style: italic; color: var(--accent-glow); text-shadow: 0 0 40px rgba(94, 230, 255, 0.45); }
.hero .lead { max-width: 36ch; margin-bottom: 28px; }
.hero-media { margin: 0; }
.hero-media img { border-radius: 22px; box-shadow: 0 0 0 1px var(--line-dark), 0 30px 80px rgba(36, 86, 232, 0.35); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 12px; }
.hero-media figcaption, .dark figcaption { color: var(--ink-dark-soft); }
.src { display: block; opacity: 0.8; margin-top: 2px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; border: 1px solid currentColor; text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink-dark); transition: transform 0.15s, background 0.15s; }
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.08); }
.btn.primary { background: var(--accent-glow); color: #04122e; border-color: var(--accent-glow); }
.btn.primary:hover { background: #8df0ff; }
.section:not(.dark) .btn:not(.primary) { color: var(--ink); }
.section:not(.dark) .btn:not(.primary):hover { background: rgba(11, 20, 48, 0.05); }

/* SECTIONS */
.section { padding: 88px var(--gutter); }
.section.dark { background: var(--bg-dark); color: var(--ink-dark); }
.section.tight { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head .sub { color: var(--ink-soft); font-size: 1.1rem; margin-top: 16px; }
.dark .section-head .sub { color: var(--ink-dark-soft); }
.two { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.prose p { font-size: 1.08rem; color: var(--ink-soft); }
.dark .prose p { color: var(--ink-dark-soft); }
.prose strong { color: var(--ink); }
.dark .prose strong { color: #fff; }
.prose .big { font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.45; color: var(--ink); }
.note { font-size: 0.92rem; font-style: italic; color: var(--ink-soft); }

.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.next p { margin: 0; font-family: var(--serif); font-size: 1.3rem; }

/* ORIGINS timeline */
.timeline { position: relative; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--accent-glow)); opacity: 0.5; }
.timeline > li { position: relative; padding-left: 44px; padding-bottom: 56px; }
.timeline > li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline > li.erc::before { background: var(--accent-glow); border-color: var(--accent-glow); box-shadow: 0 0 0 6px rgba(94, 230, 255, 0.25); }
.year { font-family: var(--serif); font-size: 1rem; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; }
.timeline h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 6px 0 4px; }
.venue { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 16px; }
.timeline p { font-size: 1.05rem; color: var(--ink-soft); }
.timeline strong { color: var(--ink); }
.questions { margin: 4px 0 18px; padding-left: 0; }
.questions li { position: relative; padding-left: 22px; color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.08rem; margin-bottom: 6px; }
.questions li::before { content: "?"; position: absolute; left: 0; font-style: normal; font-weight: 600; color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.links a { font-size: 0.86rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.timeline figure { margin: 22px 0 0; }
.timeline figure img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.erc-card { background: var(--bg-dark); color: var(--ink-dark); border-radius: var(--radius); padding: 28px; }
.erc-card h3 { color: #fff; }
.erc-card p { color: var(--ink-dark-soft); }

/* PUBLICATIONS */
.scholar { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
.panel p { color: var(--ink-soft); }
.searchbox { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 1.05rem; }
.searchbox svg { width: 20px; height: 20px; color: var(--ink-soft); flex: none; }
.searchbox kbd { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.pub { background: var(--surface-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 32px; }
.pub-meta { color: var(--accent-glow); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
.pub h3 { font-size: clamp(1.4rem, 3vw, 2rem); color: #fff; }
.authors { color: var(--ink-dark-soft); margin: 10px 0 22px; }
.pub-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* PRESS */
.outlets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.outlet { display: flex; flex-direction: column; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
a.outlet:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(36, 86, 232, 0.12); }
.logo { display: flex; align-items: center; height: 44px; }
.logo img { max-height: 44px; width: auto; }
.logo img[src*="nrc"] { height: 32px; }
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; }
.wordmark.bbc { display: flex; gap: 4px; }
.wordmark.bbc span { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: #fff; font-size: 1.15rem; }
.outlet h3 { font-size: 1.1rem; line-height: 1.35; }
.outlet .more { margin-top: auto; font-size: 0.88rem; font-weight: 600; color: var(--accent); }
.outlet.pending { border-style: dashed; }
.outlet.pending .more { color: var(--ink-soft); font-weight: 500; font-style: italic; }

.news li { display: grid; grid-template-columns: 92px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.news li:first-child { border-top: 1px solid var(--line); }
.news time { font-family: var(--serif); font-weight: 600; color: var(--accent); letter-spacing: 0.04em; padding-top: 2px; }
.news h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
.news h3 a { color: var(--ink); text-decoration: none; }
.news h3 a:hover { color: var(--accent); text-decoration: underline; }
.news .links { margin-top: 10px; }
.news .links a { font-size: 0.8rem; padding: 5px 12px; }
.archive { display: inline-block; margin-top: 28px; font-weight: 600; }

/* TEAM */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.subnav a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-dark); color: var(--ink-dark); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.subnav a:hover { border-color: var(--accent-glow); color: var(--accent-glow); }
.group { padding-top: 8px; margin-bottom: 64px; }
.group:last-child { margin-bottom: 0; }
.group > h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 20px; }
.pi-card { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.pi-card img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.pi-card h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.role { color: var(--accent); font-size: 0.92rem; font-weight: 600; margin: 6px 0 16px; }
.pi-card p:not(.role) { color: var(--ink-soft); }
.placeholder { display: flex; align-items: center; gap: 16px; padding: 28px 32px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); background: var(--surface); }
.placeholder::before { content: ""; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--bg); border: 1px dashed var(--line); }
.placeholder p { margin: 0; }
.placeholder strong { display: block; color: var(--ink); font-size: 1.02rem; }

/* FOOTER */
.footer { background: #030716; color: var(--ink-dark-soft); padding: 48px var(--gutter); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.footer strong { color: #fff; }
.footer a { color: var(--ink-dark); }
.footer-logo { display: block; flex: none; align-self: center; }
.footer-logo img { height: 40px; width: auto; }
.fine { font-size: 0.8rem; max-width: 80ch; margin-bottom: 0.6em; }

:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 3px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --nav-h: 104px; }
  .nav-inner { flex-direction: column; align-items: stretch; gap: 4px; padding-top: 10px; padding-bottom: 6px; }
  .nav nav { margin: 0 calc(-1 * var(--gutter)); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
  .nav nav::-webkit-scrollbar { display: none; }
  .tabs { padding: 0 calc(var(--gutter) + 20px) 0 var(--gutter); width: max-content; }
  .tabs a { padding: 8px 12px; font-size: 0.9rem; }
  .menu { display: none; }
  .has-menu > a::after { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-media { max-width: 420px; }
  .two, .scholar, .outlets { grid-template-columns: 1fr; }
  .two { gap: 24px; }
  .pi-card { grid-template-columns: 1fr; }
  .pi-card img { max-width: 220px; }
  .section { padding-block: 64px; }
  .page-head { padding-block: 52px 48px; }
}

@media (max-width: 520px) {
  .news li { grid-template-columns: 1fr; gap: 6px; }
  .timeline > li { padding-left: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
