/* ============================================================
   home.css — Page composition & components (A+C editorial cobalt)
   ============================================================ */

/* ---------------- Underglaze accent — one artwork, two inks ----------------
   Nothing that isolates blending may sit between .accent and the section
   backgrounds — a stacking context there leaves the blend an empty backdrop. */
.accent {
  position: absolute;
  inset: 0;
  z-index: auto;
  pointer-events: none;
}
.accent__ink,
.accent__light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url('../img/bg-porcelain.svg') center / cover no-repeat;
  mask: url('../img/bg-porcelain.svg') center / cover no-repeat;
}
.accent__ink   { background: var(--cobalt);    mix-blend-mode: multiply; }
.accent__light { background: var(--on-cobalt); mix-blend-mode: screen; }

/* the rim rides the same two inks, so its border flips with the leaves */
.accent__rim {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: none;
  -webkit-mask: url('../img/bg-porcelain-rim.svg') center / cover no-repeat;
  mask: url('../img/bg-porcelain-rim.svg') center / cover no-repeat;
}
.accent__rim--ink   { background: var(--cobalt);    mix-blend-mode: multiply; }
.accent__rim--light { background: var(--on-cobalt); mix-blend-mode: screen; }
@media (min-width: 1000px) {
  .accent__rim { display: block; }   /* wide viewports only */
}
@supports not (mix-blend-mode: screen) {
  .accent__light,
  .accent__rim--light { display: none; }  /* degrade to cobalt-only, never black ghosts */
}

/* ---------------- Grain overlay ---------------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: var(--grain);
}

/* ---------------- Scroll progress ---------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cobalt), var(--cobalt-deep));
  z-index: 2000;
}

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background-color var(--dur) var(--ease-soft),
              box-shadow var(--dur) var(--ease-soft),
              backdrop-filter var(--dur) var(--ease-soft);
  background: transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(20, 38, 63, 0.05);
}
.nav__inner {
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color var(--dur) var(--ease-soft);
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--cobalt);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-soft);
}
.nav__links a:hover { color: var(--cobalt); }
.nav__links a:hover::after { transform: scaleX(1); }
/* `.nav__links a` (0,1,1) outranks a bare `.nav__cta` (0,1,0), so the pill needs
   this weight and must sit after the link rules for the white to win. */
.nav__links a.nav__cta {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: #fff;
  transition: background-color var(--dur) var(--ease-soft), transform var(--dur) var(--ease-soft);
}
.nav__links a.nav__cta:hover { color: #fff; background: var(--cobalt-deep); transform: translateY(-1px); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-soft), opacity var(--dur);
}
.nav__toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 990;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 1.5rem var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease-soft);
}
.drawer.is-open { transform: translateX(0); }
.drawer a {
  font-family: var(--font-ui);
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0.7rem 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

/* ---------------- Section scaffolding ---------------- */
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.section-head {
  position: relative;
  margin-bottom: 2.5rem;
}
.section-head .num {
  position: absolute;
  top: -0.2em;
  left: -0.3em;
  font-family: var(--font-titling);   /* was --font-mono: Castoro Titling reads as a titling numeral, not a line number */
  font-weight: 400;
  font-size: var(--fs-numeral);
  line-height: 0.8;
  letter-spacing: 0;   /* the -0.02em was tuned for mono advances */
  color: var(--cobalt);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.section-head h2 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-section);
  line-height: 0.95;
  color: var(--ink);
}

/* Field band (cobalt) — contrast guard: never --muted/--faint here. Must be the
   section's own background — a z-index:-1 pseudo-element drops below the body bg and vanishes. */
.field { background: var(--field); }
.field--alt { background: var(--field-2); }

main > section > .container,
.footer > .container { position: relative; z-index: 1; }
.field .section-head .num,
.field--alt .section-head .num { color: var(--on-cobalt); opacity: 0.35; }
.field .section-head h2,
.field--alt .section-head h2 { color: var(--on-cobalt); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(2rem, 7vw, 5rem));
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 55% at 18% 22%, rgba(31, 78, 140, 0.12), transparent 62%),
    radial-gradient(50% 62% at 82% 38%, rgba(31, 78, 140, 0.08), transparent 62%);
  filter: blur(60px);
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero__kicker {
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  /* 16px/400 text: the fill step and --cobalt-text both fail on this panel, so the
     text is --ink-soft. inline-block matters — a block paints a full-width bar. */
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-sm);
  background: var(--cobalt-soft);
  color: var(--ink-soft);
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: var(--track-display);
  color: var(--ink);
  margin: 0;
}
/* Pseudo-element, not a child node: hero.js types by assigning textContent, which
   destroys children. Empty content keeps it out of the accessibility tree. */
.hero__name::after {
  content: '';
  display: none;
}
.hero__name.is-typing::after {
  display: inline-block;
  /* Zero width + painted border: shows without consuming layout width, so the caret
     can never wrap the last character. The negative margin cancels border and gap. */
  width: 0;
  height: 0.78em;
  border-right: 0.07em solid var(--ink);
  margin-left: 0.02em;
  margin-right: -0.09em;
  vertical-align: baseline;
  animation: caretBlink 1.06s steps(1, end) infinite;
}
.hero__role {
  margin-top: 2.25rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.hero__role em {
  /* Only the radius is live here — the block at the END of this file wins at equal
     specificity, overriding the old porcelain padding/font-style declared above. */
  border-radius: var(--r-sm);
}
.hero__scroll {
  /* transform carries the centring, so every keyframe (entrance, reduced-motion)
     MUST repeat translateX(-50%) — a bare transform:none would un-centre it. */
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  /* --cobalt-text, not --cobalt: this is not WCAG "large text", so it needs 4.5:1
     and the fill step only gives 4.54. */
  color: var(--cobalt-text);
  letter-spacing: 0.06em;
  transition: opacity 0.35s var(--ease-soft);
}
.hero__scroll.is-hidden { opacity: 0; pointer-events: none; }
/* Short viewports: the bottom-centre slot can land on the role text; smaller and
   lower buys back ~35px. It retires on the first scroll anyway. */
@media (max-height: 680px) {
  .hero__scroll { bottom: 0.9rem; font-size: 1rem; }
}
.hero__scroll .arrow { display: inline-block; animation: nudge 2s var(--ease-soft) infinite; }

.hero__portrait {
  position: relative;
  /* The portrait is the LEFT column (order, not DOM order — the h1 stays first in
     the markup so it is read before the decorative image). */
  order: -1;
  /* Travel start as a translateX; positive because it starts right of its landing
     spot. 270px is the desktop fallback — hero.js measures the real distance. */
  --portrait-from: 270px;
}
@media (max-width: 900px) {
  .hero__portrait { --portrait-from: 0px; }
}
.hero__portrait-frame {
  position: relative;
  /* Lands at 1.95s (0.55 + 1.40), which is hero.js's typewriter start. The keyframe fades it up
     as it begins to travel. */
  animation: heroPortraitIn 1.4s var(--ease-soft) both;
  animation-delay: 0.55s;
}

.hero__text {
  /* Sits on the RIGHT column, overlapping the portrait's top-right. The margin-left
     factor 1.8 is the overlap dial, expressed against the gap so it cannot drift. */
  align-self: start;
  position: relative;
  top: 1.5rem;
  margin-left: calc(-1.8 * (clamp(1.5rem, 4vw, 3rem) + 1.5rem));
  z-index: 1;
  /* The typewriter's partial words are unbreakable, so the grid item's auto minimum
     size would grow the track and re-centre the hero — min-width:0 lets it overflow. */
  min-width: 0;
}

/* ---------------- Hero load entrance ---------------- */
/* Transform/opacity only, all `both`; these carry no [data-reveal] — this replaces
   the scroll-reveal. The name is a JS typewriter, so it has no rule here. */
/* Strictly sequential so nothing lands while the name is still typing. These
   numbers and hero.js's START are one timeline - change them together. */
.hero__kicker { animation: heroKickerIn 0.7s var(--ease-soft) both; animation-delay: 1.25s; }
.hero__role   { animation: heroRoleIn 0.8s var(--ease-soft) both;   animation-delay: 3.35s; }
.hero__scroll { animation: heroNudgeIn 0.8s var(--ease-soft) both;  animation-delay: 4.25s; }


@keyframes heroKickerIn  { from { opacity: 0; transform: translateX(-28px); } }
@keyframes heroRoleIn    { from { opacity: 0; transform: translateX(28px); } }
@keyframes heroNudgeIn   { from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
                           50% { transform: translateX(-50%) translateY(2px); }
                           to  { transform: translateX(-50%); } }
@keyframes heroPortraitIn {
  /* fades up over the first quarter of the slide, as boot releases it */
  0%   { opacity: 0; transform: translateX(var(--portrait-from, 25cqw)) scale(0.9); }
  25%  { opacity: 1; }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__kicker, .hero__role, .hero__portrait-frame {
    animation: none;
    opacity: 1;
    transform: none;
  }
  /* No entrance animation, but the centring transform must survive — a `transform:
     none` here would pin the hint to the left edge instead of bottom-centre. */
  .hero__scroll { animation: none; opacity: 1; }
}
.hero__portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  aspect-ratio: 1 / 1;          /* square presentation; object-fit crops the 528x704 source */
  object-fit: cover;
  animation: inkBreathe 6s ease-in-out infinite;
}
/* `display: block` above (0,1,1) beats the UA's `[hidden]` (0,1,0), so the hidden
   attribute would silently fail and render the image twice. */
.hero__portrait-frame img[hidden] { display: none; }
@keyframes inkBreathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.88; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__portrait-frame img { animation: none; }
}

/* ---------------- About ---------------- */
.about { padding-block: clamp(3rem, 8vw, 6rem); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 6vw, 5rem);
}
.about__lead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: var(--track-display);
  color: var(--ink);
  padding-top: 1.5rem;
}
.about__lead em {
  color: var(--cobalt);
}
.about__body p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}
.about__body strong { font-weight: 600; }   /* colour owned by the highlight rule below */
/* OS-selection block: solid ink, inverted text, square corners — a highlight, not a pill */
main strong,
main b {
  font-family: var(--font-display);
  background: var(--cobalt);
  color: #fff;
  padding: 0.12em 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.about__lead em {
  background: var(--cobalt);
  color: #fff;
  padding: 0 0.2em 0.1em;
  line-height: 1.55;
  font-style: normal;
  font-size: 1.35em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* the · separator sits outside this <em>, so only the words are inked */
.hero__role em {
  background: var(--cobalt);
  color: #fff;
  padding: 0.2em 0.2em;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* a cobalt block on a cobalt field is invisible, so the block inverts here */
.field strong,
.field b,
.field--alt strong,
.field--alt b {
  background: var(--on-cobalt);
  color: var(--field);
}
/* actual text selection matches the theme */
::selection { background: var(--cobalt); color: #fff; }
.field ::selection,
.field--alt ::selection { background: var(--on-cobalt); color: var(--field); }

/* ---------------- Experience (cobalt field) ---------------- */
.experience { padding-block: clamp(3rem, 8vw, 6rem); }
.timeline {
  position: relative;
  max-width: 780px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1.5px;
  background: var(--on-cobalt-line);
}
.timeline__item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--field);
  border: 3px solid var(--on-cobalt-soft);
  transition: transform var(--dur) var(--ease-soft), border-color var(--dur);
}
.timeline__item.is-current::before {
  background: var(--on-cobalt);
  border-color: var(--on-cobalt);
  animation: pulse-light 2s infinite;
}
.timeline__item:hover::before { transform: scale(1.25); }
.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--on-cobalt-soft);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.timeline__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-soft), box-shadow var(--dur) var(--ease-soft);
}
.timeline__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.timeline__card h3 {
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.timeline__card .company { font-family: var(--font-ui); font-size: 0.92rem; color: var(--muted); margin-bottom: 1rem; }
.timeline__card p { color: var(--ink-soft); font-size: 1.02rem; }
.timeline__card .bottom-line {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.timeline__card .bottom-line b { color: var(--cobalt); font-weight: 600; }

/* ---------------- Certifications ---------------- */
.certs { padding-block: clamp(3rem, 8vw, 6rem); }
.cert-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: center;
  border-top: 1px solid var(--line);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}
.cert-card__badge { width: 240px; max-width: 100%; }
.cert-card__badge img {
  width: 240px;
  height: auto;
  display: block;
}
.cert-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.cert-card__issuer {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.cert-card__meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.cert-card__meta .id { font-family: var(--font-mono); }
.cert-card__rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.cert-card__verify {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cobalt);
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  transition: background-color var(--dur) var(--ease-soft), border-color var(--dur);
}
.cert-card__verify:hover {
  background: var(--surface);
  border-color: var(--cobalt);
}
.cert-card.is-expired .cert-card__title { opacity: 0.5; }

/* ---------------- Stack (halftone) ---------------- */
.stack {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.stack .container { position: relative; z-index: 1; }
.stack__sub { font-family: var(--font-ui); color: var(--muted); margin-top: 0.4rem; margin-bottom: 2.5rem; }
.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.stack__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding: 1.6rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  transition: transform var(--dur) var(--ease-soft), border-color var(--dur), box-shadow var(--dur);
}
.stack__card:hover {
  transform: translateY(-5px);
  border-color: var(--cobalt-soft);
  box-shadow: var(--shadow-md);
}
.stack__logo {
  width: 44px;
  height: 44px;
  flex: none;
  fill: var(--cobalt);
  opacity: 0.75;
  transition: transform var(--dur) var(--ease-soft), opacity var(--dur) var(--ease-soft);
}
.stack__card:hover .stack__logo { transform: scale(1.1); opacity: 1; }
.stack__card span { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); }

/* hidden inline SVG sprite (shared by the stack grid) */
.logo-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------------- Off-duty (cobalt-deep) ---------------- */
.off-duty { padding-block: clamp(3rem, 8vw, 6rem); }
.off-duty__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: stretch;
}
.off-duty__media {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.off-duty__media video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-lg);
}
/* section subtitle: reads as a header line, not body copy */
.off-duty .section-head p {
  margin-top: 0.6rem;
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--on-cobalt-soft);
}
.off-duty__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.off-duty__body p { color: var(--on-cobalt-soft); font-size: 1.05rem; }
.off-duty__spotify { margin-top: auto; }
/* height matches the video column by ratio (the poster is 3:2), so both columns
   stay pixel-equal at every width; the 12px radius is Spotify's own. */
.off-duty__spotify iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border: 0;
  border-radius: 12px;
}

/* ---------------- Contact (full cobalt CTA) ---------------- */
.contact { padding-block: clamp(3rem, 8vw, 6rem); }
.contact__panel {
  position: relative;
  overflow: hidden;
  background: transparent;   /* transparent: the section itself is the cobalt field band */
  border-radius: var(--r-xl);
  padding: clamp(2rem, 6vw, 4rem);
}
.contact__panel .eyebrow { color: var(--on-cobalt-soft); }
.contact__panel .eyebrow::before { background: var(--on-cobalt-soft); }
.contact__panel h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.0;
  color: var(--on-cobalt);
  margin: 0.75rem 0 1rem;
  max-width: 16ch;
}
.contact__panel > p {
  color: var(--on-cobalt-soft);
  max-width: 560px;
  font-size: 1.05rem;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.35rem 2.25rem;   /* row gap first, then column gap when it wraps */
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}
.contact__actions .btn { flex: none; background: var(--on-cobalt); color: var(--field); box-shadow: none; }
.contact__actions .btn:hover { background: var(--cobalt-soft); box-shadow: none; }
.contact__socials {
  display: flex;
  align-items: center;
  gap: 1.85rem;
}
/* label under the mark, not beside it — the icons read as one ink row */
.contact__socials a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-cobalt-soft);
  transition: color var(--dur) var(--ease-soft);
}
.contact__socials .social__logo {
  width: 26px;
  height: 26px;
  flex: none;
  fill: var(--on-cobalt);
  opacity: 0.85;
  transition: transform var(--dur) var(--ease-soft), opacity var(--dur) var(--ease-soft);
}
.contact__socials a:hover { color: var(--on-cobalt); }
.contact__socials a:hover .social__logo { transform: translateY(-2px); opacity: 1; }

/* ---------------- Footer ---------------- */
.footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

/* ============================================================
   TERMINAL RESKIN — dark cobalt terminal, not green-on-black. This block is the
   whole reskin; the colours live in tokens.css.
   ============================================================ */

/* ---------------- 1. Chrome: REMOVED ----------------
   The title bar, the pinned statusline, the traffic-light dots, the prompt caret and the three
   .dot status lights were removed on request, along with the body padding that reserved their
   space and the bar-height offsets on .nav, .drawer and the anchor scroll margin. The tokens
   (--term-bar-h / --term-status-h in tokens.css) stay so a bar could return without a
   re-derivation; nothing else here refers to them.
   boot.js went with them: it existed to type `whoami` into the title bar, so with the bar gone
   the page has nothing to type into and the entrance is pure CSS - the accent, the grain and the
   nav fade in on their own (see the Boot block at the end of this file). */
.nav { top: 0; }
.drawer { inset: var(--nav-h) 0 0 0; }
.nav.is-scrolled {
  background: rgba(22, 26, 33, 0.86);
  box-shadow: 0 1px 0 var(--line);
}

/* ---------------- 2. The blend fix: multiply cannot work on near-black ----------------
   Over the dark canvas a multiply can only darken, so both inks switch to screen —
   same masks, same alpha, only the blend and the colours changed. */
.accent__ink   { background: var(--cobalt);    mix-blend-mode: screen; }
.accent__light { background: var(--on-cobalt); mix-blend-mode: screen; }
@supports not (mix-blend-mode: screen) {
  /* No screen support: hide both rather than leaving a flat cobalt wash over the text. */
  .accent__ink,
  .accent__light,
  .accent__rim { display: none; }
}

/* ---------------- 3. The cobalt field bands are gone ----------------
   On a terminal the canvas IS the canvas; structure comes from panels. Banded
   sections keep a slightly lifted fill so the page still reads as stacked regions. */
.field,
.field--alt { background: var(--field); }
.off-duty.field--alt { background: var(--field-2); }

/* ---------------- 4. Panels: flat, bordered, square-ish ----------------
   No drop shadows - separation is a 1px border, which is what a terminal pane looks like. */
.timeline__card,
.stack__card,
.stackgroup,
.philosophy__item,
.build__card,
.cert-card,
.contact__panel,
.exploring__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: none;
}
.timeline__card:hover,
.stack__card:hover,
.build__card:hover { border-color: var(--cobalt); transform: none; box-shadow: none; }
.philosophy__item { border-left: 2px solid var(--cobalt); padding: 1rem 1.15rem; }
.section-head h2 { letter-spacing: -0.01em; }

/* ---------------- 5. Section labels as terminal rules: ── experience ── ----------------
   Drawn with borders rather than characters, so the heading's accessible name stays
   the label itself instead of picking up punctuation a screen reader would read out. */
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; }
.section-head h2 { flex: none; }
.section-head::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
/* the off-duty subtitle needs its own line on the flex row, otherwise it competes
   with the heading for the rule's row */
.section-head p { flex: 1 0 100%; }
.section-head .num {
  position: static;      /* a terminal numbers its panes inline */
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--faint);
  opacity: 1;
  order: -1;
  padding-top: 0.15rem;
}

/* ---------------- 6. Nav as a tab bar ---------------- */
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.1rem 0.6rem;
  border-radius: 0;
}
.nav__links a::after { bottom: 0; height: 1px; }
.nav__links a:hover { color: var(--term-cmd); }
.nav__links a.nav__cta {
  border-radius: var(--r-sm);
  background: var(--cobalt);
  color: #0e1116;
  padding: 0.4rem 0.9rem;
}
.nav__links a.nav__cta:hover { background: var(--term-cmd); color: #0e1116; }
.nav__brand { font-family: var(--font-mono); font-size: 0.95rem; color: var(--ink); }
.nav__toggle span { background: var(--ink); }

/* ---------------- 7. Controls on dark ---------------- */
.btn {
  border-radius: var(--r-sm);
  background: var(--cobalt);
  color: #0e1116;
  box-shadow: none;
}
.btn:hover { background: var(--term-cmd); color: #0e1116; box-shadow: none; transform: none; }
.btn--ghost {
  background: transparent;
  color: var(--cobalt);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { border-color: var(--cobalt); color: var(--term-cmd); background: var(--surface); }
.contact__actions .btn { background: var(--on-cobalt); color: var(--field); }
.contact__actions .btn:hover { background: var(--cobalt-soft); color: var(--on-cobalt); }
.contact__socials .social__logo { fill: var(--cobalt); }

/* ---------------- 8. Text that assumed the cobalt bands ----------------
   The --on-cobalt* tokens now resolve to the dark-canvas pair, so most rules follow
   automatically. These are the few needing a different pair on a dark panel. */
.timeline__year { color: var(--faint); }
.timeline__card .company { color: var(--muted); }
.cert-card { border-top: 1px solid var(--line); }
.cert-card__verify { border-radius: var(--r-sm); }
.cert-card__verify:hover { background: var(--surface-2); }
.field strong, .field b, .field--alt strong, .field--alt b {
  background: var(--cobalt-soft);   /* a cobalt tint, not an inverted white block */
  color: var(--ink);
}
.timeline__list li::before { background: var(--cobalt); }
.off-duty .section-head p { font-family: var(--font-mono); font-style: normal; }

/* ---------------- 9. Chips (tech names) ---------------- */
.chips li {
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.stack__card span, .build__card p { color: var(--ink-soft); }

/* ---------------- 10. Fixes the contrast sweep found ----------------
   The mono split does not take for headings that name --font-display themselves —
   those rules outrank base.css, so they are listed below. */
.section-head h2,
.timeline__card h3,
.cert-card__title,
.about__lead,
.contact__panel h2,
.off-duty .section-head p,
.footer__brand,
.looking__lead,
.build__card h3,
.philosophy__item h3,
.stackgroup h3,
.exploring__panel h3 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.drawer { background: rgba(22, 26, 33, 0.97); }
.skip-link { background: var(--cobalt); color: #0e1116; }
.timeline__card .bottom-line b { color: var(--term-cmd); background: none; padding: 0; }
main strong, main b,
.about__lead em,
.hero__role em,
.field strong, .field b, .field--alt strong, .field--alt b {
  background: var(--cobalt-soft);
  color: var(--ink);
  font-family: var(--font-mono);      /* highlights are mono like the rest */
  font-weight: 600;
  font-size: 1em;
  font-style: normal;
  padding: 0.1em 0.22em;
}

/* ---------------- 11. Bayside accent: fills vs text ----------------
   #277CE0 fails AA as text and white on it is only 4.16:1, so fills keep #277CE0
   while text uses --cobalt-text (#3d8ce8, one step lighter). */
a,
.nav__links a:hover,
.section-head .num,
.timeline__year,
.cert-card__link,
.cert-card__verify,
.about__lead a,
.contact a,
.footer a:hover {
  color: var(--cobalt-text);
}
/* white on the accent is 4.16:1, dark ink 4.54:1; its hover stays white on
   --cobalt-deep (6.8:1). */
.nav__links a.nav__cta { color: #0e1116; }

/* dark ink on the accent is 4.54:1; white was 4.16:1 */
::selection { background: var(--cobalt); color: #0e1116; }

/* ---------------- 12. Hero as a live session, and the nav as a tab strip ----------------
   `$ whoami` is chrome, not copy: the prompt sits above the kicker, the kicker reads
   as the comment, and the h1 is what the command returned. */
.hero__cmd {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
  animation: heroKickerIn 0.7s var(--ease-soft) both;   /* the session arrives as one block */
  animation-delay: 0.8s;
}
.hero__prompt { color: var(--term-cmd); font-weight: 600; margin-right: 0.55ch; }
@media (prefers-reduced-motion: reduce) { .hero__cmd { animation: none; } }

/* tmux-style tab strip. The active tab is marked by colour + an accent rule, not a
   generated `*`: CSS-generated content is announced by screen readers. */
.nav__links a:not(.nav__cta) {
  padding: 0.32rem 0.72rem;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 2px solid transparent;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav__links a:not(.nav__cta):hover {
  color: var(--ink);
  background: var(--surface-2);
  border-bottom-color: var(--line-strong);
}
.nav__links a:not(.nav__cta).is-active {
  color: var(--cobalt-text);
  background: var(--surface-2);
  border-bottom-color: var(--cobalt);
}

@keyframes caretBlink {
  0%, 49%    { opacity: 1; }
  50%, 100%  { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__name.is-typing::after { animation: none; opacity: 1; }
}

/* ---------------- Reveal motion ---------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur) var(--ease-soft),
              transform var(--dur) var(--ease-soft);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal='left']   { transform: translateX(-32px); }
.js [data-reveal='right']  { transform: translateX(32px); }
.js [data-reveal='scale']  { transform: scale(0.94); }
[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* ---------------- Keyframes ---------------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 78, 140, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(31, 78, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 78, 140, 0); }
}
@keyframes pulse-light {
  0%   { box-shadow: 0 0 0 0 rgba(244, 247, 251, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(244, 247, 251, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 247, 251, 0); }
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ---------------- Hero role phrase: the chip, definitive ----------------
   Last in the file on purpose: an old rule above also targets .hero__role em and wins
   by source order at equal specificity. --cobalt-text fails on this panel (3.91:1). */
.hero__role em {
  display: inline-block;
  padding: 0.16em 0.62em;
  background: var(--cobalt-soft);
  color: var(--ink);
  border-radius: var(--r-sm);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero__grid,
  .about__grid,
  .off-duty__grid,
  .cert-card {
    grid-template-columns: 1fr;
  }
  .hero__portrait { max-width: 420px; }
  /* Stacked: no overlap to fight with, so the text sits directly under the portrait. */
  .hero__text { align-self: auto; top: 0; margin-left: 0; }
  .cert-card__badge { width: 100%; }
  .cert-card__badge img { width: 100%; height: auto; aspect-ratio: 336 / 176; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .section-head .num { font-size: clamp(3rem, 16vw, 5rem); }
  .stack__grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 480px) {
  .timeline__card { padding: 1.25rem 1.25rem; }
  .contact__actions .btn { width: 100%; justify-content: center; }
}

/* ---------------- Boot: the accent, the grain and the nav arrive ----------------
   Pure CSS now that the window chrome is gone: with no title bar there is no prompt to type
   `whoami` into, so boot.js was deleted rather than left half-dead. Each element fades itself in,
   `both` so nothing flashes during the delay, and the accent fades via its LEAF layers, never the
   wrapper - an opacity there would create the stacking context this file warns against.
   The grain's keyframe restates --grain instead of ending at 1, because that variable is what
   controls how strong the overlay is. */
.accent__ink,
.accent__light,
.accent__rim--ink,
.accent__rim--light { animation: bootFade 0.45s var(--ease-soft) 0.15s both; }
.nav { animation: bootFade 0.45s var(--ease-soft) 0.15s both; }
body::after { animation: grainIn 0.6s var(--ease-soft) 0.15s both; }
@keyframes bootFade { from { opacity: 0; } }
@keyframes grainIn { from { opacity: 0; } to { opacity: var(--grain); } }
@media (prefers-reduced-motion: reduce) {
  .accent__ink, .accent__light, .accent__rim--ink, .accent__rim--light,
  .nav, body::after { animation: none; }
}
