/* ==========================================================================
   Portfolio · editorial design system
   Serif headings (Newsreader), sans body (Public Sans), mono for data only.
   ========================================================================== */

:root {
  --paper: #f7f4ee;
  --paper-raised: #fffdf9;
  --ink: #1b1a17;
  --ink-soft: #4a4740;
  --ink-faint: #6e6a61;
  --rule: #e2ddd2;
  --rule-strong: #c9c2b4;
  --accent: #a8461f;
  --accent-ink: #ffffff;
  --accent-soft: #f3e3d8;
  --focus: #a8461f;

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --measure: 66ch;
  --wrap: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #161513;
  --paper-raised: #1e1d1a;
  --ink: #ece8df;
  --ink-soft: #bdb7ab;
  --ink-faint: #918b80;
  --rule: #2e2c28;
  --rule-strong: #45423c;
  --accent: #e3916b;
  --accent-ink: #1b1a17;
  --accent-soft: #3a2a21;
  --focus: #e3916b;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161513;
    --paper-raised: #1e1d1a;
    --ink: #ece8df;
    --ink-soft: #bdb7ab;
    --ink-faint: #918b80;
    --rule: #2e2c28;
    --rule-strong: #45423c;
    --accent: #e3916b;
    --accent-ink: #1b1a17;
    --accent-soft: #3a2a21;
    --focus: #e3916b;
    color-scheme: dark;
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  font: 500 15px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper);
}
.btn-solid:hover { background: var(--accent); color: var(--accent-ink); }
.btn-solid:disabled { opacity: 0.6; cursor: progress; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.icon-btn:hover { border-color: var(--rule-strong); color: var(--ink); }

/* Show the icon for the theme you would switch TO. */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-moon { display: none; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.site-nav a {
  padding: 8px 10px;
  color: var(--ink-soft);
  font-size: 15px;
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

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

.hero {
  padding-top: clamp(56px, 10vw, 112px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}

.eyebrow {
  font-size: 15px;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

/* "Now" panel */
.now {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}
.now-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.now-list { margin: 8px 0 0; }
.now-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.45;
}
.now-list dt { color: var(--ink-faint); }
.now-list dd { margin: 0; color: var(--ink); }
.mono { font-family: var(--font-mono); font-size: 13px; }

.lede {
  margin-top: 28px;
  max-width: var(--measure);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  font-size: 16px;
}


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

.section {
  padding-top: clamp(56px, 8vw, 96px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  grid-template-areas: "num ." "title note";
  gap: 4px 40px;
  align-items: end;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--ink);
}
.section-num {
  grid-area: num;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.section-head h2 { grid-area: title; font-size: clamp(30px, 3.4vw, 44px); }
.section-note { grid-area: note; color: var(--ink-faint); font-size: 16px; max-width: 56ch; }

/* ---------- Projects ---------- */

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: proj;
}

.project {
  counter-increment: proj;
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 180px;
  gap: 4px 24px;
  padding: 28px 16px;
  margin: 0 -16px;
  border-bottom: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: background-color 200ms ease;
}
.project:hover { background: var(--paper-raised); }
.project::before {
  content: counter(proj, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 10px;
}

.project-main { min-width: 0; }

.project-title {
  font-size: 26px;
}
.project-title button {
  all: unset;
  cursor: pointer;
  border-radius: 2px;
}
/* Whole row opens the details dialog; links stay above the overlay. */
.project-title button::after {
  content: "";
  position: absolute;
  inset: 0;
}
.project-title .arrow {
  display: inline-block;
  margin-left: 8px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.project:hover .arrow,
.project-title button:focus-visible .arrow { opacity: 1; transform: none; }
.project:hover .project-title button { color: var(--accent); }
.project-title button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.project-links a { position: relative; z-index: 1; }

.cadence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.cadence::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.project.is-featured .project-title { font-size: clamp(28px, 3vw, 36px); }
.project.is-featured .project-summary { font-size: 18px; }

.project-summary {
  margin-top: 6px;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.stack {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
}

.project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  padding-top: 6px;
  font-size: 15px;
  white-space: nowrap;
}

/* ---------- System map ---------- */

.sysmap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin-top: 32px;
}

.zone {
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  padding: 20px;
}
.zone-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.node {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
  font: 500 15px/1.3 var(--font-mono);
  text-align: left;
}
.node small {
  font: 400 13px/1.35 var(--font-sans);
  color: var(--ink-faint);
}
button.node {
  cursor: pointer;
  border-color: var(--ink);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
button.node:hover { border-color: var(--accent); color: var(--accent); }
.node-store { border-style: dashed; }
.node-out { background: transparent; border-style: dotted; }

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 36px;
}
.flow li { position: relative; display: flex; }
/* Arrows: 1 → 2 across, 2 ↓ 3 down (snake), 3 ← 4 */
.flow li:nth-child(1)::after,
.flow li:nth-child(3)::after {
  content: "→";
  position: absolute;
  right: -28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.flow li:nth-child(2)::after {
  content: "↓";
  position: absolute;
  bottom: -24px;
  left: 50%;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
/* Row 2 reads right-to-left in place: homelab-mlops (3) sits under the store (2). */
.flow li:nth-child(3) { order: 4; }
.flow li:nth-child(4) { order: 3; }
.flow li:nth-child(3)::after { content: "←"; right: auto; left: -28px; }

.fan {
  display: grid;
  gap: 28px;
}
.fan-in {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  position: relative;
}
.fan-in::after {
  content: "↓";
  position: absolute;
  bottom: -24px;
  left: 50%;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

/* ---------- Career chart ---------- */

.career { margin: 28px 0 8px; }
.career-cap { font-size: 14px; color: var(--ink-faint); margin-bottom: 12px; }

.career-chart { display: grid; gap: 6px; }
.lane {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.lane-name { font-size: 14px; color: var(--ink-soft); }
.track {
  position: relative;
  height: 34px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px calc(100% / var(--years)));
  border-radius: 4px;
}
.seg {
  position: absolute;
  top: 3px;
  bottom: 3px;
  min-width: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--paper);
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 12px/28px var(--font-sans);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  cursor: pointer;
  transition: filter 150ms ease;
}
.seg:hover, .seg:focus-visible { filter: brightness(1.12); }
.seg.is-hsbc { background: var(--ink-faint); color: var(--paper); }
.seg.is-break {
  background: repeating-linear-gradient(45deg, var(--rule-strong) 0 2px, transparent 2px 7px);
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--rule-strong), 0 0 0 2px var(--paper);
}
.axis {
  position: relative;
  height: 20px;
  margin-left: 96px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.axis span { position: absolute; transform: translateX(-50%); }

.tip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}
.tip strong { display: block; font-weight: 600; }
.tip span { opacity: 0.8; }

/* ---------- Experience ---------- */

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

.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.role-when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 6px;
}
.role-when span { display: block; }

.role-title { font-size: 22px; }
.role-org { color: var(--ink-soft); margin-top: 2px; }

.role ul {
  margin: 14px 0 0;
  padding-left: 18px;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.role li + li { margin-top: 6px; }
.role li::marker { color: var(--rule-strong); }

.role.is-break .role-title { font-style: italic; color: var(--ink-soft); }
.role:target { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }

.role details summary {
  margin-top: 12px;
  font-size: 15px;
  color: var(--accent);
  cursor: pointer;
  width: fit-content;
}

/* ---------- Skills ---------- */

.skills { margin: 0; }
.skills div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px 40px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.skills dt { font-weight: 600; font-size: 16px; }
.skills dd { margin: 0; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Certifications ---------- */

.certs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}

.cert {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.cert img,
.cert .cert-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.cert .cert-mark {
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  font: 500 11px/1 var(--font-mono);
  color: var(--ink-faint);
}
.cert-name { font-size: 16px; line-height: 1.35; }
.cert-meta { font-size: 14px; color: var(--ink-faint); }

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  margin-top: 32px;
}
.contact-big {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact-big a { text-decoration-thickness: 1px; }
.contact-alt { margin-top: 12px; color: var(--ink-faint); font-size: 15px; }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 500; }
.field input,
.field textarea {
  font: 16px/1.5 var(--font-sans);
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-height: 44px;
}
.field textarea { resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.form-foot .btn { min-height: 44px; }
.form-status { font-size: 15px; color: var(--ink-soft); }
.form-status.is-error { color: #b42318; }
:root[data-theme="dark"] .form-status.is-error { color: #f59a8f; }

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

.site-footer {
  margin-top: clamp(72px, 10vw, 128px);
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--ink-faint);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Project dialog ---------- */

.project-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
}
.project-dialog::backdrop { background: rgb(20 18 15 / 0.45); }
.project-dialog > div { padding: 32px 32px 8px; }
.project-dialog h2 { font-size: 30px; }
.project-dialog .dialog-kicker { font-size: 14px; color: var(--ink-faint); margin-bottom: 8px; }
.project-dialog .dialog-text { margin-top: 16px; color: var(--ink-soft); }
.project-dialog h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 24px 0 8px;
}
.project-dialog ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.project-dialog li + li { margin-top: 4px; }
.project-dialog .dialog-links { display: flex; gap: 20px; margin-top: 24px; }
.project-dialog form { padding: 16px 32px 28px; }
.dialog-close {
  font: 500 15px/1 var(--font-sans);
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  min-height: 40px;
  cursor: pointer;
}
.dialog-close:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ---------- Scroll reveal (only when motion is allowed) ---------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms cubic-bezier(.2,.7,.2,1), transform 600ms cubic-bezier(.2,.7,.2,1);
}
.motion .reveal.in { opacity: 1; transform: none; }

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

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }


  .section-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "num" "title" "note"; gap: 6px; }
  .role,
  .skills div,
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .contact-grid { gap: 28px; }

  .sysmap { grid-template-columns: minmax(0, 1fr); }

  .certs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }

  .project { grid-template-columns: minmax(0, 1fr); }
  .project::before { padding-top: 0; }
  .project-links { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 10px; }

  /* System map: single column, arrows all point down. */
  .flow { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .flow li:nth-child(3) { order: 3; }
  .flow li:nth-child(4) { order: 4; }
  .flow li:nth-child(-n+3)::after {
    content: "↓";
    top: auto; right: auto;
    left: 50%;
    bottom: -24px;
    transform: none;
  }

  .lane { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .axis { margin-left: 0; }
  .axis span:nth-child(even) { display: none; }

  .contact-form { grid-template-columns: minmax(0, 1fr); }

  .project-dialog > div { padding: 24px 20px 4px; }
  .project-dialog form { padding: 12px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Career chart: label fitting and edge ticks */
.seg.no-label { color: transparent; }
.axis span:first-child { transform: none; }
.axis span:last-child { transform: translateX(-100%); }

/* System map as a figure inside the projects section */
.sysmap-figure { margin: 40px 0 0; }
.sysmap-cap { font-size: 15px; color: var(--ink-faint); max-width: 70ch; }
.sysmap-cap strong { color: var(--ink); font-weight: 600; }
.sysmap-figure .sysmap { margin-top: 16px; }

/* ==========================================================================
   v10.3 · more presence: results band, hero entrance, display numerals
   ========================================================================== */

/* Results band: full-bleed terracotta */
.outcomes {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(48px, 7vw, 88px) 0;
  margin-top: clamp(16px, 3vw, 32px);
}
.outcomes-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  padding-bottom: 16px;
  border-bottom: 1px solid currentColor;
}
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.outcome {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.outcome:not(:nth-child(3n+1)) {
  padding-left: 28px;
  border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.outcome-value {
  order: -1; /* dt comes first in the DOM for valid markup; show the number first */
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.outcome-label {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.45;
  max-width: 30ch;
}
.outcome-context {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.92;
}

/* Hero entrance on page load */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.motion .hero-copy > *,
.motion .now {
  animation: rise 800ms cubic-bezier(.2,.7,.2,1) both;
}
.motion .hero-copy > :nth-child(2) { animation-delay: 80ms; }
.motion .hero-copy > :nth-child(3) { animation-delay: 180ms; }
.motion .hero-copy > :nth-child(4) { animation-delay: 260ms; }
.motion .now { animation-delay: 360ms; }

/* Bigger hero type */
.hero-title { font-size: clamp(44px, 6.6vw, 92px); letter-spacing: -0.03em; }

/* Display numerals on section heads */
.section-head { position: relative; }
.section-num {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 400;
  font-style: italic;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Animated link underline */
.hero-links a,
.project-links a,
.contact-alt a,
.section-note a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 250ms ease;
}
.hero-links a:hover,
.project-links a:hover,
.contact-alt a:hover,
.section-note a:hover { background-size: 0 1px; background-position: 100% 100%; }

@media (max-width: 860px) {
  .outcomes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .outcome:nth-child(even) { padding-left: 20px; border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
  .outcome { padding-right: 20px; }
}
@media (max-width: 480px) {
  .outcomes-grid { grid-template-columns: minmax(0, 1fr); }
  .outcome:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Band colours: own tokens so dark mode gets a deep terracotta, not a bright slab */
:root { --band-bg: var(--accent); --band-ink: #ffffff; }
:root[data-theme="dark"] { --band-bg: #7e3416; --band-ink: #f6ebe3; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --band-bg: #7e3416; --band-ink: #f6ebe3; }
}
.outcomes { background: var(--band-bg); color: var(--band-ink); }

/* Keep "Senior Cloud, Data" on one line at desktop widths */
@media (min-width: 861px) {
  .hero-grid { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); }
}
.hero-title { font-size: clamp(44px, 6vw, 78px); text-wrap: wrap; }

/* ==========================================================================
   v10.4 · band entrance, 5-up outcomes, skill badges, expired certs
   ========================================================================== */

/* First view: the band is clipped to a thin orange line at its top edge.
   Scrolling opens it into the full box (class .in, added by app.js). */
.motion .outcomes {
  clip-path: inset(0 7vw calc(100% - 4px) 7vw round 2px);
  transition: clip-path 1000ms cubic-bezier(.65,0,.25,1);
}
.motion .outcomes.in { clip-path: inset(0 0 0 0 round 0); }

/* Figures rise in once the box has opened. */
.motion .outcome {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.7,.2,1);
}
.motion .outcomes.in .outcome { opacity: 1; transform: none; }
.motion .outcomes.in .outcome:nth-child(1) { transition-delay: 450ms; }

/* Title rule draws across, then the figures rise in one after another. */
.outcomes-title { border-bottom: 0; position: relative; }
.outcomes-title::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}
.motion .outcomes-title::after { transform: scaleX(0); transition: transform 900ms cubic-bezier(.2,.7,.2,1) 350ms; }
.motion .outcomes.in .outcomes-title::after { transform: scaleX(1); }
.motion .outcomes.in .outcome:nth-child(2) { transition-delay: 540ms; }
.motion .outcomes.in .outcome:nth-child(3) { transition-delay: 630ms; }
.motion .outcomes.in .outcome:nth-child(4) { transition-delay: 720ms; }
.motion .outcomes.in .outcome:nth-child(5) { transition-delay: 810ms; }

/* Five figures: two wide on top, three below. */
.outcomes-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.outcome { grid-column: span 2; padding: 28px 28px 28px 0; border-left: 0; }
.outcome:nth-child(-n+2) { grid-column: span 3; }
.outcome:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
.outcome:nth-child(2),
.outcome:nth-child(4),
.outcome:nth-child(5) {
  padding-left: 28px;
  border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}
.outcome:nth-child(-n+2) .outcome-value { font-size: clamp(56px, 7.5vw, 112px); }

@media (max-width: 860px) {
  .outcomes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outcome, .outcome:nth-child(-n+2) { grid-column: auto; padding: 24px 20px 24px 0; border-left: 0; }
  .outcome:nth-child(2), .outcome:nth-child(4) {
    padding-left: 20px;
    border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  }
  .outcome:nth-child(5) { padding-left: 0; border-left: 0; }
  .outcome:nth-child(-n+2) .outcome-value { font-size: clamp(48px, 9vw, 84px); }
}
@media (max-width: 480px) {
  .outcomes-grid { grid-template-columns: minmax(0, 1fr); }
  .outcome:nth-child(2), .outcome:nth-child(4) { padding-left: 0; border-left: 0; }
}

/* Expired certification */
.cert.is-expired { opacity: 0.6; }
.expired { font-style: italic; }

/* Skill badges */
.badges { margin-top: 48px; }
.badges-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
}
.badges-title span { color: var(--ink-faint); font-size: 18px; }
.badges-note { margin-top: 6px; color: var(--ink-faint); font-size: 15px; }
.badge-year {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 5fr);
  gap: 8px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.badge-year:first-of-type { margin-top: 16px; border-top: 1px solid var(--rule); }
.badge-year-label { font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 280px;
  column-gap: 40px;
  font-size: 15px;
  color: var(--ink-soft);
}
.badge-list li { break-inside: avoid; padding: 3px 0 3px 14px; position: relative; }
.badge-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rule-strong);
}
@media (max-width: 600px) {
  .badge-year { grid-template-columns: minmax(0, 1fr); }
}

/* v10.6: make the dashboard link the obvious first action */
.project-links .live-link { font-weight: 600; }
.project-links a.live-link { color: var(--accent); }
