:root {
  color-scheme: light;
  --bg: #f0ede6;
  --surface: #eaf0ed;
  --surface-strong: #ffffff;
  --panel-inset: #f7f9f8;
  --text: #0d2420;
  --muted: #3d4f4a;
  --label: #6b8a82;
  --line: rgba(26, 92, 82, 0.15);
  --accent: #1a5c52;
  --accent-strong: #1a5c52;
  --accent-soft: rgba(26, 92, 82, 0.08);
  --gold: #c4781e;
  --shadow: 0 4px 24px rgba(26, 92, 82, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  --hero-glow: transparent;
  --network-grid: rgba(26, 92, 82, 0.08);
  --soft-panel: #fffdf8;
  --impact-bg: #f0f7f5;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: #111815;
  --surface-strong: #1a2420;
  --panel-inset: #151c19;
  --text: #edf2ee;
  --muted: #a7b2ad;
  --label: #a7b2ad;
  --line: rgba(237, 242, 238, 0.13);
  --accent: #6bd6bf;
  --accent-strong: #93ead7;
  --accent-soft: rgba(107, 214, 191, 0.12);
  --gold: #e0b05f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  --hero-glow: rgba(13, 61, 56, 0.15);
  --network-grid: rgba(237, 242, 238, 0.1);
  --soft-panel: color-mix(in srgb, var(--surface-strong) 88%, var(--accent));
  --impact-bg: var(--accent-soft);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(135deg, #f0ede6 0%, #eaf0ed 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 68% 24%, var(--hero-glow), transparent 34rem),
    linear-gradient(180deg, var(--bg), var(--surface));
}

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

.site-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  background: color-mix(in srgb, #f0ede6 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .topbar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom-color: rgba(237, 242, 238, 0.13);
}

.brand,
.nav-links,
.theme-toggle,
.hero-actions,
.contact-links,
.project-topline,
.tag-list {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  color: #0d2420;
  white-space: nowrap;
}

:root[data-theme="dark"] .brand {
  color: var(--text);
}

.nav-links {
  gap: 26px;
  color: #2d4a44;
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a:hover,
.contact-links a:hover,
.project-topline a:hover {
  color: #1a5c52;
}

:root[data-theme="dark"] .nav-links {
  color: var(--muted);
}

:root[data-theme="dark"] .nav-links a:hover,
:root[data-theme="dark"] .contact-links a:hover,
:root[data-theme="dark"] .project-topline a:hover {
  color: var(--accent-strong);
}

.theme-toggle {
  gap: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 68px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: inset 0 1px 2px rgba(26, 92, 82, 0.08), 0 4px 12px rgba(26, 92, 82, 0.08);
}

.toggle-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(34px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.72fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  min-height: calc(100vh - 76px);
  padding: clamp(46px, 8vh, 84px) 0 48px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  content: "";
  inset: 0 -5vw;
  height: 100%;
  z-index: -2;
  display: none;
  background:
    radial-gradient(circle at 34% 54%, var(--hero-glow), transparent 25rem),
    radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1.5px);
  background-size: auto, auto, 34px 34px;
  mask-image: radial-gradient(ellipse at center, #000 0 42%, transparent 74%);
  opacity: 0.58;
}

:root:not([data-theme="dark"]) .hero::before {
  display: none;
}

.hero::after {
  position: absolute;
  content: "";
  inset: 30% auto auto -8%;
  width: min(58vw, 780px);
  height: min(42vh, 420px);
  z-index: -1;
  display: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 92, 82, 0.16), transparent 68%);
  opacity: 0.75;
}

:root[data-theme="dark"] .hero::before,
:root[data-theme="dark"] .hero::after {
  display: block;
}

.hero-rail {
  position: absolute;
  left: calc((100vw - 100%) / -2 + 12px);
  top: 58%;
  z-index: -1;
  color: var(--label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  opacity: 0.12;
  text-transform: uppercase;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
}

.hero-code {
  position: absolute;
  left: calc((100vw - 100%) / -2 + 34px);
  top: 138px;
  bottom: 116px;
  z-index: -1;
  display: block;
  width: min(18vw, 230px);
  overflow: visible;
  color: var(--text);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0.055;
  pointer-events: none;
  white-space: nowrap;
}

.hero-code span {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-code span:nth-child(1) {
  left: 0;
  top: 0;
}

.hero-code span:nth-child(2) {
  left: 36px;
  top: 74px;
}

.hero-code span:nth-child(3) {
  left: 4px;
  top: 150px;
}

.hero-code span:nth-child(4) {
  left: 58px;
  top: 236px;
}

.hero-code span:nth-child(5) {
  left: 2px;
  bottom: 188px;
}

.hero-code span:nth-child(6) {
  left: 42px;
  bottom: 124px;
}

.hero-code span:nth-child(7) {
  left: 0;
  bottom: 62px;
}

.hero-code span:nth-child(8) {
  left: 32px;
  bottom: 0;
}

:root[data-theme="dark"] .hero-code {
  color: var(--text);
  opacity: 0.075;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-top: clamp(150px, 18vh, 178px);
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(26, 92, 82, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.availability span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(26, 92, 82, 0.1);
}

:root[data-theme="dark"] .availability {
  border-color: rgba(147, 234, 215, 0.14);
  background: rgba(237, 242, 238, 0.04);
}

.eyebrow {
  margin: 0 0 12px;
  color: #1a6b5a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:root[data-theme="dark"] .eyebrow {
  color: var(--accent-strong);
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 6.1vw, 5.45rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

:root:not([data-theme="dark"]) h1 {
  color: #0d2420;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.hero-text {
  max-width: 650px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.2rem);
  overflow-wrap: anywhere;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  color: var(--label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.3;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 7px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid currentColor;
  position: relative;
}

.scroll-cue span::after {
  position: absolute;
  content: "";
  left: 50%;
  top: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
  animation: scrollDot 1.7s ease-in-out infinite;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1.5px solid var(--accent-strong);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 800;
  box-shadow: none;
}

.button:not(.primary) {
  color: #1a5c52;
}

.button.primary {
  border-color: #1a5c52;
  background: #1a5c52;
  color: #ffffff;
}

:root:not([data-theme="dark"]) .button.primary:hover {
  border-color: #134840;
  background: #134840;
  box-shadow: 0 4px 12px rgba(26, 92, 82, 0.3);
}

:root:not([data-theme="dark"]) .button:not(.primary) {
  border: 1.5px solid #1a5c52;
  background: #ffffff;
  color: #1a5c52;
}

:root:not([data-theme="dark"]) .button:not(.primary):hover {
  background: #f0f7f5;
}

:root[data-theme="dark"] .button.primary {
  color: #09201a;
}

:root[data-theme="dark"] .button:not(.primary) {
  border-color: var(--accent-strong);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

:root[data-theme="dark"] .button:not(.primary):hover {
  background: rgba(147, 234, 215, 0.1);
}

.signal-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  min-height: 480px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.panel-kicker {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:root:not([data-theme="dark"]) .signal-panel {
  border-color: rgba(26, 92, 82, 0.09);
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(26, 92, 82, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

:root[data-theme="dark"] .signal-panel {
  background: var(--soft-panel);
}

.neural-panel {
  display: grid;
  gap: 11px;
  margin-bottom: 18px;
}

.network-stage {
  position: relative;
  overflow: hidden;
  height: 238px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--network-grid) 1px, transparent 1px),
    linear-gradient(var(--network-grid) 1px, transparent 1px),
    #fbfdfc;
  background-size: 42px 42px, 42px 42px, auto;
}

:root[data-theme="dark"] .network-stage {
  background:
    radial-gradient(circle at 22% 22%, var(--accent-soft), transparent 9rem),
    linear-gradient(90deg, var(--network-grid) 1px, transparent 1px),
    linear-gradient(var(--network-grid) 1px, transparent 1px),
    color-mix(in srgb, var(--surface) 84%, var(--accent));
  background-size: auto, 42px 42px, 42px 42px, auto;
}

.network-stage::before {
  position: absolute;
  content: "";
  inset: 16px;
  border: 1px solid rgba(26, 92, 82, 0.16);
  border-radius: 8px;
  pointer-events: none;
}

.network-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.network-svg defs path {
  fill: none;
  stroke: none;
}

.links line {
  stroke: rgba(26, 92, 82, 0.2);
  stroke-width: 1.4;
  stroke-dasharray: 8 10;
  opacity: 0.4;
  animation: linkFlow 2.8s linear infinite;
}

.links line:nth-child(3n) {
  stroke: rgba(196, 120, 30, 0.26);
  animation-duration: 3.4s;
}

.nodes circle {
  fill: #1a6b5c;
  stroke: rgba(26, 107, 92, 0.14);
  stroke-width: 8;
  filter: drop-shadow(0 2px 4px rgba(26, 107, 92, 0.25));
  transition: r 180ms ease, fill 180ms ease;
}

.nodes circle:nth-child(3n) {
  fill: #c4781e;
  stroke: rgba(196, 120, 30, 0.14);
  filter: drop-shadow(0 2px 4px rgba(196, 120, 30, 0.22));
}

.network-stage:hover .nodes circle,
.network-stage.is-training .nodes circle {
  r: 18px;
}

.network-stage.is-training .links line {
  opacity: 0.9;
  stroke-width: 2;
}

.signal {
  fill: #ffffff;
  stroke: #9db8b0;
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(26, 107, 92, 0.2));
}

.signal-gold {
  stroke: #c4781e;
  filter: drop-shadow(0 2px 4px rgba(196, 120, 30, 0.2));
}

:root[data-theme="dark"] .links line {
  stroke: color-mix(in srgb, var(--accent) 42%, var(--muted));
}

:root[data-theme="dark"] .links line:nth-child(3n) {
  stroke: color-mix(in srgb, var(--gold) 58%, var(--muted));
}

:root[data-theme="dark"] .nodes circle {
  fill: var(--accent);
  stroke: color-mix(in srgb, var(--surface-strong) 75%, var(--accent));
  filter: none;
}

:root[data-theme="dark"] .nodes circle:nth-child(3n) {
  fill: var(--gold);
  stroke: color-mix(in srgb, var(--surface-strong) 75%, var(--gold));
  filter: none;
}

:root[data-theme="dark"] .signal {
  fill: var(--surface-strong);
  stroke: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent));
}

:root[data-theme="dark"] .signal-gold {
  stroke: var(--gold);
  filter: drop-shadow(0 0 10px var(--gold));
}

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

.training-readout span,
.training-readout label,
.train-button {
  border: 1px solid rgba(26, 92, 82, 0.14);
  border-radius: 8px;
  background: var(--surface-strong);
  font-weight: 800;
}

:root:not([data-theme="dark"]) .training-readout span,
:root:not([data-theme="dark"]) .training-readout label {
  background: #f7f9f8;
}

.training-readout span,
.training-readout label {
  padding: 10px;
  color: var(--label);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.training-readout strong,
.training-readout input {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0;
}

.training-readout input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font-weight: 800;
}

.training-readout input::-webkit-outer-spin-button,
.training-readout input::-webkit-inner-spin-button {
  margin: 0;
}

.train-button {
  min-height: 42px;
  border-color: #2a7a6a;
  background: #2a7a6a;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.train-button:hover {
  border-color: #23685b;
  background: #23685b;
}

:root[data-theme="dark"] .train-button {
  border-color: #1a5c52;
  background: #1a5c52;
}

:root[data-theme="dark"] .train-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.network-stage.is-training + .training-readout span,
.network-stage.is-training + .training-readout label {
  transform: translateY(-1px);
}

@keyframes linkFlow {
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes scrollDot {
  0%, 100% {
    transform: translate(-50%, 0);
    opacity: 0.45;
  }

  50% {
    transform: translate(-50%, 10px);
    opacity: 1;
  }
}

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

  .links line,
  .toggle-thumb,
  .scroll-cue span::after {
    animation: none;
    transition: none;
  }

  .signals {
    display: none;
  }

  .network-stage:hover .nodes circle,
  .network-stage.is-training .nodes circle {
    r: 14px;
  }
}

.metrics {
  display: grid;
  gap: 13px;
  margin: 0;
}

.metrics div,
.timeline-item,
.project-card,
.skill-groups article,
.award-list p {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 10px 28px rgba(26, 92, 82, 0.065);
}

.metrics div {
  padding: 16px;
}

:root:not([data-theme="dark"]) .metrics div {
  border-color: transparent;
  background: #f7f9f8;
  box-shadow: inset 0 0 0 1px rgba(26, 92, 82, 0.05);
}

:root[data-theme="dark"] .metrics div {
  border-color: transparent;
  background: var(--panel-inset);
  box-shadow: inset 0 0 0 1px rgba(237, 242, 238, 0.08);
}

.metrics dt {
  color: var(--label);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics dd {
  margin: 4px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.section,
.section-band {
  padding: 76px 0;
}

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

.intro p {
  max-width: 930px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.4vw, 1.72rem);
  line-height: 1.38;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 24px;
  padding: 24px;
}

.meta,
.timeline-item p,
.project-card p,
.skill-groups p,
.award-list p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.meta {
  margin: 0;
  font-size: 0.9rem;
}

.timeline-item > p {
  margin-bottom: 0;
}

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

.project-card {
  padding: 24px;
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.68fr);
  column-gap: 36px;
  border-color: color-mix(in srgb, var(--gold) 28%, var(--line));
  background: var(--surface-strong);
}

:root:not([data-theme="dark"]) .project-card.featured {
  border-color: rgba(26, 92, 82, 0.15);
}

:root:not([data-theme="dark"]) .impact-list li {
  border-left-color: #1a5c52;
}

:root:not([data-theme="dark"]) .research-card {
  border-color: rgba(26, 92, 82, 0.15);
}

.project-card.featured .project-topline,
.project-card.featured h3,
.project-card.featured p {
  grid-column: 1;
}

.project-card.featured .impact-list {
  grid-column: 2;
  grid-row: 2 / span 2;
  margin-top: 0;
}

.project-topline {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-topline a {
  color: var(--muted);
  text-transform: none;
}

.impact-list,
.tag-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.impact-list {
  display: grid;
  gap: 12px;
  align-self: start;
}

.impact-list li {
  padding: 14px;
  border-left: 3px solid var(--accent);
  background: var(--impact-bg);
  font-weight: 800;
  line-height: 1.4;
}

:root:not([data-theme="dark"]) .impact-list li {
  background: #f0f7f5;
}

.tag-list {
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.research-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

:root:not([data-theme="dark"]) .research-card {
  background: #ffffff;
}

.research-card p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
}

.research-kicker {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.research-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.research-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
}

.research-actions a:hover {
  color: var(--accent-strong);
}

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

.skill-groups article,
.award-list p {
  padding: 22px;
}

.award-list {
  display: grid;
  gap: 12px;
}

.award-list p {
  margin: 0;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.contact h2 {
  max-width: 720px;
}

.contact-links {
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    padding: 14px 0;
    gap: 14px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .hero,
  .timeline-item,
  .project-card.featured,
  .research-card,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 34px;
    padding-top: 42px;
    padding-bottom: 72px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-rail,
  .hero-code {
    display: none;
  }

  .hero::after,
  .hero::before {
    display: none;
  }

  h1 {
    max-width: 760px;
    font-size: clamp(2.75rem, 11vw, 4.8rem);
  }

  .signal-panel {
    min-height: 0;
    padding: 22px;
  }

  .panel-kicker {
    margin-bottom: 12px;
  }

  .network-stage {
    height: clamp(210px, 42vw, 255px);
  }

  .project-card.featured .impact-list {
    grid-column: 1;
    grid-row: auto;
  }

  .project-grid,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    row-gap: 20px;
  }

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

  .contact-links {
    justify-content: start;
  }

  .research-actions {
    justify-content: start;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1120px);
  }

  .topbar {
    min-height: 0;
  }

  .brand {
    font-size: 0.95rem;
  }

  .theme-toggle .toggle-label {
    display: none;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.35rem);
  }

  .hero {
    padding: 34px 0 42px;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .availability {
    align-items: flex-start;
    border-radius: 8px;
  }

  .scroll-cue {
    bottom: 18px;
    margin-top: 0;
  }

  .signal-panel {
    padding: 16px;
  }

  .signal-panel .panel-kicker,
  .signal-panel .neural-panel {
    display: none;
  }

  .panel-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .neural-panel {
    gap: 10px;
    margin-bottom: 16px;
  }

  .network-stage {
    display: none;
  }

  .training-readout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .training-readout span,
  .training-readout label {
    min-height: 76px;
    padding: 10px 9px;
    font-size: 0.62rem;
  }

  .training-readout strong,
  .training-readout input {
    font-size: 0.95rem;
  }

  .train-button {
    min-height: 46px;
  }

  .section,
  .section-band {
    padding: 54px 0;
  }

  .timeline-item,
  .project-card,
  .research-card,
  .skill-groups article,
  .award-list p {
    padding: 18px;
  }

  .research-actions,
  .contact-links {
    width: 100%;
  }

  .research-actions a,
  .contact-links a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }
}

@media (max-width: 390px) {
  .site-shell {
    width: min(100% - 18px, 1120px);
  }

  .theme-toggle {
    margin-left: auto;
  }

  h1 {
    font-size: clamp(2.25rem, 14vw, 2.9rem);
  }

  .availability {
    font-size: 0.72rem;
  }

  .network-stage {
    display: none;
  }

  .metrics div {
    padding: 14px;
  }
}
