:root {
  --paper: #eef2ef;
  --paper-deep: #e2e9e4;
  --ink: #16233a;
  --ink-soft: #4d5a6c;
  --forest: #2c5b4c;
  --contour: #b9c8bf;
  --blaze: #e4a62e;
  --blaze-ink: #3a2a05;
  --rule: #c8d2cc;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--forest); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blaze); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-header nav { display: flex; gap: 1.5rem; font-size: 1rem; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

/* Hero */
.hero { position: relative; overflow: hidden; min-height: min(86vh, 46rem); display: flex; align-items: flex-end; border-bottom: 1px solid var(--rule); margin-top: -4.5rem; padding-top: 4.5rem; }
.topo { position: absolute; inset: 0; width: 100%; height: 100%; }
.topo path { fill: none; vector-effect: non-scaling-stroke; }
.topo-minor path { stroke: var(--contour); stroke-width: 1; }
.topo-major path { stroke: #9fb3a7; stroke-width: 1.6; }
.route { stroke: var(--blaze); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.waypoints circle { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.summit path { fill: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .route { stroke-dashoffset: 1; animation: run 2.4s cubic-bezier(.45,.05,.3,1) .3s forwards; }
  .waypoints circle { opacity: 0; animation: pop .3s ease-out forwards; }
  .waypoints circle:nth-child(1) { animation-delay: 1.0s; }
  .waypoints circle:nth-child(2) { animation-delay: 1.6s; }
  .waypoints circle:nth-child(3) { animation-delay: 2.4s; }
}
@keyframes run { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

.hero-copy { position: relative; padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero-copy::before { content: ""; position: absolute; inset: -2rem -3rem 0 -3rem; background: radial-gradient(closest-side, rgba(238,242,239,.95), rgba(238,242,239,.85) 60%, rgba(238,242,239,0)); z-index: -1; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  line-height: .95;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
  max-width: 11ch;
}
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; max-width: 34rem; margin: 0 0 2rem; color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.btn { display: inline-block; background: var(--blaze); color: var(--blaze-ink); font-weight: 700; text-decoration: none; padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid var(--blaze); }
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.text-link { color: var(--ink); font-weight: 700; }

/* Sections */
section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1rem; }
.section-intro { max-width: var(--measure); color: var(--ink-soft); margin: 0 0 2.5rem; }

/* Work list */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.work-list li { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr auto; gap: .5rem 2rem; align-items: baseline; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.work-list h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; margin: 0; letter-spacing: -0.01em; }
.work-list p { margin: 0; max-width: var(--measure); }
.status { font-size: .95rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem; color: var(--ink-soft); }
.status::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--ink-soft); }
.status.open { color: var(--forest); font-weight: 700; }
.status.open::before { background: var(--forest); border-color: var(--forest); }
@media (max-width: 700px) {
  .work-list li { grid-template-columns: 1fr; }
}

/* About */
.about { background: var(--paper-deep); }
.about .wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem 4rem; }
.about p { margin: 0 0 1rem; max-width: var(--measure); }
@media (max-width: 800px) { .about .wrap { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--ink); color: var(--paper); }
.contact h2 { color: var(--paper); }
.contact p { max-width: var(--measure); color: #c9d2dd; margin: 0 0 2rem; }
.email-link { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 5vw, 3rem); letter-spacing: -0.025em; color: var(--blaze); text-decoration: none; word-break: break-word; border-bottom: 3px solid currentColor; padding-bottom: .1em; }
.email-link:hover { color: var(--paper); }
.contact :focus-visible { outline-color: var(--paper); }

/* Footer */
.site-footer { background: var(--ink); color: #9fadbf; font-size: .95rem; border-top: 1px solid #2c3a52; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.site-footer a { color: #dfe6ee; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-footer p { margin: 0; }

/* Plain pages (privacy, 404) */
.page { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.page h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; margin: 0 0 1rem; }
.page h2 { font-size: 1.25rem; margin-top: 2.5rem; }
.page p, .page li { max-width: var(--measure); }
.page .updated { color: var(--ink-soft); }

@media (max-width: 700px) {
  .hero { min-height: 0; padding-top: 9rem; }
  .route { opacity: .6; }
  .waypoints, .summit { display: none; }
}

@media (max-width: 560px) {
  .site-header nav { gap: 1rem; font-size: .95rem; }
  .site-header nav .hide-sm { display: none; }
}
