:root {
  --bg: #0a0a0b;
  --bg-raised: #101012;
  --line: #1e1e22;
  --line-strong: #2c2c32;
  --text: #e9e9ec;
  --muted: #8b8b94;
  --faint: #5c5c65;
  --accent: #e6a537;
  --accent-dim: #6b4d18;
  --green: #4ea877;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  /* min() so a ch-based measure never outgrows a narrow viewport. */
  --measure: min(68ch, 100%);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  /* A faint technical grid, faded out toward the bottom of the fold. */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(120% 80% at 50% -10%, transparent 0%, var(--bg) 62%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

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

ul,
ol,
dl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.85rem;
  background: var(--accent);
  color: #14100a;
  border-radius: 4px;
}

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

/* ---------------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 2.6vw, 0.78rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 480px) {
  .wordmark {
    letter-spacing: 0.16em;
  }
}

.mark {
  flex: none;
  overflow: visible;
}

.mark-brim {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.mark-crown,
.mark-band {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.mark-band {
  stroke: var(--muted);
  stroke-width: 1.5;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

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

/* ------------------------------------------------------------------ hero */

.hero {
  padding: clamp(4rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin: 0 0 2rem;
  font-size: clamp(2.4rem, 7vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  max-width: 16ch;
  text-wrap: balance;
}

.hero-body p {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: min(58ch, 100%);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.stats dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.stats dd {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 1.75rem;
  color: var(--text);
}

/* --------------------------------------------------------------- section */

.section {
  padding: clamp(3rem, 8vh, 5.5rem) var(--gutter);
  border-top: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 2.5rem;
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-index {
  color: var(--accent);
}

/* -------------------------------------------------------------- projects */

.projects {
  border-top: 1px solid var(--line);
}

.project {
  border-bottom: 1px solid var(--line);
}

.project-link {
  display: block;
  padding: 2rem 0 2rem 0;
  position: relative;
  transition: padding-left 180ms ease, background-color 180ms ease;
}

.project-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 220ms ease;
}

a.project-link:hover,
a.project-link:focus-visible {
  padding-left: 1.5rem;
}

a.project-link:hover::before,
a.project-link:focus-visible::before {
  transform: scaleY(1);
}

.project-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.project-index {
  font-size: 0.72rem;
  color: var(--faint);
  letter-spacing: 0.1em;
}

.project-head h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: var(--green);
}

.status-building {
  color: var(--accent);
}

.status-prototype {
  color: var(--faint);
}

.project-tagline {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  color: var(--text);
}

.project-description {
  color: var(--muted);
  max-width: min(62ch, 100%);
}

.project-foot {
  margin-top: 1.25rem;
}

.domain {
  font-size: 0.78rem;
  color: var(--accent);
}

/* ----------------------------------------------------------------- about */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

@media (min-width: 800px) {
  .split {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 3rem;
  }
}

.split-lead .name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.split-lead .muted {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin: 0.25rem 0 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.chips li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

/* ----------------------------------------------------------------- atlas */

.panel {
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--bg-raised);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.panel-title {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title:hover {
  color: var(--accent);
}

.arrow {
  font-size: 0.9rem;
  color: var(--accent);
}

.panel-head .mono {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.panel-tagline {
  font-size: 1.0625rem;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.ticks {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.6rem;
}

.ticks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.ticks li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-dim);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

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

/* ------------------------------------------------------------------- 404 */

.notfound {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--gutter);
  gap: 0.5rem;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.notfound .eyebrow {
  margin: 1rem 0 0;
}

.back {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.back:hover {
  text-decoration: underline;
}
