/* ==========================================================================
   hibryce.com / Bryce Evans
   Design system: instrument panel. Near-black ground, warm paper text, a
   single amber signal color, and hairline rules doing the structural work
   instead of cards. Type is one grotesque (Archivo, variable) for voice and
   one mono (IBM Plex) for metadata: index numbers, labels, stack lists. That
   way technical information always looks like data.
   ========================================================================== */

/* --------------------------------------------------------------------------
   FONTS. Self-hosted latin subsets. No third-party connection on the
   critical path; both faces are preloaded from the document head.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var-latin.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plexmono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* ground */
  --void: #08090b;
  --panel: #0d0f13;
  --panel-2: #12151a;
  /* a single light surface, used once, on purpose */
  --card: #e9e6e0;
  --card-ink: #14161a;

  /* text: all three clear 4.5:1 on --void */
  --paper: #eceae5;
  --muted: #9296a0;
  --faint: #787d87;

  /* rules */
  --line: rgba(236, 234, 229, 0.11);
  --line-2: rgba(236, 234, 229, 0.06);

  /* signal */
  --signal: #f0a92b;
  --signal-hot: #ffc04d;
  --signal-wash: rgba(240, 169, 43, 0.09);

  /* type */
  --display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* rhythm */
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1240px;
  --rule: 1px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  background: var(--void);
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(15.5px, 0.42vw + 14px, 17px);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--signal); color: #0a0a0a; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  background: var(--signal);
  color: #0a0a0a;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 10px 16px;
  border-radius: 2px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* --------------------------------------------------------------------------
   LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: clamp(72px, 10vw, 138px); }
.section + .section { border-top: var(--rule) solid var(--line-2); }

/* Section header: mono index on the left, title on the right. The index is the
   spine of the whole page, so every section is numbered like a schematic. */
.s-head {
  display: grid;
  grid-template-columns: minmax(76px, 152px) 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  margin-bottom: clamp(38px, 5vw, 68px);
}
.s-idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--faint);
  padding-top: 0.7em;
  white-space: nowrap;
}
.s-title {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.028em;
  max-width: 18ch;
}
.s-lede {
  margin-top: 1.15rem;
  color: var(--muted);
  max-width: 56ch;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.12rem);
}
@media (max-width: 640px) {
  .s-head { grid-template-columns: 1fr; gap: 12px; }
  .s-idx { padding-top: 0; }
}

/* mono label used above blocks */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
}
.label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  padding: 14px 22px;
  border: var(--rule) solid transparent;
  border-radius: 2px;
  transition: background 0.28s var(--ease), color 0.28s var(--ease),
    border-color 0.28s var(--ease), transform 0.28s var(--ease);
  min-height: 46px;
}
.btn .arw { transition: transform 0.32s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.btn-primary { background: var(--signal); color: #0a0a0a; font-weight: 500; }
.btn-primary:hover { background: var(--signal-hot); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(236, 234, 229, 0.04); }

/* --------------------------------------------------------------------------
   NAV
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
  padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  border-bottom: var(--rule) solid transparent;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease),
    border-color 0.4s var(--ease);
}
.nav.is-stuck {
  background: rgba(8, 9, 11, 0.82);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom-color: var(--line-2);
  padding-block: 12px;
}
/* scroll progress, sitting on the nav's bottom rule */
.nav-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--signal);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.nav.is-stuck .nav-progress { opacity: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
  padding-block: 6px;
}
.brand-mark {
  width: 9px; height: 9px;
  background: var(--signal);
  flex: none;
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(45deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}
.nav-links a {
  position: relative;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding-block: 6px;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.34s var(--ease);
}
.nav-links a:hover { color: var(--paper); }
.nav-links a.is-active { color: var(--paper); }
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a .n { color: var(--faint); margin-right: 0.45em; }

.nav-right { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
.nav-cta {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--paper);
  border: var(--rule) solid var(--line);
  border-radius: 2px;
  padding: 9px 15px;
  transition: border-color 0.28s var(--ease), background 0.28s var(--ease);
}
.nav-cta:hover { border-color: var(--signal); background: var(--signal-wash); }

/* burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.burger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--paper);
  transition: transform 0.36s var(--ease), opacity 0.2s linear;
}
.nav-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile panel */
.menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--void);
  padding: 96px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease),
    visibility 0s linear 0.36s;
}
.nav-open .menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease),
    visibility 0s;
}
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(13px, 2.4vh, 19px) 0;
  border-bottom: var(--rule) solid var(--line-2);
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(14px);
}
.nav-open .menu-links a {
  animation: menu-in 0.5s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 45ms + 90ms);
}
@keyframes menu-in { to { opacity: 1; transform: none; } }
.menu-links a .n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--signal);
}
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  padding-top: 22px;
}
.menu-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.menu-foot a:hover { color: var(--paper); border-color: var(--signal); }

/* no JS means no panel to open, so never let it flash into view */
.menu[hidden] { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
}
@media (min-width: 901px) {
  .menu { display: none; }
}
/* the link numbers are a nicety; drop them before the bar gets crowded */
@media (max-width: 1120px) {
  .nav-links a .n { display: none; }
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(92svh, 880px);
  display: flex;
  align-items: center;
  padding-top: 108px;
  padding-bottom: clamp(40px, 7vh, 80px);
  overflow: hidden;
}
/* the wireframe globe: a real 3-D graticule projected to 2-D, cropped by the
   right edge. Same math as the projection work in the overlay project. */
.hero-fig {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -14vw;
  translate: 0 -50%;
  width: min(96vh, 860px);
  aspect-ratio: 1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 96%);
  mask-image: radial-gradient(closest-side, #000 58%, transparent 96%);
}
.hero-fig canvas { width: 100%; height: 100%; }
@media (max-width: 900px) {
  /* on a phone the graticule sits directly behind the copy, so drop it to a
     texture and let the headline keep its contrast */
  .hero-fig { width: min(108vw, 560px); right: -30vw; top: 38%; opacity: 0.5; }
}

.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3em 0.85em;
  margin-bottom: clamp(20px, 3vw, 30px);
}
.hero-eyebrow b { color: var(--paper); font-weight: 500; }
.hero-eyebrow .he-rest::before { content: "·"; margin-right: 0.7em; color: var(--faint); }
@media (max-width: 560px) {
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 0.15em; }
  .hero-eyebrow .he-rest { flex-basis: 100%; }
  .hero-eyebrow .he-rest::before { content: none; }
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

h1 {
  font-size: clamp(1.85rem, 8.6vw, 5.1rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 16ch;
  margin-bottom: clamp(22px, 3vw, 32px);
}
h1 .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
h1 .ln > span { display: block; will-change: transform; }
h1 em { font-style: normal; color: var(--signal); }

.hero-sub {
  color: var(--muted);
  max-width: 54ch;
  font-size: clamp(1rem, 0.55vw + 0.92rem, 1.16rem);
  margin-bottom: clamp(28px, 4vw, 40px);
}
.hero-sub strong { color: var(--paper); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* pre-intro state: JS + motion available means the hero animates in */
.anim .hero-inner { opacity: 0; }

/* --------------------------------------------------------------------------
   SPEC BAR. Hard facts, laid out like an instrument readout
   -------------------------------------------------------------------------- */
.spec {
  position: relative;
  z-index: 2;
  border-top: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  background: var(--panel);
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--rule);
  background: var(--line-2);
}
.spec-cell {
  background: var(--panel);
  padding: clamp(18px, 2.4vw, 26px) clamp(16px, 2vw, 26px);
  position: relative;
  transition: background 0.4s var(--ease);
}
.spec-cell::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 2px;
  width: 22px;
  background: var(--signal);
  transition: width 0.55s var(--ease);
}
.spec-cell:hover { background: var(--panel-2); }
.spec-cell:hover::after { width: 100%; }
.spec-cell dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.spec-cell dd {
  font-size: clamp(0.95rem, 0.5vw + 0.85rem, 1.08rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.spec-cell dd small {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 5px;
}
@media (max-width: 820px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .spec-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   PROFILE
   -------------------------------------------------------------------------- */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.profile-copy .txt {
  font-size: clamp(1.05rem, 0.7vw + 0.94rem, 1.34rem);
  line-height: 1.55;
  letter-spacing: -0.014em;
  color: var(--paper);
  max-width: 40ch;
}
.profile-copy .txt + .txt {
  margin-top: 1.1em;
  font-size: clamp(0.98rem, 0.4vw + 0.9rem, 1.06rem);
  line-height: 1.66;
  letter-spacing: 0;
  color: var(--muted);
  max-width: 52ch;
}
.profile-copy strong { color: var(--paper); font-weight: 500; }
.profile-copy a.ilink {
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.25s var(--ease);
}
.profile-copy a.ilink:hover { border-color: var(--signal); }

/* The one light surface on the site: a crew-badge card. The headshot was shot
   on white, so `multiply` drops its background straight into the card stock
   instead of leaving a white rectangle floating on black. */
.badge {
  background: var(--card);
  color: var(--card-ink);
  border-radius: 3px;
  padding: 14px 14px 16px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  justify-self: end;
  width: 100%;
  max-width: 320px;
}
.badge-photo {
  position: relative;
  aspect-ratio: 410 / 300;
  overflow: hidden;
  border-radius: 2px;
  background: var(--card);
}
.badge-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  mix-blend-mode: multiply;
  filter: saturate(0.9) contrast(1.03);
}
.badge-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.55;
}
.badge-meta dt { color: rgba(20, 22, 26, 0.52); letter-spacing: 0.08em; }
.badge-meta dd { color: var(--card-ink); }
.badge-rule {
  height: 1px;
  background: rgba(20, 22, 26, 0.14);
  margin-top: 13px;
}
.badge-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.badge-name b {
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

@media (max-width: 1000px) {
  .profile-grid { grid-template-columns: minmax(68px, 128px) minmax(0, 1fr); }
  .badge { grid-column: 2; justify-self: start; margin-top: 34px; }
}
@media (max-width: 640px) {
  .profile-grid { grid-template-columns: 1fr; }
  .badge { grid-column: 1; max-width: 300px; }
}

/* --------------------------------------------------------------------------
   EXPERIENCE. Full-bleed rows on hairlines, no cards
   -------------------------------------------------------------------------- */
.roles, .works { list-style: none; }
.roles { border-top: var(--rule) solid var(--line); }
.role {
  position: relative;
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(30px, 4.2vw, 52px);
  border-bottom: var(--rule) solid var(--line);
  transition: background 0.45s var(--ease);
}
/* the amber rule draws across the row's top edge on hover. The row itself
   responds, so there is no card lift and no shadow */
.role::before {
  content: "";
  position: absolute;
  inset: -1px auto auto 0;
  height: 1px;
  width: 0;
  background: var(--signal);
  transition: width 0.7s var(--ease);
}
.role:hover { background: linear-gradient(96deg, rgba(240, 169, 43, 0.045), transparent 62%); }
.role:hover::before { width: 100%; }

.role-when {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 0.45em;
}
.role-when b { display: block; color: var(--signal); font-weight: 400; }
.role-when small { display: block; color: var(--faint); font-size: 0.98em; }
.role-when small:first-of-type { margin-top: 8px; }

.role-head h3 {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.role-org {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--muted);
}
.role-org b { color: var(--paper); font-weight: 500; }
.role-lede {
  margin-top: 16px;
  color: var(--paper);
  font-size: 1.02rem;
  line-height: 1.58;
  max-width: 42ch;
}

.role-notes { list-style: none; display: grid; gap: 11px; padding-top: 0.5em; }
.role-notes li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.965rem;
  line-height: 1.6;
}
.role-notes li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.68em;
  width: 9px; height: 1px;
  background: var(--faint);
}
.role-notes b { color: var(--paper); font-weight: 500; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.stack span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: var(--rule) solid var(--line);
  border-radius: 2px;
  padding: 5px 9px;
  white-space: nowrap;
}

/* the earlier-career row is deliberately quieter */
.role-quiet { padding-block: clamp(26px, 3vw, 38px); }
.role-quiet .role-head h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 500; }
.role-quiet .txt { color: var(--muted); font-size: 0.965rem; max-width: 62ch; }

@media (max-width: 900px) {
  .role { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .role-when { padding-top: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
  .role-when b { display: inline; }
  .role-when small,
  .role-when small:first-of-type { display: inline; margin: 0; }
  .role-notes { padding-top: 0; }
}

/* --------------------------------------------------------------------------
   WORK / PROJECTS
   -------------------------------------------------------------------------- */
.works { border-top: var(--rule) solid var(--line); }
.work {
  position: relative;
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(32px, 4.6vw, 58px);
  border-bottom: var(--rule) solid var(--line);
}
.work-idx {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  padding-top: 0.5em;
}
.work-idx b { display: block; color: var(--signal); font-weight: 400; letter-spacing: 0.06em; }
.work-idx small { display: block; margin-top: 6px; font-size: 0.98em; }

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.work-grid > .schematic { grid-column: 1 / -1; }

.work h3 {
  font-size: clamp(1.5rem, 2.7vw, 2.05rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 22ch;
}
.work-lede {
  margin-top: 15px;
  color: var(--paper);
  font-size: 1.02rem;
  line-height: 1.58;
  max-width: 46ch;
}
.work-detail { color: var(--muted); }
.work-detail .txt { font-size: 0.965rem; line-height: 1.62; max-width: 52ch; }
.work-detail .txt + .txt { margin-top: 0.85em; }
.work-detail b { color: var(--paper); font-weight: 500; }

/* problem / approach / result, with mono keys */
.facets { display: grid; gap: 14px; }
.facet { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.facet dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.facet dd { color: var(--muted); font-size: 0.965rem; line-height: 1.6; }
.facet dd b { color: var(--paper); font-weight: 500; }
@media (max-width: 520px) {
  .facet { grid-template-columns: 1fr; gap: 4px; }
}

.work-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; }
.work-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: border-color 0.28s var(--ease), color 0.28s var(--ease);
  min-height: 30px;
}
.work-links a:hover { border-color: var(--signal); color: var(--signal); }
.work-links a .arw { transition: transform 0.3s var(--ease); }
.work-links a:hover .arw { transform: translate(3px, -3px); }
/* pipeline schematic for the flagship project */
.schematic {
  position: relative;
  margin-top: clamp(24px, 3vw, 34px);
  border: var(--rule) solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  padding: clamp(16px, 2.2vw, 24px);
}
.sch-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.schematic svg { width: 100%; min-width: 540px; height: auto; }
.schematic figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--faint);
  margin-top: 14px;
  line-height: 1.6;
}
.sch-hint { display: none; }
/* narrow screens scroll the diagram sideways, so say so and fade the edge */
@media (max-width: 720px) {
  .schematic::after {
    content: "";
    position: absolute;
    top: 1px; right: 1px; bottom: 1px;
    width: 56px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, rgba(13, 15, 19, 0), var(--panel) 62%);
    pointer-events: none;
  }
  .sch-hint {
    display: block;
    position: relative;
    z-index: 1;
    margin-top: 12px;
    text-align: right;
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
  }
}
.sch-box { fill: #12151a; stroke: rgba(236, 234, 229, 0.16); }
.sch-box-hi { fill: rgba(240, 169, 43, 0.07); stroke: rgba(240, 169, 43, 0.42); }
.sch-t { fill: #eceae5; font-family: var(--mono); font-size: 11px; }
.sch-s { fill: #787d87; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; }
.sch-l { stroke: rgba(236, 234, 229, 0.2); stroke-width: 1; fill: none; }
.sch-l-hi { stroke: #f0a92b; stroke-width: 1; opacity: 0.5; fill: none; }
.sch-arw { fill: #787d87; }

@media (max-width: 900px) {
  .work { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .work-idx { padding-top: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .work-idx b, .work-idx small { display: inline; margin: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   CAPABILITIES
   -------------------------------------------------------------------------- */
.caps { border-top: var(--rule) solid var(--line); }
.cap {
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 34px);
  padding-block: clamp(20px, 2.6vw, 30px);
  border-bottom: var(--rule) solid var(--line-2);
  align-items: baseline;
}
.cap-k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}
.cap-note { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.cap-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cap-list span {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--paper);
  border: var(--rule) solid var(--line);
  border-radius: 2px;
  padding: 6px 10px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cap-list span:hover { border-color: rgba(240, 169, 43, 0.45); background: var(--signal-wash); }

.certs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--rule);
  background: var(--line-2);
  border: var(--rule) solid var(--line);
  border-radius: 3px;
  margin-top: clamp(32px, 4vw, 48px);
  overflow: hidden;
}
.cert {
  background: var(--panel);
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cert svg { width: 26px; height: 26px; flex: none; color: var(--signal); }
.cert b { display: block; font-size: 1.02rem; font-weight: 500; letter-spacing: -0.015em; }
.cert span {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}
@media (max-width: 820px) {
  .cap { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* --------------------------------------------------------------------------
   WRITING
   -------------------------------------------------------------------------- */
.piece {
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding-block: clamp(26px, 3.4vw, 40px);
  border-top: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  position: relative;
  transition: background 0.45s var(--ease);
}
.piece:hover { background: linear-gradient(96deg, rgba(240, 169, 43, 0.045), transparent 62%); }
.piece-when { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); padding-top: 0.4em; }
.piece-when b { display: block; color: var(--signal); font-weight: 400; }
.piece h3 {
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.14;
}
.piece h3 a::after { content: ""; position: absolute; inset: 0; }
.piece .txt { color: var(--muted); font-size: 0.965rem; margin-top: 10px; max-width: 62ch; }
.piece .go {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  white-space: nowrap;
  align-self: center;
  transition: color 0.28s var(--ease);
}
.piece:hover .go { color: var(--signal); }
.piece .go .arw { transition: transform 0.3s var(--ease); }
.piece:hover .go .arw { transform: translate(3px, -3px); }
@media (max-width: 820px) {
  .piece { grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
  .piece-when { display: flex; gap: 12px; }
  .piece-when b { display: inline; }
}

/* --------------------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------------------- */
.contact { background: var(--panel); border-top: var(--rule) solid var(--line); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(76px, 152px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
}
.contact h2 {
  font-size: clamp(2.1rem, 6.4vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.contact h2 em { font-style: normal; color: var(--signal); }
.contact-lede { color: var(--muted); max-width: 48ch; margin-top: 22px; font-size: 1.05rem; }

.channels { margin-top: clamp(32px, 4vw, 48px); border-top: var(--rule) solid var(--line); }
.channel {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-block: 17px;
  border-bottom: var(--rule) solid var(--line);
  position: relative;
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease);
}
.channel:hover { padding-left: 12px; background: linear-gradient(96deg, rgba(240, 169, 43, 0.05), transparent 55%); }
.channel-k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.channel-v a { display: inline-flex; align-items: center; min-height: 28px; }
.channel-v {
  font-family: var(--mono);
  font-size: clamp(0.86rem, 1.6vw, 1.02rem);
  color: var(--paper);
  overflow-wrap: anywhere;
}
.channel .arw { color: var(--faint); transition: transform 0.32s var(--ease), color 0.32s var(--ease); }
.channel:hover .arw { color: var(--signal); transform: translate(3px, -3px); }
.channel a::after { content: ""; position: absolute; inset: 0; }
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 560px) {
  .channel { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .channel-k { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.foot {
  border-top: var(--rule) solid var(--line);
  padding: 26px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  max-width: var(--maxw);
  margin-inline: auto;
}
.foot .up { color: var(--muted); display: inline-flex; align-items: center; gap: 0.6em; min-height: 30px; }
.foot .up:hover { color: var(--signal); }

/* --------------------------------------------------------------------------
   REVEALS. One pattern, applied to blocks and not to every element.
   -------------------------------------------------------------------------- */
.anim .rv {
  opacity: 0;
  transform: translateY(18px);
}
.anim .rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .anim .rv, .anim .hero-inner { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   PRINT. The page doubles as a readable CV on paper
   -------------------------------------------------------------------------- */
@media print {
  .nav, .menu, .hero-fig, .foot, .btn, .schematic { display: none !important; }
  /* whatever has not scrolled into view yet still has to print */
  .anim .rv, .anim .hero-inner { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .section { padding-block: 18pt; border: 0; }
  .hero { min-height: 0; padding-top: 0; }
  h1 { font-size: 26pt; color: #111; }
  .s-title, .work h3, .role-head h3, .contact h2, .piece h3 { color: #111; }
  .role-lede, .work-lede, .profile-copy .txt, .hero-sub, .role-notes li, .work-detail .txt { color: #333; }
  .badge { box-shadow: none; border: 1px solid #ddd; }
  a { color: #111; }
}
