/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4
 * genre: editorial · macrostructure: Marquee Hero
 * H1 marquee knobs: size=xl, alignment=left-bias, underlay=single rule below
 * nav: N9 edge-aligned minimal (cta=text+arrow, wordmark=sans, padding=default)
 * footer: Ft4 dense colophon (family=monospace, layout=single block, includes=date+attribution)
 * theme: custom (tuned) · vibe: "quiet, engineered, near-neutral, editorial"
 * paper: oklch(97.5% 0.004 40) · accent: oklch(48% 0.17 27)
 * display: Cabinet Grotesk · body: Switzer · outlier: JetBrains Mono
 * axes: light / geometric-sans / warm
 * enrichment: none (typography only) · studied: no · context: user-provided
 */

@import url("tokens.css");

/* ==========================================================================
   Fonts — self-hosted, no third-party requests
   ========================================================================== */

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("../fonts/cabinet-grotesk-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip; /* Safari fallback; `clip` keeps position:sticky alive */
  margin: 0;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 400;
  line-height: var(--leading-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: var(--color-selection);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal; /* display is always roman */
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}

p {
  margin: 0;
}

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

a {
  color: inherit;
}

:focus-visible {
  /* Never transitioned — a focus ring must be present the instant focus lands. */
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: var(--z-sticky);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-md);
  background-color: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-sm);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

.prose {
  max-width: var(--measure);
}

.rule {
  height: var(--rule-hair);
  border: 0;
  margin: 0;
  background-color: var(--color-rule);
}

/* The one register that is not the body font, used in exactly two roles:
   the work table's meta column and the colophon. */
.meta {
  font-family: var(--font-outlier);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ==========================================================================
   Links — the typographic CTA (C3). No boxes, no fills.
   ========================================================================== */

.link {
  --underline: currentColor;
  display: inline-block;
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--underline), var(--underline));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size var(--dur-short) var(--ease-out);
}

.link:hover {
  background-size: 100% var(--rule-thick);
}

.link--quiet {
  color: var(--color-ink);
}

.link--quiet:hover {
  color: var(--color-accent);
}

/* Prose links get the same treatment without the inline-block. */
.prose a:not(.link) {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.arrow {
  display: inline-block;
  transition: transform var(--dur-short) var(--ease-out);
}

.link:hover .arrow {
  transform: translateX(0.2em);
}

/* ==========================================================================
   N9 · Edge-aligned minimal nav
   The empty middle is the design. Do not fill it with a link row.
   ========================================================================== */

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-lg);
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

/* The single accent mark on the page's chrome — a full stop, in signal red. */
.nav__wordmark::after {
  content: ".";
  color: var(--color-accent);
}

.nav__action {
  font-size: var(--text-sm);
  white-space: nowrap; /* a nav affordance never wraps to two lines */
}

/* ==========================================================================
   H1 · Marquee hero — the fold is one statement. No subhead, no CTA.
   ========================================================================== */

.hero {
  display: grid;
  align-content: end;
  min-height: min(58dvh, 30rem);
  padding-block: var(--space-2xl) var(--space-xl);
}

.hero__display {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  /* Deliberately narrow so the statement breaks after "Programmers" — a
     one-line marquee at this size leaves the fold looking half-drawn. */
  max-width: 11ch;
}

.hero__display .full-stop {
  color: var(--color-accent);
}

/* ==========================================================================
   Sections — deliberately uneven rhythm. Equal padding everywhere reads flat.
   ========================================================================== */

.section {
  padding-block: var(--space-3xl);
}

.section--work {
  padding-block: var(--space-2xl) var(--space-3xl);
}

.section--practice {
  padding-block: var(--space-4xl) var(--space-3xl);
}

.section--hiring {
  padding-block: var(--space-2xl);
}

.section--contact {
  padding-block: var(--space-4xl) var(--space-3xl);
}

/* S2 · Hanging section head — stacked single column, never tag-left/heading-right. */
.section__head {
  margin-bottom: var(--space-xl);
}

.section__title {
  font-size: var(--text-xl);
}

.section__lede {
  margin-top: var(--space-md);
  color: var(--color-ink-2);
}

/* ==========================================================================
   Work — F3 spec-sheet energy: hairline rules, tabular meta, no cards
   ========================================================================== */

.work {
  border-top: var(--rule-hair) solid var(--color-rule);
}

/* Two columns: the identifying column (name + meta) and the body column.
   This is the spec-sheet shape — it uses the container's width instead of
   leaving half the page blank beside a 60ch measure. */
.work__item {
  display: grid;
  grid-template-columns: minmax(0, var(--label-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.work__line {
  display: grid;
  gap: var(--space-2xs);
  align-content: start;
}

.work__name {
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.work__status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs);
}

/* Status is carried by the word itself, never by colour alone. */
.work__status[data-status="live"] {
  color: var(--color-accent);
}

.work__body {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
  max-width: var(--measure);
}

.work__description {
  color: var(--color-ink-2);
}

.work__note {
  padding-top: var(--space-lg);
  max-width: var(--measure);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ==========================================================================
   Practice — prose, not an icon grid
   ========================================================================== */

.practice__body > * + * {
  margin-top: var(--space-md);
}

.practice__body strong {
  font-weight: 500;
  color: var(--color-ink);
}

/* ==========================================================================
   Contact — the page's one real call to action
   ========================================================================== */

.contact__statement {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-display-s);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
  max-width: 18ch;
  overflow-wrap: anywhere;
  min-width: 0;
}

.contact__actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  font-size: var(--text-md);
}

/* ==========================================================================
   Ft4 · Dense colophon — one block of small mono, ragged right
   ========================================================================== */

.colophon {
  border-top: var(--rule-thick) solid var(--color-ink);
  padding-block: var(--space-xl) var(--space-2xl);
}

.colophon__text {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 78ch;
}

.colophon__text a {
  color: var(--color-ink-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

/* ==========================================================================
   Jobs
   ========================================================================== */

.page-head {
  padding-block: var(--space-3xl) var(--space-xl);
}

.page-head__title {
  font-size: var(--text-3xl);
  max-width: 20ch;
}

.page-head__lede {
  margin-top: var(--space-lg);
  max-width: var(--measure);
  color: var(--color-ink-2);
}

.roles {
  border-top: var(--rule-hair) solid var(--color-rule);
  margin-bottom: var(--space-2xl);
}

.roles__item {
  display: grid;
  /* Wider than the work sheet's label column — role titles are long, and a
     clickable title that wraps mid-phrase reads as a styling error. */
  grid-template-columns: minmax(0, var(--role-col)) minmax(0, 1fr);
  gap: var(--space-sm) var(--space-xl);
  padding-block: var(--space-xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.roles__name {
  font-size: var(--text-lg);
}

.roles__name a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 var(--rule-thick);
  transition: background-size var(--dur-short) var(--ease-out);
}

.roles__name a:hover {
  background-size: 100% var(--rule-thick);
  color: var(--color-accent);
}

.roles__summary {
  max-width: var(--measure);
  color: var(--color-ink-2);
}

/* Job detail body copy */
.job-body {
  max-width: var(--measure);
  padding-bottom: var(--space-2xl);
}

.job-body > * + * {
  margin-top: var(--space-md);
}

.job-body h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-2xl);
}

.job-body ul {
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.job-body li {
  position: relative;
  padding-left: var(--space-lg);
  color: var(--color-ink-2);
}

.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: var(--space-sm);
  height: var(--rule-hair);
  background-color: var(--color-accent);
}

.job-body li ul {
  margin-top: var(--space-sm);
}

.job-foot {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-xl) var(--space-3xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
}

/* ==========================================================================
   Motion — one orchestrated entrance, staggered by DOM index. Nothing else moves.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(8px);
    animation: reveal var(--dur-long) var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 60ms);
  }
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* ==========================================================================
   Responsive — verified at 320 / 375 / 414 / 768
   ========================================================================== */

@media (max-width: 40rem) {
  body {
    font-size: var(--text-base);
  }

  .hero {
    min-height: min(62dvh, 30rem);
    padding-block: var(--space-2xl) var(--space-xl);
  }

  .hero__display {
    max-width: 100%;
  }

  .contact__statement {
    max-width: 100%;
  }

  .section,
  .section--work,
  .section--practice,
  .section--hiring,
  .section--contact {
    padding-block: var(--space-2xl);
  }

  .page-head {
    padding-block: var(--space-2xl) var(--space-lg);
  }

  /* The spec sheets collapse to one column; the identifying block sits above
     its body copy, keeping the same reading order. */
  .work__item,
  .roles__item {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }

  /* Every standalone affordance clears the 44px WCAG hit target on touch.
     `.link` is only ever used on standalone links — prose links are styled
     through `.prose a:not(.link)` — so this can safely apply to all of them. */
  .link,
  .nav__wordmark,
  .roles__name a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
