/* Self-hosted. No third-party font request, no external CSS. */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.cd56e2ec.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geistmono-latin.a15f9d56.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Light ground, white surfaces, deep navy ink, one saturated cobalt.
     Neutrals are biased toward the blue so they read as chosen, not default. */
  --paper:    oklch(0.972 0.004 250);
  --surface:  oklch(1 0 0);
  --ink:      oklch(0.270 0.045 258);
  --ink-soft: oklch(0.505 0.024 258);
  --ink-dim:  oklch(0.520 0.022 258);
  --rule:     oklch(0.905 0.008 258);

  /* The one accent. Cobalt: the color of the sector, and of a mandatory-action
     sign. Carries the hero as a full drench, then appears only as signal. */
  --blue:      oklch(0.520 0.185 258);
  --blue-deep: oklch(0.330 0.110 260);
  --blue-lift: oklch(0.590 0.175 256);
  --blue-wash: oklch(0.950 0.022 258);

  --wrap: 1120px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px oklch(0.27 0.045 258 / 0.05),
            0 8px 24px oklch(0.27 0.045 258 / 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.08; }
p { margin: 0; text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Mono carries data only: voltages, model numbers, dates, counts. */
.data {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Uppercase tracked micro-label. Used for column headers and the section
   kicker only, never scattered above every heading. */
.label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Hero: the drench ---------- */

.hero {
  background: var(--blue);
  color: #fff;
  padding-bottom: clamp(4rem, 9vw, 6rem);
}

.masthead-in {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid oklch(1 0 0 / 0.18);
}
.wordmark { font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.06em; text-transform: uppercase; }
.masthead-mail {
  font-size: 0.9375rem;
  color: #fff;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid oklch(1 0 0 / 0.45);
  transition: border-color 0.2s var(--ease);
}
.masthead-mail:hover { border-bottom-color: #fff; }

.hero-in {
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}

/* The name, two weights. Lifted from the Minimal Resume reference. */
.name {
  font-size: clamp(2.75rem, 6.6vw, 5.25rem);
  font-weight: 300;
  letter-spacing: -0.035em;
}
.name b { font-weight: 800; }

.role {
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 1.9vw, 1.4375rem);
  font-weight: 500;
  color: oklch(1 0 0 / 0.92);
  max-width: 30ch;
}

.lede {
  margin-top: 1.25rem;
  max-width: 44ch;
  color: oklch(1 0 0 / 0.90);
}

/* Key/value spec rows. Lifted from the Startuper reference, but carrying
   equipment and credentials instead of "age" and "address". */
.facts {
  margin-top: 2rem;
  display: grid;
  gap: 0.6rem;
  max-width: 30rem;
}
.facts div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid oklch(1 0 0 / 0.16);
}
.facts dt { color: oklch(1 0 0 / 0.88); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.facts dd { margin: 0; font-size: 0.9375rem; color: #fff; }

.hero .btn { margin-top: 2.25rem; }

.btn {
  display: inline-block;
  background: #fff;
  color: var(--blue-deep);
  font-weight: 700;
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border-radius: 3px;
  box-shadow: var(--shadow);
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease);
}
.btn:hover { background: oklch(0.96 0.02 258); }
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--blue);
  color: #fff;
}
.btn-solid:hover { background: var(--blue-lift); }
.btn-lg { padding: 1.1rem 2.25rem; font-size: 1.125rem; }

/* Portrait: 256px source, so it never renders above 240. White card, the way
   the Startuper reference floats its portrait on the hero. */
.portrait {
  margin: 0;
  background: #fff;
  padding: 10px;
  border-radius: 3px;
  box-shadow: 0 14px 40px oklch(0.20 0.08 260 / 0.28);
  width: 240px;
}
.portrait img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 2px;
}

/* ---------- Sections ---------- */

.sec { padding-block: clamp(4rem, 9vw, 6.5rem); }
.sec-h {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  margin-top: 0.5rem;
}
.sec-intro { margin-top: 1rem; color: var(--ink-soft); max-width: 60ch; }
.sec-head { margin-bottom: 3rem; }

/* ---------- Capabilities: white surfaces on the grey ground ---------- */

/* Exactly four items, so exactly two columns. auto-fit produced three and
   orphaned the fourth in a row of empty cells. */
.caps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 820px) {
  .caps { grid-template-columns: 1fr; }
}

.cap {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.cap h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: 0.75rem; }
.cap p { color: var(--ink-soft); font-size: 0.9875rem; }

.cap-spec { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cap-spec span {
  font-size: 0.75rem;
  color: var(--blue-deep);
  background: var(--blue-wash);
  border-radius: 3px;
  padding: 0.25rem 0.55rem;
}

/* ---------- Full-bleed band ---------- */

.band { margin: 0; }
.band img {
  width: 100%;
  height: clamp(220px, 32vw, 400px);
  object-fit: cover;
}

/* ---------- Field record ---------- */

.roles { list-style: none; margin: 0; padding: 0; }

.role-item {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 0.5rem 3rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--rule);
}
.role-when { color: var(--blue); font-size: 0.8125rem; font-weight: 500; padding-top: 0.35rem; }
.role-item h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: 0.75rem; }
.role-body p { color: var(--ink-soft); max-width: 64ch; }
.role-awards { margin-top: 0.875rem; font-size: 0.8125rem; color: var(--ink-dim) !important; }

/* The built thing. Given a surface of its own because nobody asked for it. */
.build {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blue);
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.build h3 { font-size: 1.3125rem; font-weight: 800; margin-bottom: 0.875rem; }
.build p { color: var(--ink-soft); max-width: 64ch; }

/* ---------- Credentials ---------- */

.creds-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.creds table { width: 100%; border-collapse: collapse; text-align: left; }
.creds thead th { padding-bottom: 0.875rem; border-bottom: 1px solid var(--rule); }
.creds tbody th, .creds tbody td {
  padding: 1rem 1rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.creds tbody tr:last-child th, .creds tbody tr:last-child td { border-bottom: 0; }
.creds tbody th { font-weight: 600; padding-right: 2rem; }
.creds tbody td { color: var(--ink-soft); font-size: 0.9375rem; }

.pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: oklch(0.94 0.005 258);
  color: var(--ink-soft);
}
.pill.on { background: var(--blue-wash); color: var(--blue-deep); font-weight: 600; }

@media (max-width: 640px) {
  .creds thead { display: none; }
  .creds tbody tr { display: block; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
  .creds tbody th, .creds tbody td { display: block; border: 0; padding: 0; }
  .creds tbody th { margin-bottom: 0.35rem; }
  .creds tbody td + td { margin-top: 0.4rem; }
}

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

.contact {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(4.5rem, 10vw, 7rem);
}
.contact h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; }
.contact p { margin-top: 1.25rem; color: oklch(1 0 0 / 0.78); max-width: 46ch; }
.contact .btn { margin-top: 2.5rem; }
.contact :focus-visible { outline-color: #fff; }

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

.foot { padding-block: 2.25rem; font-size: 0.8125rem; color: var(--ink-dim); }
.foot-in { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot a { color: var(--ink-dim); }
.foot a:hover { color: var(--blue); }

/* ---------- Motion ----------
   Reveals enhance an already-visible default. Without JS nothing is hidden. */

.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .hero .reveal.in { transition-delay: calc(var(--i, 0) * 80ms); }
.js .hero .name { --i: 0; }
.js .hero .role { --i: 1; }
.js .hero .lede { --i: 1; }
.js .hero .facts { --i: 2; }
.js .hero p:has(.btn) { --i: 3; }
.js .hero .portrait { --i: 2; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .role-item { grid-template-columns: 1fr; gap: 0.6rem; }
  .role-when { padding-top: 0; }
}

@media (max-width: 760px) {
  .hero-in { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy { order: 2; }
  .portrait { order: 1; }
  .facts div { grid-template-columns: 7rem minmax(0, 1fr); gap: 0.75rem; }
}
