:root {
  --bg: #f5f1e8;
  --bg-strong: #ebe3d3;
  --surface: rgba(255, 255, 255, 0.45);
  --text: #171717;
  --muted: #5b584f;
  --line: rgba(23, 23, 23, 0.12);
  --accent: #265c4b;
  --accent-soft: rgba(38, 92, 75, 0.12);
  --max-width: 1120px;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(38, 31, 14, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(38, 92, 75, 0.1), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, var(--bg) 42%, #f4efe5 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(23, 23, 23, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 72%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.site-header,
.site-footer,
.section,
.hero {
  position: relative;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0 1rem;
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  position: relative;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.section,
.hero,
.site-footer {
  border-top: 1px solid var(--line);
}

.section,
.site-footer {
  padding: 3rem 0;
}

.hero {
  display: block;
  min-height: calc(56svh - 5.75rem);
  padding: 2.6rem 0 2rem;
}

.hero::before {
  position: absolute;
  right: 0;
  top: 1.5rem;
  width: min(38vw, 420px);
  aspect-ratio: 1;
  border-radius: 999px;
  content: "";
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.66), transparent 24%),
    radial-gradient(circle at center, rgba(38, 92, 75, 0.12), rgba(38, 92, 75, 0.015) 62%, transparent 72%);
  filter: blur(10px);
}

.hero-copy {
  max-width: 42rem;
}

.eyebrow,
.feature-kicker,
.timeline-date,
.link-label {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

h1 {
  max-width: 13ch;
  margin: 0.6rem 0 1rem;
  font-size: clamp(3.3rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-heading {
  max-width: 16ch;
}

.hero-line {
  display: block;
}

.hero-accent {
  color: var(--accent);
}

.hero-hours-value {
  display: inline;
  margin-right: 0.12em;
  padding: 0.02em 0.16em 0.05em;
  border-radius: 0.18em;
  background: linear-gradient(180deg, rgba(38, 92, 75, 0.16), rgba(38, 92, 75, 0.08));
  box-shadow: inset 0 0 0 1px rgba(38, 92, 75, 0.14);
  color: #14372d;
  white-space: nowrap;
}

.hero-meta {
  margin: -0.1rem 0 0.7rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.hero-now-value {
  color: var(--text);
}

.hero-signal {
  margin: 0 0 0.35rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
}

.hero-detail {
  max-width: 38rem;
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.inline-link:hover,
.inline-link:focus-visible,
.link-tile:hover,
.link-tile:focus-visible {
  transform: translateY(-2px);
}

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

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
  align-items: end;
}

.section-heading h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(1.85rem, 3.3vw, 2.9rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-title-wide {
  max-width: none;
}

.two-column,
.research-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.two-column p,
.feature-item p,
.timeline-row p:last-child,
.research-item p,
.site-footer p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.feature-list,
.timeline,
.research-list,
.link-grid {
  border-top: 1px solid var(--line);
}

.feature-item,
.timeline-row,
.research-item,
.link-tile {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
  gap: 1.75rem;
  border-top: 1px solid var(--line);
}

.work-clusters {
  min-width: 0;
}

.work-clusters .feature-item:first-child {
  padding-top: 1.15rem;
}

.stack-panel {
  padding: 1.15rem 0 1.15rem 1.5rem;
  border-left: 1px solid var(--line);
}

.cluster-toggle {
  display: flex;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
}

.cluster-toggle-text {
  min-width: 0;
}

.cluster-title,
.cluster-summary {
  display: block;
}

.cluster-title {
  margin-bottom: 0.4rem;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.cluster-summary {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.cluster-icon {
  position: relative;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.3rem;
}

.cluster-icon::before,
.cluster-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1.5px;
  content: "";
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, opacity 180ms ease;
}

.cluster-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cluster-toggle[aria-expanded="true"] .cluster-icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
  opacity: 0;
}

.cluster-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.cluster-body {
  padding-top: 0.3rem;
}

.cluster-body[hidden] {
  display: none;
}

.feature-item h3,
.timeline-row h3,
.research-item h3 {
  margin-bottom: 0.4rem;
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.compact-list {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.compact-list li {
  margin: 0.2rem 0;
  line-height: 1.5;
}

.stack-list {
  padding-left: 1.1rem;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.stack-list li {
  margin: 0.28rem 0;
  line-height: 1.5;
}

.stack-subsection {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.stack-note {
  max-width: 32ch;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.timeline-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1rem;
}

.inline-link {
  display: inline-flex;
  margin-top: 0.45rem;
  color: var(--accent);
  text-decoration: none;
}

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

.link-tile {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 160px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.link-tile strong {
  max-width: 18ch;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.link-tile:nth-child(odd) {
  padding-right: 1.25rem;
}

.link-tile:nth-child(even) {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.footer-meta {
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

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

@media (max-width: 900px) {
  .hero,
  .section-heading,
  .two-column,
  .research-list,
  .link-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .work-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .hero::before {
    right: -1rem;
    width: 260px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }

  .stack-panel {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .link-tile:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .link-tile:nth-child(odd) {
    padding-right: 0;
  }

  .site-footer {
    display: grid;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.9rem;
  }

  h1 {
    max-width: 11ch;
  }

  .hero-heading {
    max-width: 11ch;
  }

  .section,
  .site-footer {
    padding: 2.4rem 0;
  }

  .feature-item h3,
  .timeline-row h3,
  .research-item h3 {
    font-size: 1.2rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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