/* ==========================================================================
   Concept Zero — single stylesheet
   Loaded once, cached across every page. No JS, no webfonts, no images in CSS.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Ink — cool, deep, never pure black */
  --void: #0a0e14;
  --plate: #121822;
  --plate-hi: #172030;
  --rule: #232c38;
  --rule-hi: #33404f;

  /* Type — warm bone against the cool ground */
  --bone: #e7e4dd;
  --dim: #8b97a6;
  --dimmer: #5d6875;

  /* The single chromatic note */
  --brass: #d9a441;
  --brass-dim: #8a6a2b;
  --brass-wash: #d9a4411f;

  /* Faces. Swap these three for self-hosted woff2 later; nothing else changes.
     Concrete families only — `system-ui` resolves to a monospace face under
     some Linux fontconfig setups, which silently wrecks the body copy. */
  --font-display: "Helvetica Neue", Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
    "Roboto Mono", Menlo, Consolas, monospace;

  /* Measure */
  --rail: 3.25rem;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 68rem;
  --band: clamp(4rem, 8vw, 7.5rem);
}

/* --- Reset ---------------------------------------------------------------- */

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

* {
  margin: 0;
}

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

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

/* --- Base ----------------------------------------------------------------- */

body {
  padding-left: var(--rail);
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--brass);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
}

.skip:focus {
  left: var(--rail);
}

/* --- Signature: the drafting rail ----------------------------------------
   Minor ticks every 14px, major every 98px. Two repeating gradients pinned to
   the rail's inner edge — no image requests, no layout cost.
   ------------------------------------------------------------------------- */

.rail {
  position: fixed;
  inset-block: 0;
  left: 0;
  z-index: 20;
  width: var(--rail);
  border-right: 1px solid var(--rule);
  background-color: var(--void);
  background-image:
    repeating-linear-gradient(
      to bottom,
      var(--rule) 0 1px,
      transparent 1px 14px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--brass-dim) 0 1px,
      transparent 1px 98px
    );
  background-repeat: no-repeat;
  background-size:
    9px 100%,
    18px 100%;
  background-position:
    right 0 top 0,
    right 0 top 0;
}

/* Origin mark — the zero sits at 0,0 */
.rail__origin {
  display: grid;
  place-items: center;
  width: var(--rail);
  height: var(--rail);
  border-bottom: 1px solid var(--rule);
  background: var(--void);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

.rail__origin:hover {
  background: var(--brass);
  color: var(--void);
}

/* Vertical domain, set at the rail's foot */
.rail__mark {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  color: var(--dimmer);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
  text-transform: uppercase;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
}

/* --- Shell ---------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: var(--band);
  border-top: 1px solid var(--rule);
}

.band--flush {
  border-top: 0;
}

/* --- Header --------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 15;
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.15rem;
}

.wordmark {
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark b {
  color: var(--brass);
  font-weight: 500;
}

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

.nav a {
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
  color: var(--bone);
  border-bottom-color: var(--rule-hi);
}

.nav a[aria-current="page"] {
  color: var(--brass);
  border-bottom-color: var(--brass);
}

/* --- Type ----------------------------------------------------------------- */

.label {
  display: block;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-variant-numeric: slashed-zero tabular-nums;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.label--brass {
  color: var(--brass);
}

.display {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 0.96;
  text-wrap: balance;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.06;
  text-wrap: balance;
}

.lede {
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.prose {
  max-width: 58ch;
  color: var(--dim);
}

.prose + .prose {
  margin-top: 1rem;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  padding-block: clamp(4rem, 12vw, 9.5rem) var(--band);
}

.hero .label {
  margin-bottom: 1.75rem;
}

.hero .lede {
  margin-top: 1.75rem;
  max-width: 52ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.75rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--brass);
  background: var(--brass);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: transparent;
  color: var(--brass);
}

.btn--ghost {
  border-color: var(--rule-hi);
  background: transparent;
  color: var(--bone);
}

.btn--ghost:hover {
  border-color: var(--bone);
  background: var(--bone);
  color: var(--void);
}

/* --- Section heads -------------------------------------------------------- */

.head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.head .lede {
  margin-top: 0.9rem;
}

/* A head that is the whole section shouldn't reserve space for content below it */
.head:last-child {
  margin-bottom: 0;
}

.head__text {
  flex: 1 1 24rem;
}

.head .label {
  margin-bottom: 1rem;
}

/* --- Capabilities: a spec table ------------------------------------------- */

.spec {
  border-top: 1px solid var(--rule);
}

.spec__row {
  display: grid;
  gap: 0.35rem 2.5rem;
  grid-template-columns: 1fr;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.spec__row dt {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.spec__row dd {
  color: var(--dim);
  font-size: 0.9375rem;
  margin: 0;
}

.spec__row .label {
  color: var(--dimmer);
}

/* --- Work cards ----------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--plate);
  transition: background 0.15s ease;
}

.card:hover {
  background: var(--plate-hi);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.card__title a {
  text-decoration: none;
  border-bottom: 1px solid var(--brass-dim);
}

.card__title a:hover {
  border-bottom-color: var(--brass);
  color: var(--brass);
}

.card p {
  color: var(--dim);
  font-size: 0.9375rem;
}

.card__media {
  order: -1;
  margin: calc(-1 * clamp(1.5rem, 3vw, 2.25rem));
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.card__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Redacted: corner trimmed, the way a classified page is cut */
.card--nda {
  clip-path: polygon(0 0, calc(100% - 1.25rem) 0, 100% 1.25rem, 100% 100%, 0 100%);
}

.redact {
  display: block;
  width: clamp(6rem, 40%, 11rem);
  height: 0.9rem;
  background: repeating-linear-gradient(
    -60deg,
    var(--rule-hi) 0 4px,
    var(--rule) 4px 8px
  );
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.stack li {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--rule-hi);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-variant-numeric: slashed-zero tabular-nums;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Featured project ----------------------------------------------------- */

.feature {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border: 1px solid var(--rule);
  background: var(--plate);
}

.feature__media {
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.feature__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1.75rem, 4vw, 3rem);
}

.feature__body .title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.feature__body p {
  max-width: 44ch;
  color: var(--dim);
}

/* --- Team ----------------------------------------------------------------- */

.roster {
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.person {
  display: flex;
  flex-direction: column;
  background: var(--plate);
}

.person__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-bottom: 1px solid var(--rule);
  background: var(--void);
}

.person__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
}

.person__name {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.person__body p {
  color: var(--dim);
  font-size: 0.9375rem;
}

.person__link {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.person__link:hover {
  color: var(--brass);
}

/* --- Contact -------------------------------------------------------------- */

.contact__mail {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 2px solid var(--brass-dim);
}

.contact__mail:hover {
  color: var(--brass);
  border-bottom-color: var(--brass);
}

/* --- Footer --------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.foot p,
.foot a {
  color: var(--dimmer);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-variant-numeric: slashed-zero tabular-nums;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  color: var(--brass);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* --- Error page ----------------------------------------------------------- */

.void {
  display: grid;
  align-content: center;
  min-height: 78vh;
  padding-block: var(--band);
}

.void__code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 16vw, 10rem);
  font-variant-numeric: slashed-zero tabular-nums;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brass);
}

/* --- Responsive ----------------------------------------------------------- */

@media (min-width: 40rem) {
  .spec__row {
    grid-template-columns: 8rem 1fr 1fr;
    align-items: baseline;
  }

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

  .roster {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60rem) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .roster {
    grid-template-columns: repeat(4, 1fr);
  }

  .feature {
    grid-template-columns: 1.1fr 1fr;
  }

  .feature__media {
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .feature__media img {
    height: 100%;
    aspect-ratio: auto;
  }
}

/* Below the rail's useful width, drop it and run a horizontal ruler instead */
@media (max-width: 52rem) {
  :root {
    --rail: 0px;
  }

  .rail {
    position: static;
    width: 100%;
    height: 11px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    background-image:
      repeating-linear-gradient(
        to right,
        var(--rule-hi) 0 1px,
        transparent 1px 14px
      ),
      repeating-linear-gradient(
        to right,
        var(--brass) 0 1px,
        transparent 1px 98px
      );
    background-size:
      100% 6px,
      100% 11px;
    background-position:
      left 0 bottom 0,
      left 0 bottom 0;
  }

  .rail__origin,
  .rail__mark {
    display: none;
  }
}

/* --- Motion --------------------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  :root {
    --rail: 0px;
  }

  .rail,
  .masthead,
  .foot {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
