:root {
  --bg: #0d0e10;
  --surface: #131417;
  --border: #1f2125;
  --border-strong: #2a2d32;
  --text: #e8e6e1;
  --text-dim: #a9a8a3;
  --text-muted: #6f7074;
  --accent: #e0a245;
  --gutter: 1.5rem;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  background: linear-gradient(var(--border), var(--border)) center bottom / calc(100% - 2 * var(--gutter))
    1px no-repeat;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.nav nav {
  display: flex;
  gap: 1.5rem;
}

.nav nav a {
  color: var(--text-dim);
  transition: color 0.15s;
}

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

/* Hero */
.hero {
  padding-block: 7rem 5.5rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 36rem;
  margin-top: 1.75rem;
  font-size: 1.1875rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-dim);
}

.signal {
  display: block;
  width: 100%;
  max-width: 890px;
  height: 18px;
  margin-top: 2rem;
  overflow: visible;
  clip-path: inset(-2px 100% -2px 0);
  animation: draw 1.8s ease-out 0.2s forwards;
}

.signal path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

@keyframes draw {
  to {
    clip-path: inset(-2px 0 -2px 0);
  }
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  font-size: 0.875rem;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.btn:hover {
  border-color: var(--accent);
}

.btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sections */
.section {
  padding-block: 4.5rem;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.section-head .mono {
  font-size: 0.75rem;
}

.sub {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* Projects */
.project {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--border);
}

.num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  padding-top: 0.35rem;
}

.body {
  max-width: 34rem;
}

.body h3 {
  font-size: 1.1875rem;
  font-weight: 500;
}

.body p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

.body .tags {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.side {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.35rem;
}

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

/* Path */
.path-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.stage {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.stage.next {
  grid-column: 1 / -1;
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
}

.stage-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.now .marker {
  background: var(--accent);
}

.next .marker {
  background: transparent;
  border: 1.5px solid var(--accent);
  width: 9px;
  height: 9px;
}

.stage ul {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* Stack */
.stack {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  padding-top: 0.25rem;
}

.stack-grid dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stack-grid dd {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* Contact */
.contact {
  padding-block: 6rem 5rem;
}

.pitch {
  max-width: 38rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.mail {
  display: inline-flex;
  gap: 0.6rem;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.9375rem;
}

.mail span {
  transition: transform 0.15s;
}

.mail:hover span {
  transform: translateX(4px);
}

/* Footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1rem 4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 720px) {
  .nav nav {
    gap: 1rem;
  }

  .hero {
    padding-block: 4rem 3.5rem;
  }

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

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

  .path-grid,
  .stack {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  :root {
    --gutter: 1rem;
  }

  .nav nav {
    display: none;
  }

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

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

  .signal {
    animation: none;
    clip-path: none;
  }
}

/* Print / PDF */
@media print {
  @page {
    margin: 0;
  }

  html,
  body {
    background: var(--bg);
  }

  .hero {
    padding-block: 4rem 3.5rem;
  }

  .stack,
  .contact {
    break-inside: avoid;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .site-header {
    position: static;
  }

  .nav nav {
    display: none;
  }

  .signal {
    animation: none;
    clip-path: none;
  }

  .project,
  .stack-grid > div {
    break-inside: avoid;
  }
}
