:root {
  color-scheme: dark;
  --bg: #080b10;
  --bg-soft: #0d1219;
  --panel: #111821;
  --panel-strong: #151e29;
  --text: #eef4f8;
  --muted: #a7b4c2;
  --subtle: #728195;
  --line: rgba(176, 195, 215, 0.16);
  --accent: #72d8e8;
  --accent-strong: #a7edf4;
  --warm: #d7b56d;
  --header-bg: rgba(8, 11, 16, 0.62);
  --surface-bg: rgba(17, 24, 33, 0.8);
  --surface-bg-soft: rgba(13, 18, 25, 0.78);
  --hover-bg: rgba(114, 216, 232, 0.08);
  --grid-line: rgba(255, 255, 255, 0.025);
  --grid-mask: rgba(0, 0, 0, 0.8);
  --hero-image-border: rgba(255, 255, 255, 0.08);
  --primary-text: #061015;
  --card-bg: linear-gradient(145deg, rgba(21, 30, 41, 0.92), rgba(12, 17, 24, 0.92));
  --card-bg-hover: linear-gradient(145deg, rgba(24, 35, 48, 0.96), rgba(13, 19, 27, 0.96));
  --tag-bg: rgba(255, 255, 255, 0.035);
  --page-bg:
    radial-gradient(circle at top left, rgba(114, 216, 232, 0.1), transparent 34rem),
    linear-gradient(180deg, #080b10 0%, #0b1017 52%, #080b10 100%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --max-width: 1120px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --bg-soft: #eef3f7;
  --panel: #ffffff;
  --panel-strong: #f2f7fb;
  --text: #111827;
  --muted: #4f6072;
  --subtle: #6e7d8d;
  --line: rgba(31, 45, 61, 0.14);
  --accent: #006f8a;
  --accent-strong: #004f63;
  --warm: #9b7328;
  --header-bg: rgba(247, 248, 251, 0.74);
  --surface-bg: rgba(255, 255, 255, 0.84);
  --surface-bg-soft: rgba(255, 255, 255, 0.78);
  --hover-bg: rgba(0, 111, 138, 0.08);
  --grid-line: rgba(31, 45, 61, 0.045);
  --grid-mask: rgba(0, 0, 0, 0.48);
  --hero-image-border: rgba(31, 45, 61, 0.08);
  --primary-text: #ffffff;
  --card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 250, 0.96));
  --card-bg-hover: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(233, 243, 248, 0.98));
  --tag-bg: rgba(0, 111, 138, 0.055);
  --page-bg:
    radial-gradient(circle at top left, rgba(0, 111, 138, 0.1), transparent 34rem),
    linear-gradient(180deg, #f7f8fb 0%, #eef3f7 54%, #f9fafb 100%);
  --shadow: 0 24px 70px rgba(23, 37, 52, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, var(--grid-mask), transparent 70%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.section-wrap {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(calc(-100% - 24px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding-inline: max(20px, calc((100% - var(--max-width)) / 2));
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-bg);
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-bg-soft);
}

.site-nav a {
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--hover-bg);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--hover-bg);
}

.theme-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--surface-bg-soft);
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  border-color: rgba(114, 216, 232, 0.34);
  color: var(--text);
  background: var(--hover-bg);
}

.brand:focus-visible,
.skip-link:focus-visible,
.site-nav a:focus-visible,
.theme-toggle:focus-visible,
.button:focus-visible,
.beyond-card:focus-visible,
.contact-panel a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--surface-bg-soft);
  transition: opacity 160ms ease, transform 160ms ease;
}

:root[data-theme="light"] .theme-toggle-icon::after {
  opacity: 0;
  transform: translate(5px, -5px);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 44px;
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: 72px 0 88px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: -2;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero::before {
  background: url("../images/hero/research-systems-hero.jpg") center / cover no-repeat;
  filter: blur(3px) saturate(1.08) contrast(1.04);
  opacity: 0.58;
  transform: translateX(-50%) scale(1.012);
}

.hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 11, 16, 0.82) 0%, rgba(8, 11, 16, 0.5) 43%, rgba(8, 11, 16, 0.24) 100%),
    linear-gradient(180deg, rgba(8, 11, 16, 0.22) 0%, rgba(8, 11, 16, 0.02) 52%, var(--bg) 100%);
}

:root[data-theme="light"] .hero::before {
  opacity: 0.46;
}

:root[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, rgba(247, 248, 251, 0.88) 0%, rgba(247, 248, 251, 0.58) 46%, rgba(247, 248, 251, 0.2) 100%),
    linear-gradient(180deg, rgba(247, 248, 251, 0.14) 0%, rgba(247, 248, 251, 0) 52%, var(--bg) 100%);
}

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

.eyebrow,
.section-kicker,
.project-meta {
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin-bottom: 18px;
  font-size: clamp(3.25rem, 9vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
  line-height: 1.25;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 216, 232, 0.52);
}

.button.primary {
  background: var(--accent);
  color: var(--primary-text);
  border-color: transparent;
}

.button.secondary {
  background: var(--surface-bg);
  color: var(--text);
}

.hero-visual {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--hero-image-border);
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
}

.site-footer,
.beyond-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 48px;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.about-heading {
  position: sticky;
  top: 96px;
}

.about-content {
  color: var(--muted);
  font-size: 1.03rem;
}

.about-lead {
  color: var(--text);
  font-size: clamp(1.16rem, 2vw, 1.35rem);
  line-height: 1.55;
}

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

.about-points div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.about-points dt {
  margin-bottom: 8px;
  color: var(--warm);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.about-points dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

#projects,
.beyond-section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

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

.project-card {
  min-height: 310px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg), var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(114, 216, 232, 0.34);
  background: var(--card-bg-hover), var(--panel-strong);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--warm);
}

.project-meta span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--subtle);
}

.project-card p {
  color: var(--muted);
}

.project-card-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
  gap: 32px;
  align-items: end;
  min-height: auto;
}

.project-card-featured h3 {
  max-width: 620px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.project-card-featured p {
  max-width: 680px;
}

.project-card-featured .tag-list {
  justify-content: flex-end;
  margin-top: 0;
}

.section-action {
  margin-top: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

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

.beyond-heading p:not(.section-kicker) {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
}

.beyond-pathways {
  display: grid;
  gap: 12px;
}

.beyond-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface-bg);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.beyond-card:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 216, 232, 0.34);
  background: var(--hover-bg);
}

.beyond-card span {
  color: var(--warm);
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
}

.beyond-card strong {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
}

.beyond-pathways .button {
  width: fit-content;
  margin-top: 10px;
}

.detail-page {
  padding-bottom: 72px;
}

.page-hero {
  padding: 76px 0 44px;
}

.page-hero h1 {
  max-width: 980px;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 32px 0 80px;
}

.photo-stack {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
  margin: 0;
}

.stack-photo {
  width: min(100%, 360px);
  margin: 0;
}

.stack-photo:nth-child(even) {
  justify-self: end;
}

.stack-photo img,
.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(114, 216, 232, 0.14), rgba(215, 181, 109, 0.12)),
    var(--surface-bg);
  box-shadow: var(--shadow);
  object-fit: cover;
}

.graphic-photo img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--subtle);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-photo figcaption {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.86rem;
  font-weight: 700;
}

.story-content {
  display: grid;
  gap: 24px;
}

.story-block {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.story-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.story-block h2 {
  max-width: 760px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.story-block p:not(.section-kicker) {
  max-width: 760px;
  color: var(--muted);
}

.story-return {
  padding-top: 8px;
}

.detail-grid,
.detail-list {
  display: grid;
  gap: 18px;
  padding: 24px 0 80px;
}

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

.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(114, 216, 232, 0.1), rgba(215, 181, 109, 0.065)),
    var(--surface-bg);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.16);
}

.detail-card h2 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.detail-card p {
  color: var(--muted);
}

.detail-card p:last-child,
.detail-card .tag-list:last-child {
  margin-bottom: 0;
}

.project-detail-card {
  padding: 0;
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.project-detail-card:hover,
.project-detail-card[open] {
  border-color: rgba(114, 216, 232, 0.42);
  background:
    linear-gradient(145deg, rgba(114, 216, 232, 0.15), rgba(215, 181, 109, 0.1)),
    var(--surface-bg);
  box-shadow: 0 22px 66px rgba(0, 0, 0, 0.22);
}

.project-detail-card summary {
  position: relative;
  display: grid;
  gap: 0;
  min-height: 360px;
  align-content: start;
  padding: 42px;
  cursor: pointer;
  list-style: none;
}

.project-detail-card summary::-webkit-details-marker {
  display: none;
}

.project-detail-card summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -6px;
}

.project-summary-heading {
  display: block;
  max-width: 980px;
  margin-top: 18px;
  color: var(--text);
  font-size: clamp(2.5rem, 6vw, 4.85rem);
  font-weight: 800;
  line-height: 0.96;
}

.project-summary-copy {
  display: block;
  max-width: 840px;
  margin-top: 24px;
  color: var(--accent-strong);
  font-size: clamp(1.12rem, 1.7vw, 1.28rem);
  line-height: 1.7;
}

.project-summary-tags {
  margin-top: 28px;
}

.project-summary-tags li {
  border: 1px solid rgba(215, 181, 109, 0.38);
  border-radius: 999px;
  background: rgba(215, 181, 109, 0.11);
  color: var(--warm);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 10px;
}

.project-card-body {
  padding: 2px 42px 42px;
  border-top: 1px solid rgba(114, 216, 232, 0.18);
}

.project-card-body p {
  color: var(--text);
}

.project-card-body p:first-child {
  margin-top: 32px;
}

.expand-control {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  border: 1px solid rgba(114, 216, 232, 0.36);
  border-radius: var(--radius);
  padding: 9px 14px;
  background: rgba(114, 216, 232, 0.08);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.expand-control::before {
  content: "Expand project";
}

.expand-control::after {
  content: "+";
  margin-left: 10px;
  color: var(--warm);
  font-size: 1rem;
}

.project-detail-card[open] .expand-control {
  border-color: rgba(215, 181, 109, 0.42);
  background: rgba(215, 181, 109, 0.09);
  color: var(--warm);
}

.project-detail-card[open] .expand-control::before {
  content: "Collapse project";
}

.project-detail-card[open] .expand-control::after {
  content: "-";
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.project-note {
  color: var(--subtle);
  font-size: 0.92rem;
}

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

.media-preview {
  overflow: hidden;
  border: 1px solid rgba(114, 216, 232, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(114, 216, 232, 0.06), rgba(215, 181, 109, 0.045)),
    var(--surface-bg-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.media-preview:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 216, 232, 0.34);
  background: var(--hover-bg);
}

.media-preview img {
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  object-fit: contain;
}

.research-media-grid .media-preview-wide {
  grid-column: 1 / -1;
}

.annotation-media-grid .media-preview-wide {
  grid-column: 1 / -1;
}

.research-media-grid .media-preview-wide img {
  min-height: 300px;
  aspect-ratio: 21 / 7;
}

.annotation-media-grid .media-preview-wide img {
  min-height: 360px;
  aspect-ratio: 16 / 8;
}

.media-preview span {
  display: block;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.protocol-panel {
  margin-top: 22px;
  border: 1px solid rgba(215, 181, 109, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(215, 181, 109, 0.075), rgba(114, 216, 232, 0.045)),
    rgba(0, 0, 0, 0.16);
}

.protocol-panel-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(215, 181, 109, 0.22);
}

.protocol-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.protocol-panel-header a {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.protocol-panel-header a:hover {
  color: var(--accent-strong);
}

.protocol-panel pre {
  max-height: 380px;
  margin: 0;
  overflow: auto;
  padding: 16px;
}

.protocol-panel code {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre;
}

.contact-page-panel {
  padding: 24px 0 80px;
}

.site-footer {
  align-items: start;
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1fr);
  gap: 64px;
  padding: 72px 0;
}

.contact-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.contact-copy p:not(.section-kicker) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}

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

.contact-panel a {
  display: flex;
  min-height: 74px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface-bg);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.contact-panel a:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 216, 232, 0.34);
  background: var(--hover-bg);
}

.contact-panel .primary-contact {
  grid-column: 1 / -1;
  min-height: 96px;
  background:
    linear-gradient(135deg, rgba(114, 216, 232, 0.12), rgba(215, 181, 109, 0.08)),
    var(--surface-bg);
}

.contact-panel .primary-contact:hover {
  border-color: rgba(215, 181, 109, 0.38);
}

.contact-panel span {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-panel strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.primary-contact strong {
  color: var(--accent-strong);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 16px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .about-section,
  .site-footer,
  .beyond-section,
  .story-layout {
    grid-template-columns: 1fr;
  }

  .about-heading {
    position: static;
  }

  .about-points {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-visual img {
    min-height: 300px;
  }

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

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

  .project-card-featured {
    grid-template-columns: 1fr;
  }

  .project-card-featured .tag-list {
    justify-content: flex-start;
  }

  .project-detail-card summary {
    min-height: 320px;
    padding: 34px;
  }

  .project-card-body {
    padding: 2px 34px 34px;
  }

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

  .project-media-grid {
    grid-template-columns: 1fr;
  }

  .media-preview img,
  .research-media-grid .media-preview-wide img {
    min-height: 240px;
  }

  .photo-stack {
    position: static;
    grid-template-columns: 1fr;
  }

  .stack-photo,
  .stack-photo:nth-child(even) {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 540px) {
  .section-wrap {
    width: min(100% - 28px, var(--max-width));
  }

  .site-header {
    padding-inline: 14px;
  }

  .site-nav a {
    padding: 8px 10px;
  }

  .hero,
  .about-section,
  #projects,
  .beyond-section {
    padding: 56px 0;
  }

  .page-hero {
    padding: 56px 0 24px;
  }

  .story-layout {
    padding-bottom: 56px;
  }

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

  .project-detail-card summary {
    min-height: 300px;
    padding: 26px;
  }

  .project-card-body {
    padding: 2px 26px 26px;
  }

  .project-summary-heading {
    font-size: clamp(2.1rem, 13vw, 3.3rem);
    line-height: 1;
  }

  .project-summary-copy {
    margin-top: 20px;
  }

  .project-summary-tags {
    margin-top: 22px;
  }

  .expand-control {
    margin-top: 26px;
  }

  .media-preview img,
  .research-media-grid .media-preview-wide img {
    min-height: 210px;
  }
}

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