:root {
  --bg: #071013;
  --bg-deep: #030708;
  --surface: rgba(10, 24, 28, 0.72);
  --surface-strong: rgba(10, 24, 28, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --text: #e7f4ef;
  --text-soft: #a8bdb7;
  --text-faint: #748b86;
  --line: rgba(191, 241, 222, 0.16);
  --line-strong: rgba(191, 241, 222, 0.34);
  --accent: #79f2c0;
  --accent-2: #64b5f6;
  --accent-3: #ed9cff;
  --danger: #ff998f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --reading: 760px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --nav-height: 76px;
  --canvas-opacity: 0.9;
  --content-blur: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  --bg: #edf5f1;
  --bg-deep: #dce9e3;
  --surface: rgba(246, 251, 248, 0.76);
  --surface-strong: rgba(249, 252, 250, 0.95);
  --surface-soft: rgba(5, 35, 28, 0.045);
  --text: #0b2420;
  --text-soft: #36534d;
  --text-faint: #627a74;
  --line: rgba(15, 70, 56, 0.14);
  --line-strong: rgba(15, 70, 56, 0.28);
  --accent: #087d5d;
  --accent-2: #1769aa;
  --accent-3: #8a3fa0;
  --danger: #a3332e;
  --shadow: 0 24px 70px rgba(19, 49, 41, 0.13);
  --canvas-opacity: 0.48;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% -10%, rgba(121, 242, 192, 0.09), transparent 30rem),
    radial-gradient(circle at 95% 15%, rgba(100, 181, 246, 0.07), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 300ms ease, color 300ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  color: var(--bg-deep);
  background: var(--accent);
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

#cortex-canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  opacity: var(--canvas-opacity);
  pointer-events: none;
}

.cortex-vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 7, 8, 0.66), transparent 16%, transparent 84%, rgba(3, 7, 8, 0.66)),
    linear-gradient(180deg, rgba(3, 7, 8, 0.38), transparent 30%, rgba(3, 7, 8, 0.56));
}

html[data-theme="light"] .cortex-vignette {
  background:
    linear-gradient(90deg, rgba(237, 245, 241, 0.78), transparent 18%, transparent 82%, rgba(237, 245, 241, 0.78)),
    linear-gradient(180deg, rgba(237, 245, 241, 0.5), transparent 34%, rgba(237, 245, 241, 0.62));
}

.page-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 16px rgba(121, 242, 192, 0.5);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--bg-deep);
  background: var(--accent);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.2);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  height: 100%;
  margin: 0 auto;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--accent) 5%, transparent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.brand-copy span {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 66%, transparent);
  backdrop-filter: blur(14px);
}

.nav-link {
  position: relative;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-soft);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 4px;
  left: 12px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.menu-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-soft);
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.icon-button:hover,
.menu-button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-soft));
}

#motion-toggle[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-soft));
}

.icon-button svg,
.menu-button svg {
  width: 17px;
  height: 17px;
}

.menu-button {
  display: none;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.page-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.page-hero {
  min-height: min(900px, 100svh);
  display: grid;
  align-items: center;
  padding: calc(var(--nav-height) + 72px) 0 80px;
}

.page-hero.compact {
  min-height: 58svh;
  padding-bottom: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(48px, 9vw, 120px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.display-title {
  max-width: 980px;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
}

.display-title .accent-word {
  color: var(--accent);
  font-style: italic;
  text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 24%, transparent);
}

.page-title {
  max-width: 920px;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.hero-intro,
.page-intro {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms var(--ease), border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.button.primary {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  color: var(--bg-deep);
  background: var(--accent);
}

.button.ghost {
  background: transparent;
}

.button svg {
  width: 16px;
  height: 16px;
}

.hero-aside {
  display: grid;
  gap: 18px;
}

.signal-card,
.glass-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 70%, transparent));
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur)) saturate(1.1);
}

.signal-card {
  position: relative;
  min-height: 340px;
  padding: 26px;
  overflow: hidden;
}

.signal-card::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px color-mix(in srgb, var(--accent) 3%, transparent),
    0 0 0 56px color-mix(in srgb, var(--accent-2) 2%, transparent);
}

.signal-card h2 {
  position: relative;
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signal-card p {
  position: relative;
  max-width: 29ch;
  margin: 14px 0 0;
  color: var(--text-soft);
}

.signal-trace {
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  overflow: hidden;
  opacity: 0.8;
}

.signal-trace svg {
  width: 100%;
  height: 100%;
}

.signal-trace path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent));
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: trace 3.5s var(--ease) infinite;
}

@keyframes trace {
  0% { stroke-dashoffset: 520; opacity: 0; }
  18% { opacity: 1; }
  75%, 100% { stroke-dashoffset: -520; opacity: 0.2; }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--line);
}

.metric {
  min-height: 110px;
  padding: 18px;
  background: var(--surface-strong);
}

.metric strong {
  display: block;
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.35;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.55); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.section {
  position: relative;
  padding: clamp(86px, 12vw, 160px) 0;
}

.section-tight {
  padding: 72px 0;
}

.section-header {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 52px;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  max-width: 780px;
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.section-copy {
  max-width: 710px;
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 18px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.theme-card {
  position: relative;
  min-height: 360px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 68%, transparent));
  backdrop-filter: blur(var(--content-blur));
  overflow: hidden;
  transition: transform 250ms var(--ease), border-color 250ms ease, background 250ms ease;
}

.theme-card:hover {
  transform: translateY(-8px);
  border-color: var(--line-strong);
}

.theme-card::after {
  content: attr(data-number);
  position: absolute;
  right: 22px;
  bottom: -18px;
  color: color-mix(in srgb, var(--accent) 12%, transparent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 132px;
  line-height: 1;
  pointer-events: none;
}

.theme-card h3 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 22px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.12;
}

.theme-card p {
  position: relative;
  z-index: 1;
  color: var(--text-soft);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--accent);
  background: var(--surface-soft);
}

.card-icon svg {
  width: 25px;
  height: 25px;
}

.tag-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.principles {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 72px 0.7fr 1.3fr;
  gap: 26px;
  align-items: baseline;
  padding: 30px;
  background: var(--surface-strong);
}

.principle-index {
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 28px;
}

.principle h3 {
  margin: 0;
  font-size: 18px;
}

.principle p {
  margin: 0;
  color: var(--text-soft);
}

.publication-list {
  display: grid;
  gap: 14px;
}

.publication-card {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  min-height: 180px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(var(--content-blur));
  overflow: hidden;
  transition: transform 220ms var(--ease), border-color 220ms ease, background 220ms ease;
}

.publication-card:hover {
  transform: translateX(7px);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}

.publication-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 300ms var(--ease);
}

.publication-card:hover::after {
  transform: scaleX(1);
}

.publication-year {
  align-self: start;
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.publication-type {
  margin: 0 0 9px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 780px;
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(22px, 2.7vw, 34px);
  font-weight: 500;
  line-height: 1.16;
}

.publication-venue {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.card-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: transform 220ms var(--ease), background 220ms ease;
}

.publication-card:hover .card-arrow {
  transform: rotate(-35deg);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.placeholder-badge {
  display: inline-flex;
  margin-top: 14px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: 999px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-panel {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur));
}

.content-panel + .content-panel {
  margin-top: 20px;
}

.content-panel h2,
.content-panel h3 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-weight: 500;
}

.content-panel h2 {
  margin: 0 0 20px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.025em;
}

.content-panel h3 {
  margin: 32px 0 10px;
  font-size: 25px;
}

.content-panel p,
.content-panel li {
  color: var(--text-soft);
}

.content-panel ul {
  padding-left: 22px;
}

.content-panel li + li {
  margin-top: 10px;
}

.filter-bar {
  position: sticky;
  top: calc(var(--nav-height) + 14px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  backdrop-filter: blur(20px);
}

.search-field {
  position: relative;
  flex: 1;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-soft);
}

.search-field input::placeholder {
  color: var(--text-faint);
}

.search-field input:focus {
  border-color: var(--line-strong);
  outline: none;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.filter-pill[aria-pressed="true"],
.filter-pill:hover {
  border-color: var(--accent);
  color: var(--bg-deep);
  background: var(--accent);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
  transition: transform 220ms var(--ease), border-color 220ms ease;
}

.post-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-card h2 {
  margin: 34px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(25px, 3vw, 37px);
  font-weight: 500;
  line-height: 1.12;
}

.post-card p {
  color: var(--text-soft);
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
}

.source-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 30px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.source-status strong {
  color: var(--text);
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.concept-card {
  min-height: 290px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
  cursor: pointer;
  transition: transform 220ms var(--ease), border-color 220ms ease;
}

.concept-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
}

.concept-category {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.concept-card h2 {
  margin: 30px 0 12px;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.1;
}

.concept-card p {
  color: var(--text-soft);
}

.concept-detail {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.concept-detail.is-open {
  opacity: 1;
  visibility: visible;
}

.concept-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(720px, calc(100svh - 48px));
  padding: clamp(26px, 6vw, 56px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
  overflow: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 220ms var(--ease);
}

.concept-detail.is-open .concept-dialog {
  transform: translateY(0) scale(1);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.concept-dialog h2 {
  max-width: 14ch;
  margin: 24px 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(38px, 7vw, 66px);
  font-weight: 500;
  line-height: 0.98;
}

.concept-dialog p {
  color: var(--text-soft);
  font-size: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  text-align: center;
}

.article-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: calc(var(--nav-height) + 84px) 0 120px;
}

.article-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: end;
  min-height: 72svh;
  padding-bottom: 70px;
}

.article-title {
  max-width: 980px;
  margin: 18px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(46px, 7vw, 86px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.99;
  text-wrap: balance;
}

.article-citation {
  color: var(--text-soft);
}

.article-meta {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--line);
}

.article-meta-item {
  padding: 17px 19px;
  background: var(--surface-strong);
}

.article-meta-item span {
  display: block;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.article-meta-item strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.article-sidebar .glass-card {
  padding: 22px;
}

.article-sidebar h3 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-sidebar a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
}

.article-sidebar a:hover {
  color: var(--accent);
}

.article-visual {
  position: relative;
  min-height: 420px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%),
    var(--surface);
  overflow: hidden;
  backdrop-filter: blur(var(--content-blur));
}

.article-visual canvas {
  width: 100%;
  height: 100%;
}

.visual-label {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-faint);
  background: var(--surface-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-summary {
  margin: 0;
  color: var(--text);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(24px, 3vw, 37px);
  line-height: 1.34;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-faint);
  font-size: 12px;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line-strong);
}

.cortical-rail {
  position: fixed;
  top: 50%;
  right: 18px;
  z-index: 40;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.layer-indicator {
  position: relative;
  display: grid;
  grid-template-columns: auto 26px;
  gap: 8px;
  align-items: center;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 200ms ease, transform 200ms var(--ease);
}

.layer-indicator span {
  max-width: 92px;
  opacity: 0;
  transform: translateX(7px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.layer-indicator::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--line-strong);
  transition: width 200ms var(--ease), background 200ms ease, box-shadow 200ms ease;
}

.layer-indicator.is-active {
  color: var(--accent);
  transform: translateX(-6px);
}

.layer-indicator.is-active span,
.cortical-rail:hover .layer-indicator span {
  opacity: 1;
  transform: translateX(0);
}

.layer-indicator.is-active::after {
  width: 38px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.layer-readout {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-faint);
  background: var(--surface);
  backdrop-filter: blur(14px);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer-readout strong {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 54px 0 30px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 50%, transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  padding-bottom: 44px;
}

.footer-title {
  max-width: 750px;
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.footer-meta {
  display: grid;
  align-content: end;
  gap: 8px;
  color: var(--text-soft);
}

.footer-meta a:hover {
  color: var(--accent);
}

.footer-contact {
  justify-self: start;
  min-height: 42px;
  margin-top: 10px;
  padding: 8px 15px;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 11px;
}

.not-found {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-height) + 48px) 24px 48px;
  text-align: center;
}

.not-found .code {
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(100px, 26vw, 260px);
  line-height: 0.8;
  opacity: 0.35;
}

.not-found h1 {
  margin: 20px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 500;
}

@media (max-width: 1040px) {
  .nav-links {
    position: fixed;
    top: calc(var(--nav-height) - 4px);
    right: 20px;
    left: 20px;
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms var(--ease);
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .nav-link[aria-current="page"]::after {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .hero-grid,
  .article-header {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: 720px;
  }

  .theme-grid,
  .concept-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    order: -1;
  }

  .article-sidebar .glass-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .article-sidebar h3 {
    width: 100%;
  }

  .article-sidebar a {
    border: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-height: 66px;
  }

  .page-shell,
  .article-shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .nav-shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .brand-copy {
    display: none;
  }

  .page-hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 88px);
  }

  .display-title {
    font-size: clamp(48px, 15vw, 76px);
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: auto;
  }

  .section-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .theme-grid,
  .post-grid,
  .concept-grid {
    grid-template-columns: 1fr;
  }

  .theme-card {
    min-height: 320px;
  }

  .principle {
    grid-template-columns: 52px 1fr;
  }

  .principle p {
    grid-column: 2;
  }

  .publication-card {
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .publication-year {
    grid-column: 1 / -1;
  }

  .filter-bar {
    top: calc(var(--nav-height) + 8px);
    align-items: stretch;
    flex-direction: column;
  }

  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .filter-pill {
    flex: 0 0 auto;
  }

  .article-header {
    min-height: auto;
    padding-bottom: 48px;
  }

  .article-visual {
    min-height: 300px;
  }

  .cortical-rail {
    display: none;
  }

  .layer-readout {
    right: 12px;
    bottom: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .nav-actions .icon-button:nth-child(2) {
    display: none;
  }

  .scroll-cue {
    display: none;
  }

  .hero-actions .button {
    width: 100%;
  }

  .signal-card {
    min-height: 300px;
  }

  .principle {
    padding: 24px 20px;
  }

  .publication-card {
    padding: 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

/* --------------------------------------------------------------------------
   Aref Pariz portfolio layer
   The rules below adapt the original Neurofolio system to this research profile.
   -------------------------------------------------------------------------- */

:root {
  --bg: #070916;
  --bg-deep: #03040a;
  --surface: rgba(12, 15, 35, 0.74);
  --surface-strong: rgba(10, 13, 31, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.047);
  --text: #f0f4ff;
  --text-soft: #b8c0d8;
  --text-faint: #7f89a7;
  --line: rgba(154, 201, 255, 0.15);
  --line-strong: rgba(154, 201, 255, 0.33);
  --accent: #76e5ff;
  --accent-2: #9b8cff;
  --accent-3: #ffcf70;
  --danger: #ff8f9d;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --max: 1240px;
  --reading: 780px;
  --canvas-opacity: 0.94;
}

html[data-theme="light"] {
  --bg: #eef3fb;
  --bg-deep: #dfe7f3;
  --surface: rgba(247, 250, 255, 0.8);
  --surface-strong: rgba(250, 252, 255, 0.96);
  --surface-soft: rgba(17, 29, 70, 0.046);
  --text: #10162b;
  --text-soft: #46516e;
  --text-faint: #68738e;
  --line: rgba(35, 69, 130, 0.14);
  --line-strong: rgba(35, 69, 130, 0.28);
  --accent: #007d9c;
  --accent-2: #5d4fc7;
  --accent-3: #9b6500;
  --danger: #a53849;
  --shadow: 0 24px 70px rgba(31, 49, 84, 0.14);
  --canvas-opacity: 0.72;
}

body {
  background:
    radial-gradient(circle at 8% -8%, rgba(118, 229, 255, 0.11), transparent 31rem),
    radial-gradient(circle at 93% 13%, rgba(155, 140, 255, 0.1), transparent 35rem),
    radial-gradient(circle at 50% 105%, rgba(255, 207, 112, 0.055), transparent 32rem),
    var(--bg);
}

.cortex-vignette {
  background:
    linear-gradient(90deg, rgba(3, 4, 10, 0.54), transparent 15%, transparent 85%, rgba(3, 4, 10, 0.54)),
    linear-gradient(180deg, rgba(3, 4, 10, 0.25), transparent 27%, rgba(3, 4, 10, 0.46));
}

html[data-theme="light"] .cortex-vignette {
  background:
    linear-gradient(90deg, rgba(238, 243, 251, 0.44), transparent 15%, transparent 85%, rgba(238, 243, 251, 0.44)),
    linear-gradient(180deg, rgba(238, 243, 251, 0.22), transparent 31%, rgba(238, 243, 251, 0.38));
}

.page-progress {
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 58%, transparent);
}

.role-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--accent-3);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.profile-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  transition: color 160ms ease, transform 160ms var(--ease);
}

.profile-link:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.profile-link svg,
.story-footer svg,
.work-link svg,
.concept-open svg {
  width: 14px;
  height: 14px;
}

.signal-card {
  min-height: 410px;
}

.signal-card .signal-label {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.signal-card h2 {
  max-width: 17ch;
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(27px, 3vw, 37px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
  text-transform: none;
}

.signal-card p:not(.signal-label) {
  max-width: 35ch;
}

.signal-card .signal-location {
  color: var(--text);
  font-size: 13px;
}

.signal-card .tag-list {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  padding-bottom: 90px;
}

.paper-map-section {
  padding-top: 80px;
}

.paper-jump-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paper-map-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(var(--content-blur));
  overflow: hidden;
  transition: transform 200ms var(--ease), border-color 200ms ease, background 200ms ease;
}

.paper-map-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleY(0.3);
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.paper-map-item:hover {
  z-index: 1;
  border-color: var(--line-strong);
  background: var(--surface-strong);
  transform: translateY(-3px);
}

.paper-map-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.paper-map-index {
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 23px;
}

.paper-map-copy {
  min-width: 0;
}

.paper-map-copy strong {
  display: block;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.18;
}

.paper-map-copy small {
  display: block;
  margin-top: 7px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
}

.paper-map-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: transform 180ms var(--ease), background 180ms ease;
}

.paper-map-arrow svg {
  width: 14px;
  height: 14px;
}

.paper-map-item:hover .paper-map-arrow {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: rotate(90deg);
}

.theme-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-card {
  min-height: 330px;
}

.research-timeline {
  position: relative;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur));
  overflow: hidden;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 70px 150px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 30px;
}

.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}

.timeline-node {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface-soft);
  box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.timeline-period {
  padding-top: 10px;
  color: var(--accent-3);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 19px;
}

.timeline-content h3 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}

.timeline-content p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-soft);
}

.timeline-content .timeline-place {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.current-question {
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 23rem),
    var(--surface);
}

.publication-hero {
  min-height: 62svh;
}

.publication-map-wrap {
  padding-top: 10px;
  padding-bottom: 54px;
}

.map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.map-heading h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.map-count {
  min-width: max-content;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.publication-story-section {
  padding-top: 58px;
}

.publication-stories {
  display: grid;
  gap: 34px;
}

.publication-story {
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 104px);
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 94%, transparent), color-mix(in srgb, var(--surface) 82%, transparent));
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur)) saturate(1.08);
  overflow: hidden;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

.publication-story::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  opacity: 0.45;
}

.publication-story.is-targeted {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 10%, transparent), var(--shadow);
}

.publication-story-header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.story-number {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.story-number span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.story-number strong {
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 37px;
  font-weight: 500;
  line-height: 1;
}

.story-heading h2 {
  max-width: 990px;
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.story-authors {
  max-width: 930px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.plain-summary {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  margin-top: 42px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.plain-summary > span,
.explainer-label,
.story-subheading {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.plain-summary p {
  max-width: 890px;
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(24px, 3vw, 37px);
  line-height: 1.3;
}

.paper-figure {
  margin: 38px 0 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.paper-figure-link {
  display: block;
  padding: clamp(12px, 2vw, 24px);
  background: #fff;
}

.paper-figure img {
  width: 100%;
  max-height: 760px;
  object-fit: contain;
}

.paper-figure figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 22px;
  padding: 17px 20px;
  color: #4b566b;
  background: #eff3f8;
  font-size: 11px;
  line-height: 1.5;
}

.paper-figure figcaption strong {
  color: #121a2b;
  font-size: 12px;
}

.paper-figure figcaption span {
  grid-column: 1;
}

.paper-figure figcaption a {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #235aa5;
  font-weight: 750;
}

.compact-figure {
  margin: 0 0 22px;
}

.story-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.explainer-card {
  min-height: 230px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.explainer-card p {
  margin: 24px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.result-card {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 15rem),
    var(--surface-soft);
}

.story-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 48px;
  margin-top: 42px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.contribution-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.contribution-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}

.contribution-list li::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 2px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 50%, transparent);
}

.story-methods .tag-list {
  margin-top: 18px;
}

.story-methods .article-links {
  margin-top: 30px;
}

.story-methods .button {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 12px;
}

.story-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.story-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.story-footer a:hover {
  color: var(--accent);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
  transition: transform 200ms var(--ease), border-color 200ms ease;
}

.work-card[href]:hover {
  border-color: var(--line-strong);
  transform: translateY(-5px);
}

.work-status {
  color: var(--accent-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.work-card h3 {
  margin: 24px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.12;
}

.work-card p {
  color: var(--text-soft);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.work-link.muted {
  color: var(--text-faint);
}

.post-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.sample-ribbon {
  align-self: flex-start;
  margin-top: 20px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent-3) 42%, transparent);
  border-radius: 999px;
  color: var(--accent-3);
  background: color-mix(in srgb, var(--accent-3) 7%, transparent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.post-card h2 {
  margin-top: 24px;
}

.idea-prompt {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 14px 15px;
  border-left: 2px solid var(--accent-2);
  color: var(--text-faint);
  background: var(--surface-soft);
  font-size: 12px;
}

.idea-prompt strong {
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.concept-card {
  position: relative;
  display: flex;
  min-height: 340px;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}

.concept-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 25px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.concept-dialog h3 {
  margin: 28px 0 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.concept-definition {
  color: var(--text) !important;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(22px, 3vw, 31px) !important;
  line-height: 1.35;
}

.concept-example {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.concept-example span {
  color: var(--accent-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.concept-example p {
  margin: 7px 0 0;
  font-size: 15px;
}

.article-visual,
.article-main .paper-figure {
  margin-bottom: 20px;
}

.article-sidebar .glass-card a:last-child {
  margin-top: 10px;
  color: var(--accent);
}

@media (max-width: 1040px) {
  .story-explainer-grid,
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-explainer-grid .result-card {
    grid-column: 1 / -1;
    min-height: 180px;
  }
}

@media (max-width: 820px) {
  .paper-jump-map,
  .theme-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .timeline-period {
    grid-column: 2;
    padding-top: 0;
  }

  .timeline-content {
    grid-column: 2;
  }

  .publication-story-header {
    grid-template-columns: 1fr;
  }

  .story-number {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .plain-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .story-lower-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 620px) {
  .profile-link-row {
    gap: 10px 16px;
  }

  .paper-map-item {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 17px;
  }

  .paper-map-arrow {
    display: none;
  }

  .map-heading {
    align-items: start;
    flex-direction: column;
  }

  .publication-story {
    padding: 25px 20px;
    border-radius: 22px;
  }

  .story-explainer-grid {
    grid-template-columns: 1fr;
  }

  .story-explainer-grid .result-card {
    grid-column: auto;
  }

  .explainer-card {
    min-height: auto;
  }

  .paper-figure figcaption {
    grid-template-columns: 1fr;
  }

  .paper-figure figcaption a,
  .paper-figure figcaption span {
    grid-column: 1;
    grid-row: auto;
  }

  .story-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-item {
    padding: 24px 20px;
  }
}


/* --------------------------------------------------------------------------
   Three-column profile hero: name | portrait | current research signal
   -------------------------------------------------------------------------- */

/* PARSEC Neuro identity. The native details element keeps the expansion
   accessible to keyboards and touch screens without extra JavaScript. */
.parsec-identity {
  margin: 0 0 26px;
}

.parsec-name {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.parsec-name summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
}

.parsec-name summary::-webkit-details-marker {
  display: none;
}

.parsec-name summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 5px;
}

.parsec-wordmark {
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1;
  white-space: nowrap;
}

.parsec-wordmark > span {
  color: var(--accent);
  font-size: 0.38em;
  letter-spacing: 0.2em;
  vertical-align: 0.45em;
}

.parsec-open-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.parsec-open-label::after {
  content: "+";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.parsec-name[open] .parsec-open-label::after {
  content: "−";
}

.parsec-expansion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 4px 0 16px;
}

.parsec-expansion span {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.parsec-expansion strong {
  display: inline-block;
  min-width: 1.05em;
  color: var(--accent);
  font-size: 1.18em;
}

.parsec-bridge {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.hero-profile-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.05fr)
    clamp(190px, 18vw, 260px)
    minmax(300px, 0.82fr);
  grid-template-areas: "identity portrait signal";
  align-items: center;
  gap: clamp(28px, 4.5vw, 68px);
}

.hero-profile-grid .hero-copy {
  grid-area: identity;
  min-width: 0;
}

.hero-profile-grid .hero-aside {
  grid-area: signal;
  min-width: 0;
}

.profile-portrait {
  grid-area: portrait;
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 5;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--accent) 20%, var(--surface)),
      color-mix(in srgb, var(--accent-2) 18%, var(--surface))
    );
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.34),
    0 0 48px color-mix(in srgb, var(--accent) 13%, transparent);
  overflow: visible;
  isolation: isolate;
  justify-self: center;
}

.profile-portrait::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 42px;
  opacity: 0.64;
  animation: portrait-signal 4.5s ease-in-out infinite;
}

.profile-portrait::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 8%;
  width: 13px;
  height: 13px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 8px var(--accent),
    0 0 22px color-mix(in srgb, var(--accent) 72%, transparent);
}

.profile-portrait img,
.profile-portrait-placeholder {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 27px;
}

.profile-portrait img {
  z-index: 2;
  display: block;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(0.9) contrast(1.04);
}

.profile-portrait img[hidden] {
  display: none;
}

.profile-portrait-placeholder {
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--text) 90%, var(--accent));
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 32%),
    linear-gradient(160deg, var(--surface-strong), color-mix(in srgb, var(--accent-2) 14%, var(--surface)));
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(58px, 7vw, 88px);
  letter-spacing: -0.06em;
}

@keyframes portrait-signal {
  0%, 100% {
    transform: scale(1);
    opacity: 0.42;
  }
  50% {
    transform: scale(1.035);
    opacity: 0.82;
  }
}

/* Keep the signal card visually balanced beside the portrait. */
.hero-profile-grid .signal-card {
  min-height: 430px;
}

/* Two-column tablet arrangement: identity + portrait, then signal below. */
@media (max-width: 1120px) {
  .hero-profile-grid {
    grid-template-columns: minmax(0, 1fr) clamp(180px, 27vw, 245px);
    grid-template-areas:
      "identity portrait"
      "signal signal";
    align-items: center;
  }

  .hero-profile-grid .hero-aside {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
    align-items: stretch;
  }

  .hero-profile-grid .metric-grid {
    margin-top: 0;
  }
}

/* One-column mobile arrangement. */
@media (max-width: 760px) {
  .parsec-identity {
    margin-bottom: 24px;
  }

  .parsec-wordmark {
    font-size: clamp(25px, 10vw, 36px);
  }

  .parsec-open-label {
    font-size: 0;
  }

  .parsec-expansion {
    grid-template-columns: 1fr;
  }

  .hero-profile-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "portrait"
      "identity"
      "signal";
    gap: 38px;
  }

  .profile-portrait {
    width: min(66vw, 230px);
    justify-self: start;
  }

  .hero-profile-grid .hero-aside {
    grid-template-columns: 1fr;
  }

  .hero-profile-grid .metric-grid {
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-portrait::before {
    animation: none;
  }
}

/* Paper-linked Research Compass schematics */
.theme-card {
  min-height: 0;
  padding: 24px;
}

.theme-card::after {
  opacity: 0.55;
}

.theme-card-heading {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.theme-card-heading h3 {
  max-width: none;
  margin: 0;
}

.theme-schematic {
  position: relative;
  z-index: 2;
  height: 220px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%),
    var(--surface-soft);
  overflow: hidden;
}

.theme-schematic canvas {
  width: 100%;
  height: 100%;
}

.theme-paper-links {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.theme-paper-links > span {
  padding: 17px 0 8px;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-paper-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.theme-paper-links a:hover {
  color: var(--accent);
}

.theme-paper-links svg {
  width: 14px;
  height: 14px;
}

/* Clinical protocol placeholders */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.protocol-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
}

.protocol-status {
  color: var(--accent-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.protocol-card h3 {
  margin: 26px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.12;
}

.protocol-card p {
  color: var(--text-soft);
}

.protocol-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.protocol-link.muted {
  color: var(--text-faint);
}

.protocol-link svg {
  width: 14px;
  height: 14px;
}

/* Rango/TMS animated footer vignette */
.footer-rango-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 40px;
}

.tms-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 0;
  isolation: isolate;
  overflow: hidden;
  filter: drop-shadow(0 24px 42px rgb(0 0 0 / 0.32));
}

.tms-scene__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 53% 75%;
  animation: scene-breathe 6s ease-in-out infinite;
}

.coil-pulse {
  position: absolute;
  z-index: 2;
  left: 57.5%;
  top: 29.5%;
  width: 10.5%;
  aspect-ratio: 1;
  border: 2px solid rgb(82 234 255 / 0.9);
  border-radius: 50%;
  box-shadow: 0 0 10px #52eaff, 0 0 26px rgb(82 234 255 / 0.55), inset 0 0 18px rgb(82 234 255 / 0.38);
  opacity: 0;
  pointer-events: none;
  animation: tms-pulse 2.6s ease-out infinite;
}

.coil-pulse::after {
  content: "";
  position: absolute;
  inset: 17%;
  border: 1px solid rgb(159 247 255 / 0.9);
  border-radius: inherit;
}

.dust {
  position: absolute;
  z-index: 3;
  left: var(--x);
  bottom: var(--y);
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(255 216 157 / 0.7);
  filter: blur(0.4px);
  opacity: 0;
  animation: dust-drift var(--d) ease-out var(--delay) infinite;
}

@keyframes scene-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.15deg); }
  50% { transform: translate3d(0, -5px, 0) rotate(0.15deg); }
}

@keyframes tms-pulse {
  0%, 18% { opacity: 0; transform: translate(-50%, -50%) rotate(-17deg) scale(0.42); }
  25% { opacity: 1; }
  65%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-17deg) scale(1.55); }
}

@keyframes dust-drift {
  0%, 14% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.7); }
  30% { opacity: 0.65; }
  100% { opacity: 0; transform: translate3d(90px, -42px, 0) scale(1.7); }
}

@media (max-width: 820px) {
  .protocol-grid,
  .footer-rango-grid {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    align-content: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tms-scene__art,
  .coil-pulse,
  .dust {
    animation: none;
  }

  .coil-pulse {
    opacity: 0.38;
    transform: translate(-50%, -50%) rotate(-17deg) scale(1);
  }
}

/* Tools & developments */
.tools-page-hero {
  min-height: 64svh;
}

.tool-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-rows: 270px 1fr;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 68%, transparent));
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur));
  overflow: hidden;
  transition: transform 250ms var(--ease), border-color 250ms ease, box-shadow 250ms ease;
}

.tool-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  transform: scaleX(0.2);
  opacity: 0;
  transition: transform 300ms var(--ease), opacity 300ms ease;
}

.tool-card:hover {
  transform: translateY(-8px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.42);
}

.tool-card:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.tool-card-visual {
  position: relative;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 48% 44%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 19rem),
    var(--surface-soft);
  overflow: hidden;
}

.tool-screenshot {
  padding: 18px;
}

.tool-screenshot img {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  transition: transform 420ms var(--ease);
}

.tool-card:hover .tool-screenshot img {
  transform: scale(1.025);
}

.pipeline-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 34px;
}

.pipeline-mini::before,
.pipeline-mini::after {
  content: "";
  position: absolute;
  width: 210px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
}

.pipeline-mini::before {
  top: -115px;
  left: -70px;
  box-shadow: 0 0 0 30px color-mix(in srgb, var(--accent) 3%, transparent);
}

.pipeline-mini::after {
  right: -105px;
  bottom: -145px;
  border-color: color-mix(in srgb, var(--accent-2) 27%, transparent);
  box-shadow: 0 0 0 34px color-mix(in srgb, var(--accent-2) 3%, transparent);
}

.pipeline-mini-node {
  position: relative;
  z-index: 2;
  display: grid;
  width: clamp(78px, 9vw, 112px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--accent) 5%, transparent), 0 15px 38px rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pipeline-mini-line {
  position: relative;
  z-index: 1;
  width: clamp(22px, 4vw, 52px);
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), var(--accent));
}

.pipeline-mini-pulse {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 17%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 14px var(--accent-3);
  animation: tool-pipeline-pulse 3.6s var(--ease) infinite;
}

@keyframes tool-pipeline-pulse {
  0% { left: 17%; opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 83%; opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

.tool-card-body {
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.tool-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-card-meta span:last-child {
  color: var(--accent-3);
}

.tool-card h2 {
  margin: 24px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tool-card p {
  margin: 18px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 32px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tool-card-link svg {
  width: 16px;
  transition: transform 180ms var(--ease);
}

.tool-card:hover .tool-card-link svg {
  transform: translateX(5px);
}

.tool-callout {
  max-width: 980px;
}

.tool-callout p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 18px;
}

/* Dedicated tool pages */
.tool-detail-hero {
  display: grid;
  align-items: center;
  min-height: min(940px, 100svh);
  padding: calc(var(--nav-height) + 78px) 0 88px;
}

.tool-detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(400px, 0.96fr);
  gap: clamp(48px, 7vw, 94px);
  align-items: center;
}

.tool-detail-hero .breadcrumbs {
  margin-bottom: 35px;
}

.tool-detail-hero .page-title {
  font-size: clamp(50px, 6.7vw, 88px);
}

.nestapp-window {
  position: relative;
  min-height: 500px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 17%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 18rem),
    linear-gradient(145deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow), 0 0 70px color-mix(in srgb, var(--accent) 8%, transparent);
  overflow: hidden;
}

.nestapp-window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.nestapp-window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.65;
}

.nestapp-window-bar span:nth-child(2) { background: var(--accent-3); }
.nestapp-window-bar span:nth-child(3) { background: var(--accent); }

.nestapp-window-bar strong {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nestapp-window-body {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  grid-template-rows: minmax(230px, 1fr) 120px;
  min-height: 452px;
}

.nestapp-modules {
  grid-row: 1 / span 2;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 18px 13px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
}

.nestapp-modules span {
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 9px;
}

.nestapp-pipeline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 34px 20px;
}

.nest-step {
  position: relative;
  z-index: 2;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--accent-2);
  background: var(--surface-strong);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 18px;
}

.nest-step.active {
  color: var(--bg-deep);
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent);
}

.nestapp-pipeline i {
  width: clamp(14px, 3vw, 34px);
  height: 1px;
  background: var(--line-strong);
}

.nestapp-pipeline b {
  position: absolute;
  top: 50%;
  left: 17%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 12px var(--accent-3);
  animation: nestapp-progress 4s var(--ease) infinite;
}

@keyframes nestapp-progress {
  0% { left: 17%; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { left: 83%; opacity: 0; }
}

.nestapp-report {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: end;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
}

.nestapp-report span {
  height: var(--bar-height, 42%);
  min-height: 18px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent-2) 72%, transparent));
  opacity: 0.62;
}

.nestapp-report span:nth-child(1) { --bar-height: 44%; }
.nestapp-report span:nth-child(2) { --bar-height: 78%; }
.nestapp-report span:nth-child(3) { --bar-height: 61%; }
.nestapp-report span:nth-child(4) { --bar-height: 88%; }

.tool-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}

.tool-fact {
  min-height: 230px;
  padding: 30px;
  background: var(--surface-strong);
}

.tool-fact strong {
  display: block;
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}

.tool-fact span {
  display: block;
  margin-top: 22px;
  color: var(--text-soft);
}

.tool-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-workflow-step {
  min-height: 340px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(var(--content-blur));
}

.tool-workflow-step > span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 18px;
}

.tool-workflow-step h3,
.tool-feature h3 {
  font-family: "Iowan Old Style", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
}

.tool-workflow-step h3 {
  margin: 28px 0 0;
  font-size: 25px;
}

.tool-workflow-step p,
.tool-feature p {
  color: var(--text-soft);
}

.tool-workflow-step code,
.tool-feature code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 0.88em;
}

.tool-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tool-feature {
  min-height: 285px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 13rem),
    var(--surface);
  backdrop-filter: blur(var(--content-blur));
}

.tool-feature > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tool-feature h3 {
  margin: 27px 0 0;
  font-size: 27px;
}

.tool-section-panel,
.resource-panel,
.tool-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--content-blur));
}

.tool-section-panel {
  padding: clamp(28px, 5vw, 58px);
}

.tool-section-panel > h2,
.resource-panel h2,
.tool-note h2 {
  margin: 18px 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(31px, 4vw, 51px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.tool-section-panel > p:not(.section-kicker),
.resource-panel p,
.tool-note p:not(.section-kicker) {
  color: var(--text-soft);
}

.tool-table-wrap {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
}

.tool-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface-strong);
}

.tool-table th,
.tool-table td {
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tool-table tr:last-child th,
.tool-table tr:last-child td {
  border-bottom: 0;
}

.tool-table thead th {
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tool-table tbody th,
.tool-table tbody td:first-child {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.tool-table tbody td {
  color: var(--text-soft);
  font-size: 13px;
}

.compact-table {
  min-width: 520px;
}

.compact-table th {
  width: 36%;
}

.tool-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 20px;
  align-items: stretch;
}

.tool-note {
  padding: clamp(28px, 4vw, 44px);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent-3) 12%, transparent), transparent 18rem),
    var(--surface);
}

.tool-note h2 {
  font-size: clamp(29px, 3.4vw, 43px);
}

.tool-note p:last-child {
  margin-bottom: 0;
}

.inline-note {
  margin-top: 22px;
}

.resource-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(34px, 7vw, 90px);
  align-items: center;
  padding: clamp(28px, 5vw, 58px);
}

.resource-panel p:last-child {
  max-width: 730px;
  margin-bottom: 0;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: center;
}

/* EEG Cap Viewer introduction and embed */
.eeg-preview {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent-2) 9%, var(--surface)));
  box-shadow: var(--shadow);
}

.eeg-preview img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 17px;
  object-fit: cover;
  object-position: center top;
}

.eeg-preview figcaption {
  padding: 13px 7px 2px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
}

.viewer-embed-shell {
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eeg-viewer-frame {
  display: block;
  width: 100%;
  min-height: 1180px;
  border: 0;
  border-radius: 15px;
  background: #f4f6f9;
}

.viewer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 1040px) {
  .tool-detail-hero {
    min-height: auto;
  }

  .tool-detail-hero-grid {
    grid-template-columns: 1fr;
  }

  .nestapp-window,
  .eeg-preview {
    width: min(100%, 760px);
  }

  .tool-workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .tool-catalog,
  .tool-feature-grid,
  .tool-fact-grid,
  .tool-two-column {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 580px;
  }

  .tool-fact {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .tool-detail-hero {
    padding-top: calc(var(--nav-height) + 70px);
  }

  .tool-workflow-grid {
    grid-template-columns: 1fr;
  }

  .tool-workflow-step {
    min-height: auto;
  }

  .nestapp-window {
    min-height: 420px;
  }

  .nestapp-window-body {
    grid-template-columns: 98px minmax(0, 1fr);
    min-height: 372px;
  }

  .nestapp-modules {
    padding: 12px 9px;
  }

  .nestapp-modules span {
    padding: 8px 6px;
    font-size: 8px;
  }

  .nest-step {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 14px;
  }

  .eeg-viewer-frame {
    min-height: 1750px;
  }
}

@media (max-width: 520px) {
  .tool-card {
    grid-template-rows: 220px 1fr;
    min-height: 610px;
  }

  .tool-card-body {
    padding: 24px 21px;
  }

  .pipeline-mini {
    padding: 22px 12px;
  }

  .pipeline-mini-node {
    width: 70px;
    border-radius: 15px;
    font-size: 9px;
  }

  .pipeline-mini-line {
    width: 13px;
  }

  .nestapp-window-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 210px 100px;
  }

  .nestapp-modules {
    grid-row: auto;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nestapp-modules span {
    padding: 7px 4px;
    text-align: center;
  }

  .resource-links .button,
  .viewer-links .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-mini-pulse,
  .nestapp-pipeline b {
    animation: none;
  }
}
