/* Layout: a warm first-person hero with a round photo and name banner, a navy track-record band,
   a three-step "how I got here", tabbed stories, then a scarlet-ruled "say hello". */
:root {
  --paper: #f4f6fa;      /* page, slight blue bias */
  --surface: #ffffff;
  --sunk: #e9edf4;       /* alternate bands */
  --ink: #14213a;        /* dress-blue navy */
  --muted: #4f5c74;
  --line: #d3d9e4;
  --navy: #1d3461;
  --scarlet: #b3261e;    /* the one accent */
  --on-scarlet: #ffffff;
  --gold: #b8860b;       /* hairline details only */
  --ok: #1f7a4d;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step-1: 1.125rem;
  --step-2: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --step-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem);
  --radius: 6px;
  --round: 14px;         /* soft boxes */
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1322; --surface: #131c30; --sunk: #0f1829; --ink: #e5e9f1; --muted: #9ba7bd;
    --line: #26324a; --navy: #a7c0ee; --scarlet: #ef6b5e; --on-scarlet: #1a0a08; --gold: #d8b04a; --ok: #4cc38a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1322; --surface: #131c30; --sunk: #0f1829; --ink: #e5e9f1; --muted: #9ba7bd;
  --line: #26324a; --navy: #a7c0ee; --scarlet: #ef6b5e; --on-scarlet: #1a0a08; --gold: #d8b04a; --ok: #4cc38a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--scarlet); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 12px; }

.label, .eyebrow { font: 600 0.8125rem/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
  font: 600 0.9375rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary, .btn--hire { background: var(--scarlet); border-color: var(--scarlet); color: var(--on-scarlet); }
.btn--primary:hover, .btn--hire:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--quiet { border-color: transparent; padding-inline: 8px; text-decoration: underline; text-underline-offset: 4px; }
.btn--quiet:hover { background: transparent; color: var(--scarlet); }
.btn__meta { font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.btn--small { padding: 8px 14px; font-size: 0.875rem; }
.btn--soon { border-style: dashed; border-color: var(--line); color: var(--muted); cursor: default; }
.btn--soon:hover { background: transparent; color: var(--muted); }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--ink); color: var(--paper); font: 700 1rem/1 var(--display); letter-spacing: .04em; border-bottom: 3px solid var(--scarlet); border-radius: 3px; }
.brand__name { font: 700 1.25rem/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.top__nav { display: none; gap: 22px; margin-left: auto; font-size: 0.9375rem; }
.top__nav a { text-decoration: none; color: var(--muted); padding-block: 10px; }
.top__nav a:hover, .top__nav a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--scarlet); }
.btn--hire { margin-left: auto; }
@media (min-width: 940px) { .top__nav { display: flex; } .btn--hire { margin-left: 0; } }
@media (max-width: 359px) { .brand__name { display: none; } }

/* Hero: round photo with a colored ring (top on phones, right on desktop) */
.hero { padding-block: clamp(32px, 6vw, 80px) clamp(48px, 7vw, 88px); }
.hero__in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 56px; } .hero__photo { grid-column: 2; grid-row: 1; } .hero__text { grid-column: 1; grid-row: 1; } }
.hero__photo { position: relative; justify-self: center; width: min(100%, 220px); }
@media (min-width: 900px) { .hero__photo { width: 100%; } }
.ring { padding: 8px; border-radius: 50%; background: conic-gradient(from 200deg, var(--scarlet), var(--gold), var(--navy), var(--scarlet)); }
.ring .portrait { border-radius: 50%; border: 6px solid var(--paper); }
.portrait { width: 100%; aspect-ratio: 1; max-width: 100%; object-fit: cover; display: grid; background: var(--sunk); }
.portrait--mono { place-items: center; background: var(--ink); }
.portrait--mono span { font: 800 clamp(3rem, 12vw, 7rem)/1 var(--display); color: var(--paper); letter-spacing: .02em; }
.portrait.ph { border-style: dashed; }
.portrait.ph .ph__h { max-width: 18ch; }
@media (max-width: 899px) { .portrait.ph .ph__h { display: none; } }
.hero__text { min-width: 0; display: grid; gap: 16px; justify-items: start; }
.hello { font: 700 var(--step-2)/1 var(--display); color: var(--muted); margin-bottom: -6px; }
.namebar { position: relative; font: 800 var(--step-4)/0.95 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.namebar > span { display: inline-block; background: var(--ink); color: var(--paper); padding: 10px 22px 8px; transform: skewX(-8deg); box-shadow: 6px 6px 0 var(--scarlet); }
.hero__role { font: 600 var(--step-1)/1.3 var(--body); color: var(--muted); }
.hero__line { font: 700 var(--step-3)/1.1 var(--display); max-width: 22ch; text-wrap: balance; color: var(--navy); }
.lede { font-size: var(--step-1); max-width: 60ch; }
.lede--2 { color: var(--muted); }
.nowbox { display: grid; gap: 4px; max-width: 56ch; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); box-shadow: 4px 4px 0 var(--ink); font-size: 0.9375rem; }
.now__status { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ok); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); flex: none; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 4px; }

/* Sparkle doodles: a few, never many */
.sparkle { position: absolute; color: var(--gold); pointer-events: none; }
.sparkle--photo { width: 34px; height: 34px; top: 4%; left: -2%; }
.sparkle--name { width: 26px; height: 26px; top: -18px; right: -30px; }
.sparkle--contact { position: relative; display: inline-block; width: 0.6em; height: 0.6em; margin-left: 0.25em; vertical-align: 0.4em; }
@media (prefers-reduced-motion: no-preference) {
  .sparkle--photo, .sparkle--name { animation: twinkle 3.2s ease-in-out infinite; }
  .sparkle--name { animation-delay: 1.4s; }
  @keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.7) rotate(20deg); opacity: .6; } }
}

/* Track record */
.impact { background: var(--ink); color: var(--paper); padding-block: 44px 52px; }
.impact .label { color: color-mix(in srgb, var(--paper) 70%, var(--ink)); }
.impact__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.impact__grid li { display: grid; gap: 4px; align-content: start; padding: 20px 16px 20px 0; border-bottom: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); min-width: 0; }
.impact__grid li:nth-child(2n) { padding-left: 16px; border-left: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
.impact__grid strong { font: 700 clamp(2rem, 1.5rem + 2vw, 3rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.impact__label { font-weight: 600; font-size: 0.9375rem; line-height: 1.35; }
.impact__ctx { font-size: 0.8125rem; color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
@media (min-width: 760px) {
  .impact__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .impact__grid li, .impact__grid li:nth-child(2n) { padding: 24px 24px 24px 0; border-left: 0; }
  .impact__grid li:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--paper) 22%, transparent); }
  .impact__label { font-size: 1rem; }
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--alt { background: var(--sunk); }
.section__head { display: grid; gap: 8px; margin-bottom: 32px; max-width: 64ch; }
.section__head h2, .about h2 { font: 700 var(--step-3)/1.05 var(--display); }
.section__head p { color: var(--muted); font-size: var(--step-1); }

/* How I got here */
.journey { display: grid; gap: 28px; }
@media (min-width: 820px) { .journey { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.journey li { display: grid; gap: 8px; align-content: start; min-width: 0; }
.journey__when { font-size: 0.875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 14px; border-top: 3px solid var(--ink); }
.journey li:last-child .journey__when { border-top-color: var(--scarlet); }

/* Photo placeholders: a labeled spot that says which photo goes here */
.ph {
  display: grid; place-content: center; justify-items: center; gap: 6px; padding: 16px; text-align: center;
  background: repeating-linear-gradient(135deg, var(--sunk) 0 10px, color-mix(in srgb, var(--sunk) 70%, var(--surface)) 10px 20px);
  border: 2px dashed color-mix(in srgb, var(--muted) 55%, transparent); color: var(--muted);
}
.section--alt .ph { background: repeating-linear-gradient(135deg, var(--surface) 0 10px, var(--paper) 10px 20px); }
.ph__icon { width: 36px; height: 36px; color: var(--navy); }
.ph__t { font: 700 1.125rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
.ph__h { font-size: 0.8125rem; line-height: 1.35; max-width: 26ch; }

.journey h3 { font: 700 2rem/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }

/* Stories */
.tabs { display: grid; gap: 8px; margin-bottom: 20px; }
@media (min-width: 720px) { .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tabs button {
  display: grid; gap: 2px; text-align: left; padding: 12px 16px; min-height: 44px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); font: inherit;
}
.tabs button[aria-selected="true"] { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--scarlet); }
.tabs button:hover { border-color: var(--ink); }
.tabs__n { font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tabs__name { font: 700 1.25rem/1.15 var(--display); }
.js .story:not(.is-active) { display: none; }
.stories { display: grid; gap: 24px; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); display: grid; gap: 26px; min-width: 0; }
.story__head { display: grid; gap: 10px; }
.story h3 { font: 700 var(--step-3)/1.05 var(--display); }
.story__short { font-size: var(--step-2); line-height: 1.45; max-width: 52ch; }
.story__parts { display: grid; gap: 24px; }
@media (min-width: 820px) { .story__parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; } }
.story h4 { font: 600 0.8125rem/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--scarlet); margin-bottom: 8px; }
.story__parts p { max-width: 58ch; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px; background: var(--sunk); border-radius: var(--radius); }
.flow__step { font: 600 0.875rem/1.2 var(--body); padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.flow__step:last-child { background: var(--ok); color: #fff; border-color: var(--ok); }
.flow__arrow { color: var(--muted); font-weight: 700; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.pager__btn { min-height: 44px; padding: 8px 4px; background: none; border: 0; color: var(--ink); font: 600 0.9375rem/1 var(--body); cursor: pointer; }
.pager__btn:disabled { color: var(--line); cursor: default; }
.pager__btn:not(:disabled):hover { color: var(--scarlet); }
.pager__count { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
html:not(.js) .pager { display: none; }

/* How I work */
.principles { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.principles li { display: grid; gap: 6px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .principles li { grid-template-columns: 280px minmax(0, 1fr); align-items: baseline; } }
.principles h3 { font: 700 1.5rem/1.1 var(--display); }
.principles p { max-width: 62ch; }

/* AI */
.ai { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ai li { display: grid; gap: 10px; align-content: start; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ai h3 { font: 700 1.5rem/1.1 var(--display); }

/* About */
.about { display: grid; gap: 40px; }
@media (min-width: 860px) { .about { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; align-items: start; } }
.about__text { display: grid; gap: 16px; min-width: 0; }
.about__text p { font-size: var(--step-1); max-width: 60ch; }
.about__more { color: var(--muted); font-size: 1rem !important; }
.about__side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.offclock { padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); background: var(--surface); display: grid; gap: 12px; }
.offclock ul { display: grid; gap: 10px; }
.offclock li { padding-left: 20px; position: relative; }
.offclock li::before { content: "\2605"; position: absolute; left: 0; color: var(--gold); font-size: 0.8em; top: 0.15em; }

/* Projects */
.services { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.services li { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.services h3 { font: 700 1.3rem/1.15 var(--display); }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.platforms .label { margin-right: 4px; }

/* Contact */
.contact { background: var(--ink); color: var(--paper); padding-block: clamp(56px, 8vw, 96px); border-top: 8px solid var(--scarlet); }
.contact__in { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .contact__in { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; } }
.contact h2 { font: 800 var(--step-4)/0.95 var(--display); text-transform: uppercase; }
.contact__lede { margin-top: 18px; font-size: var(--step-1); max-width: 46ch; color: color-mix(in srgb, var(--paper) 86%, var(--ink)); }
.contact__card { background: var(--surface); color: var(--ink); padding: 24px; border-radius: var(--radius); display: grid; gap: 6px; min-width: 0; }
.contact__card .label:not(:first-child) { margin-top: 12px; }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--step-1); font-weight: 600; overflow-wrap: anywhere; }
.contact__links { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 600; }
.copy { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font: 600 0.8125rem/1 var(--body); cursor: pointer; }
.copy:hover { border-color: var(--ink); }

/* Footer */
.foot { padding-block: 28px; background: var(--paper); color: var(--muted); font-size: 0.875rem; }
.foot__in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* 404 */
.nf { padding-block: 120px; display: grid; gap: 20px; }
.nf h1 { font: 800 var(--step-4)/1 var(--display); }

/* A little funk: hard offset shadows, soft tinted boxes, banner titles (kept to a few places) */
:root {
  --tint-blue: color-mix(in srgb, var(--navy) 11%, var(--surface));
  --tint-red: color-mix(in srgb, var(--scarlet) 9%, var(--surface));
  --tint-gold: color-mix(in srgb, var(--gold) 13%, var(--surface));
}
.btn:not(.btn--quiet):not(.btn--soon) { border-width: 2px; border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s, background-color .15s, color .15s; }
.btn:not(.btn--quiet):not(.btn--soon):hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:not(.btn--quiet):not(.btn--soon):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary:not(.btn--quiet), .btn--hire { border-color: var(--ink); }
.btn--soon { border-radius: 999px; }
.contact .btn { box-shadow: 3px 3px 0 var(--paper); }

.tabs button { border-radius: 999px; padding: 10px 18px; border-width: 2px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 3px 3px 0 var(--scarlet); }
.tabs button[aria-selected="true"] .tabs__n { color: color-mix(in srgb, var(--paper) 70%, var(--ink)); }

.story { border-radius: 20px; border-width: 2px; border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.bannerline { justify-self: start; }
.bannerline > span { display: inline; background: var(--ink); color: var(--paper); padding: 4px 14px; line-height: 1.5; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.story__parts section { padding: 18px 20px; border-radius: var(--round); background: var(--tint-blue); }
.story__parts section:nth-child(3) { background: var(--tint-red); }
.story__parts section:nth-child(4) { background: var(--tint-gold); }
.flow { border-radius: var(--round); }

.ai li { border-radius: var(--round); border: 0; }
.ai li:nth-child(3n+1) { background: var(--tint-blue); }
.ai li:nth-child(3n+2) { background: var(--tint-red); }
.ai li:nth-child(3n+3) { background: var(--tint-gold); }

.services li { border-radius: var(--round); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }

.offclock { border-radius: var(--round); border: 2px solid var(--ink); border-top-width: 2px; box-shadow: 4px 4px 0 var(--gold); }
.contact__card { border-radius: var(--round); box-shadow: 6px 6px 0 var(--scarlet); }
