/* ==========================================================================
   Abbie Skubak — Portfolio (refined)
   One stylesheet for every page. Case studies set their own --accent
   on <body style="--accent: …">, and everything tinted follows from it.
   All text colours meet WCAG AA on the surfaces they sit on.
   ========================================================================== */

:root {
  --ink: #1f1f1f;          /* headings, main text */
  --text: #333333;         /* long-form body text */
  --muted: #6b6b6b;        /* labels, captions, inactive nav (5.3:1 on white) */
  --line: #e4e4e4;
  --brand: #22c9be;        /* decorative teal: marks, favicon */
  --brand-ink: #0b7f78;    /* teal for text (4.9:1 on white) */
  --footer-bg: #2f2f2f;
  --footer-text: #d6d6d6;
  --accent: var(--brand-ink);  /* overridden per case study */

  --font: "Nunito Sans", "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --container: 1240px;
  --gutter: 40px;
  --header-h: 76px;
  --toc-h: 52px;
}

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

html { scroll-padding-top: calc(var(--header-h) + var(--toc-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  --accent-tint: color-mix(in srgb, var(--accent) 7%, #fff);
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--accent) 22%, #fff); color: var(--ink); }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
strong { font-weight: 800; color: var(--ink); }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 400; line-height: 1.2; text-wrap: balance; }
ul, ol { padding-left: 1.25em; }
p + p, p + ul, ul + p, p + ol, ol + p { margin-top: 0.9em; }
p { text-wrap: pretty; }

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

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

.accent { color: var(--accent); }
.muted  { color: var(--muted); }
.brand  { color: var(--brand-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  padding: 12px 18px; background: #000; color: #fff; text-decoration: none; font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid #000;
  background: #fff;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: #000; color: #fff; }
.btn--primary { background: #000; color: #fff; }
.btn--primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.text-link { text-decoration-skip-ink: none; color: var(--ink); font-weight: 400; text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
.text-link:hover { color: var(--brand-ink); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
}
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  color: var(--brand-ink);
  font-size: 30px;
  font-weight: 800;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav { display: flex; gap: 8px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  color: var(--muted);
  font-size: 17px;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #000; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 8px; }

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

.site-footer {
  margin-top: 120px;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 15px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 40px;
  padding-block: 64px 72px;
}
.site-footer p + p { margin-top: 10px; }
.site-footer a { text-decoration: none; display: inline-block; padding-block: 4px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__name { color: #fff; font-size: 18px; font-weight: 800; }
.site-footer__label { color: #fff; font-weight: 800; }
.site-footer__copy { margin-top: 28px !important; color: #b5b5b5; }
.site-footer :focus-visible { outline-color: #fff; }

/* ==========================================================================
   Home
   ========================================================================== */

.intro-hero { padding-block: 64px 88px; }
.intro-hero h1 {
  max-width: 21ch;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.intro-hero p {
  max-width: 60ch;
  margin-top: 24px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
}
.intro-hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }

.section-title { font-size: 15px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 40px;
}
.project-card { display: block; text-decoration: none; color: var(--text); }
.project-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-card:hover img { transform: scale(1.015); }
.project-card__text { margin-top: 18px; }
.project-card h3 { font-size: 22px; font-weight: 800; }
.project-card p { margin-top: 6px; font-size: 17px; max-width: 42ch; }
.project-card__meta { color: var(--muted); font-size: 15px !important; }
.project-card:hover h3 { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; }


/* ==========================================================================
   About
   ========================================================================== */

.about { padding-top: 56px; }
.about h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 800; }
.about__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
}
.about h2 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.about p { font-size: 17px; max-width: 62ch; }
.about__photo { width: 100%; margin-bottom: 48px; }
.about__contact a { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
.about__contact { margin-bottom: 48px; }
.experience { list-style: none; padding: 0; display: grid; gap: 36px; }
.experience li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.experience img { width: 56px; height: 56px; object-fit: contain; }
.experience p { font-size: 16px; margin: 0 !important; }
.experience .experience__org { font-size: 19px; margin-bottom: 6px !important; color: var(--ink); }
.experience .experience__org span[style] { color: inherit !important; }
.experience .experience__role { font-weight: 800; color: var(--ink); margin-bottom: 4px !important; }

/* ==========================================================================
   Case studies
   ========================================================================== */

/* Hero: image with the "How might we…" card over it */
.cs-hero {
  position: relative;
  min-height: min(600px, 52vw);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.cs-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-hero__card {
  position: relative;
  max-width: 780px;
  margin-bottom: 48px;
  padding: 36px 44px;
  background: #fff;
  color: var(--accent);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.3;
}
.cs-hero__card strong, .cs-hero__card .accent { color: var(--accent); }

/* Title, summary, facts, outcome */
.cs-intro {
  padding-block: 56px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px 72px;
  align-items: start;
}
.cs-intro h1 { grid-column: 1 / -1; font-size: clamp(34px, 4.4vw, 52px); font-weight: 800; }
.cs-intro__summary p { max-width: 64ch; }
.cs-intro__summary .btn { margin-top: 24px; }
.cs-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; padding-top: 6px; }
.cs-facts dt { font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cs-facts dd { margin-top: 4px; color: var(--ink); }
.cs-facts__wide { grid-column: 1 / -1; }
.cs-outcome {
  grid-column: 1 / -1;
  padding: 24px 28px;
  background: var(--accent-tint);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.5;
}
.cs-outcome strong { display: block; margin-bottom: 4px; color: var(--accent); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Section index, sticky under the header */
.cs-toc {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  background: #fff;
  border-block: 1px solid var(--line);
}
.cs-toc .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cs-toc a {
  display: inline-flex;
  align-items: center;
  min-height: var(--toc-h);
  padding-inline: 14px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.cs-toc a:first-child { padding-left: 0; }
.cs-toc a:hover, .cs-toc a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }


/* Tinted full-width band holding each chapter title */
.cs-band {
  margin-block: 96px 56px;
  padding-block: 30px;
  background: var(--accent-tint);
}
/* The first chapter (Overview) sits closer to the section index */
.cs-toc + .cs-band { margin-top: 48px; }
.cs-band h2 { color: var(--accent); font-size: 30px; font-weight: 800; }

/* Solid accent panel */
.cs-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: center;
  padding: 56px 64px;
  background: var(--accent);
  color: #fff;
}
.cs-panel h3 { font-size: 20px; margin-bottom: 20px; }
.cs-panel * { color: #fff !important; }
.cs-panel__logos { display: flex; align-items: center; justify-content: center; gap: 28px; font-size: 24px; }
.cs-panel__logos img { max-width: 42%; }

/* Icon + large statement */
.cs-callout {
  margin-block: 72px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 32px;
  align-items: center;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.45;
}
.cs-callout img { width: 96px; }
.cs-callout--big-icon { grid-template-columns: 160px 1fr; gap: 40px; }
.cs-callout--big-icon img { width: 160px; }
.marker {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.cs-callout--split { grid-template-columns: 1fr 96px 1.2fr; font-size: 17px; }
.cs-callout--split > p:last-child { font-size: clamp(20px, 2vw, 25px); }

/* Sub-section headings: "LABEL: TOPIC" */
.cs-subhead {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.cs-subhead .muted { color: var(--muted); }
.cs-block { margin-top: 88px; }

/* Column layouts */
.cols-3, .cols-2 { display: grid; gap: 40px 72px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 h3, .cols-2 h3, .cols-3 h4, .cols-2 h4 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.cols-3 .btn, .cols-2 .btn { margin-top: 20px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.split--wide-media { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.split--wide-text  { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.split .btn { margin-top: 24px; }

.figure-row { display: flex; gap: 32px; align-items: flex-start; justify-content: center; }
.figure-row > * { flex: 1 1 0; min-width: 0; }
.cs-figure { margin: 32px 0 0; }
.cs-figure img { width: 100%; }
.caption { margin-top: 12px; color: var(--muted); text-align: center; font-size: 15px; }
.cs-deliverables { margin-top: 20px; }
.cs-deliverables ul { margin-top: 6px !important; }
.framed { border: 1px solid var(--line); }

/* Animated GIFs placed over a larger annotated overview image */
.overlay { position: relative; }
.overlay__item { position: absolute; }
.overlay__item img { width: 100%; }

/* Numbered project goals */
.goal { display: grid; grid-template-columns: 48px 1fr; align-items: baseline; color: var(--ink); }
.goal__num { font-size: 36px; color: var(--accent); }

/* Roles & team */
.cs-team { align-items: start; }
.cs-team--solo { grid-template-columns: 1fr; }
.cs-team--solo ul { columns: 2; column-gap: 56px; }
.cs-team--solo li { break-inside: avoid; }
.cs-team ul { margin-top: 20px; }
.cs-team__arrow { display: none; }
.cs-team-line { display: flex; align-items: center; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.cs-team-line__faces { display: flex; flex-shrink: 0; }
.cs-team-line__faces img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.cs-team-line__faces img + img { margin-left: -10px; }
.cs-team-line span { opacity: 0.85; }

/* GE: before → after UI fixes */
.fix-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 80px; margin-top: 48px; }
.fix-row h3, .fix-row h4 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.fix-row img { max-width: min(100%, 400px); margin-bottom: 14px; }
.note { padding-left: 14px; border-left: 1px solid var(--accent); font-size: 16px; }
.note + .note { margin-top: 10px; }
.feedback p { font-size: 16px; }
.feedback p + p { margin-top: 4px; }
.cols-3 .feedback { margin-top: 4px; }
.cols-3 > div > img { max-width: min(100%, 260px); margin-bottom: 16px; }
.tint-card { padding: 24px; background: var(--accent-tint); }
.tint-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 16px; }

/* Shopbot: insight → criteria table */
.criteria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.criteria h3, .criteria h4 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.criteria table { width: 100%; border-collapse: collapse; font-size: 16px; }
.criteria th { text-align: left; font-weight: 800; padding: 8px 16px 8px 0; border-bottom: 1px solid #cfcfcf; color: var(--ink); }
.criteria td { vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); width: 50%; }

.survey-label {
  margin-top: 40px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}
.survey { margin-top: 32px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.45; }

.cta-band {
  display: block;
  margin-top: 96px;
  padding-block: 32px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  text-decoration: none;
}
.cta-band:hover { filter: brightness(1.12); }
.cta-band:focus-visible { outline: 3px solid #000; outline-offset: -3px; }

/* Closing outcome */
.cs-close { margin-top: 104px; padding-top: 40px; border-top: 2px solid var(--accent); }
.cs-close h2 { color: var(--accent); font-size: 16px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.cs-close p { margin-top: 14px; max-width: 36ch; color: var(--ink); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.3; }

/* Previous / All / Next */
.project-nav {
  margin-top: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 19px;
  color: var(--ink);
}
.project-nav a { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; text-decoration: none; }
.project-nav a span { display: flex; flex-direction: column; line-height: 1.25; }
.project-nav a:last-child span { text-align: right; }
.project-nav small { color: var(--muted); font-size: 14px; }
.project-nav a:hover { color: var(--accent); }
.project-nav svg { width: 36px; height: 16px; flex-shrink: 0; }

/* Full-size image viewer */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { width: 100%; }
.viewer { width: min(96vw, 1800px); max-height: 94vh; padding: 0; border: 0; background: #fff; }
.viewer::backdrop { background: rgba(10, 10, 10, 0.82); }
.viewer img { width: 100%; height: auto; }
/* Sits over the image (the negative bottom margin lets the image start under it) and stays put while a tall image scrolls.
   Black disc + white ring keeps it at least 3:1 against any image, light or dark. */
.viewer__close {
  position: sticky; top: 12px; z-index: 1;
  display: grid; place-items: center;
  width: 48px; height: 48px; margin: 12px 12px -60px auto;
  border: 2px solid #fff; border-radius: 50%; background: #000; color: #fff; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.viewer__close:hover { background: #333; }
.viewer__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 7px #000; }
.viewer__close svg { width: 20px; height: 20px; }
.viewer img { display: block; }

/* ==========================================================================
   Tablet & phone
   ========================================================================== */

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-intro { grid-template-columns: 1fr; }
  .cs-panel { grid-template-columns: 1fr; padding: 40px 32px; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
  .split, .split--wide-media, .split--wide-text { grid-template-columns: 1fr; gap: 28px; }
  .criteria { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .cs-callout--split { grid-template-columns: 1fr; }
  .cs-callout--split img { display: none; }
    }

@media (max-width: 600px) {
  :root { --gutter: 16px; --header-h: 64px; --toc-h: 48px; }
  body { font-size: 16px; }
  .logo { font-size: 26px; }
  .site-nav { gap: 0; }
  .site-nav a { font-size: 16px; padding-inline: 10px; }
  .site-nav a:last-child { padding-right: 0; }
  .intro-hero { padding-block: 32px 56px; }
  .project-grid { grid-template-columns: 1fr; gap: 48px; }
  .project-card img { aspect-ratio: 4 / 3; }
  .cs-hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .cs-hero > img { position: static; aspect-ratio: 16 / 10; }
  .cs-hero__card { margin: 0; padding: 20px var(--gutter) 0; }
  .cs-intro { padding-top: 28px; }
  .cs-facts { grid-template-columns: 1fr; }
  .cs-band { margin-block: 64px 36px; padding-block: 22px; }
  .cs-toc + .cs-band { margin-top: 32px; }
  .cs-band h2 { font-size: 24px; }
  .cs-panel { padding: 32px 20px; }
  .cs-team--solo ul { columns: 1; }
  .cs-team-line { flex-direction: column; align-items: flex-start; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .fix-row { grid-template-columns: 1fr; gap: 24px; }
  .figure-row { flex-direction: column; align-items: center; }
  .cs-callout { grid-template-columns: 64px 1fr; gap: 20px; }
  .cs-callout img, .cs-callout--big-icon img { width: 64px; }
  .cs-callout--big-icon { grid-template-columns: 64px 1fr; }
  .project-nav { font-size: 16px; }
  .project-nav > a:nth-child(2) { display: none; }
  .project-nav svg { width: 24px; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; padding-block: 48px; }
  .criteria td { font-size: 15px; }
  .cta-band { font-size: 21px; padding-inline: 16px; }
}

.cta-band .arrow { display: inline-block; width: 32px; height: 14px; margin-left: 10px; vertical-align: middle; }

/* About: education, skills, and the résumé note */
.about__section { margin-top: 48px; }
.about__item-title { font-size: 19px; color: var(--ink); margin-bottom: 4px !important; }
.about__section p { font-size: 16px; margin: 0 !important; }
.about__note { margin-top: 14px !important; color: var(--muted); font-size: 16px !important; }
.skills { display: grid; gap: 14px; }
.skills dt { font-weight: 800; color: var(--ink); font-size: 16px; }
.skills dd { margin: 2px 0 0; font-size: 16px; }

/* Section index: an arrow on hover/focus shows the link scrolls this page, and which way */
.cs-toc a { gap: 6px; }
.cs-toc__arrow {
  width: 10px; height: 14px; flex-shrink: 0;
  opacity: 0; transform: translateY(-3px);
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cs-toc a[data-dir="up"] .cs-toc__arrow { transform: rotate(180deg) translateY(-3px); }
.cs-toc a:is(:hover, :focus-visible)[data-dir="down"] .cs-toc__arrow { opacity: 1; transform: translateY(2px); }
.cs-toc a:is(:hover, :focus-visible)[data-dir="up"] .cs-toc__arrow { opacity: 1; transform: rotate(180deg) translateY(2px); }
@media (hover: none) { .cs-toc__arrow { display: none; } }
@media (prefers-reduced-motion: reduce) { .cs-toc__arrow { transition: opacity 0.18s ease; } }

/* Draft placeholders: visible on purpose until real content replaces them */
.todo { background: #fff3b0; color: #5c4400; padding: 1px 6px; border-radius: 3px; font-size: 0.92em; }

/* Screenshot galleries (GE Aerospace case studies) */
.gallery { gap: 40px 32px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; object-position: top; border: 1px solid var(--line); margin: 0; }
.split > .framed-figure img { max-height: 760px; object-fit: cover; object-position: top; }
.gallery .caption { text-align: left; }
.framed-figure img { border: 1px solid var(--line); }
.split .stack > * + * { margin-top: 20px; }
.cs-panel.cs-team--solo:not(.cs-team) { grid-template-columns: 1fr; }
.cs-panel.cs-team--solo:not(.cs-team) p { max-width: 72ch; }
.cs-intro__summary a, .cs-block a:not(.btn) { color: var(--accent); }

/* RAMP: the three legacy tools, built in the page (replaces a slide screenshot) */
.legacy__title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.legacy__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.legacy-tool {
  display: grid; grid-template-columns: 96px 1fr; column-gap: 18px; row-gap: 2px;
  padding: 16px 18px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.22);
}
.legacy-tool p { margin: 0 !important; }
.legacy-tool__abbr { grid-row: 1 / span 4; font-size: 22px; font-weight: 800; line-height: 1.2; }
.legacy-tool__name { font-size: 13px; letter-spacing: 0.02em; opacity: 0.85; }
.legacy-tool__role { font-weight: 800; font-size: 16px; }
.legacy-tool__holds { font-size: 15px; line-height: 1.45; opacity: 0.92; }
.legacy-tool__users { display: flex; align-items: center; gap: 6px; margin-top: 6px !important; font-size: 14px; font-weight: 800; }
.legacy-tool__users svg { width: 16px; height: 16px; }
.legacy__note { margin-top: 14px !important; font-size: 14px; opacity: 0.85; }
@media (max-width: 600px) {
  .legacy-tool { grid-template-columns: 1fr; }
  .legacy-tool__abbr { grid-row: auto; }
}

/* Gen AI page: stats, workflow cards, flow diagrams, result chips, "how I used Gen AI" panel */
.ai-stats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); }
.ai-stats li { padding: 20px 22px; margin: 0; }
.ai-stats li + li { border-left: 1px solid var(--line); }
.ai-stats strong { display: block; font-size: 34px; line-height: 1.1; color: var(--accent); }
.ai-stats span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.ai-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ai-cards li { margin: 0; padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.ai-cards h4 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.ai-cards p { font-size: 16px; line-height: 1.55; }
.flow { margin-top: 40px; padding: 28px 32px; border: 1px solid var(--line); }
.flow h4 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.flow ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: stretch; gap: 36px; counter-reset: none; }
.flow li { position: relative; flex: 1 1 0; margin: 0; padding: 14px 16px; text-align: center; font-weight: 800; color: var(--ink); background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); line-height: 1.3; }
.flow li.flow__key { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow li small { display: block; margin-top: 4px; font-weight: 400; font-size: 14px; color: var(--muted); }
.flow li.flow__key small { color: #fff; opacity: 0.85; }
.flow li + li::before { content: "→"; position: absolute; left: -28px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 800; }
.flow__note { margin-top: 18px !important; text-align: center; font-size: 15px; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { margin: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--ink); }
.chips strong { color: var(--accent); }
.cs-panel.ai-panel { grid-template-columns: 1fr; gap: 16px; margin-top: 48px; padding: 40px 48px; }
.ai-panel h3 { margin-bottom: 0; font-size: 16px; font-weight: 800; letter-spacing: 0.08em; }
.ai-panel li + li { margin-top: 8px; }
.ai-panel ul { margin: 0; }
.cols-2 > div > h4.label { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) {
  .ai-stats { grid-template-columns: 1fr 1fr; }
  .ai-stats li:nth-child(3) { border-left: 0; }
  .ai-stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ai-cards { grid-template-columns: 1fr 1fr; }
  .flow ol { flex-direction: column; gap: 28px; }
  .flow li + li::before { content: "↓"; left: 50%; top: -24px; transform: translateX(-50%); }
}
@media (max-width: 600px) {
  .ai-cards { grid-template-columns: 1fr; }
  .flow { padding: 22px 18px; }
  .cs-panel.ai-panel { padding: 32px 20px; }
}

/* Gen AI page palette, taken from its source screenshots (AUX navy, AUX light blue, green) */
.theme-genai { --accent: #1F69FF; --navy: #01033D; --ai-green: #30D048; --ai-green-ink: #1B7F30; }
.theme-genai .cs-band h2, .theme-genai .cs-intro h1 { color: var(--navy); }
.theme-genai .cs-hero__card .accent { color: var(--navy); }
.theme-genai .cs-panel { background: var(--navy); }
.theme-genai .ai-panel h3 { color: var(--ai-green) !important; }
.theme-genai .ai-panel li::marker { color: var(--ai-green); }
.theme-genai .ai-stats { background: var(--navy); border-color: var(--navy); }
.theme-genai .ai-stats li + li { border-color: rgba(255, 255, 255, 0.18); }
.theme-genai .ai-stats strong { color: #fff; }
.theme-genai .ai-stats strong em { font-style: normal; color: var(--ai-green); }
.theme-genai .ai-stats span { color: #B9C3E6; }
.theme-genai .flow li.flow__key { background: var(--navy); border-color: var(--navy); }
.theme-genai .flow li.flow__key small { color: #B9C3E6; opacity: 1; }
.theme-genai .flow__note { color: var(--ai-green-ink); }
.theme-genai .ai-cards li { border-top-color: var(--accent); }
.theme-genai .ai-cards h4, .theme-genai .flow h4, .theme-genai .cols-2 strong, .theme-genai .ai-cards strong { color: var(--navy); }
.theme-genai .cs-close { border-top-color: var(--navy); }
@media (max-width: 900px) { .theme-genai .ai-stats li:nth-child(n+3) { border-top-color: rgba(255, 255, 255, 0.18); } }

/* Whole Bunch: phone screenshots shown whole (portrait, never cropped) and the "what happened / what I changed" list */
.phone-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; max-width: 960px; margin: 40px auto 0; }
.phone-shots figure, .phone-solo { margin: 0; }
.phone-shots img, .phone-solo img { width: 100%; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 32px rgba(59, 42, 30, 0.12); }
.phone-solo { max-width: 340px; justify-self: center; width: 100%; }
.phone-shots .caption, .phone-solo .caption { text-align: center; }
.learn { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.learn li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px 40px; margin: 0; padding: 24px 28px; border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.learn h4 { margin-bottom: 6px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.learn p { margin: 0; }
@media (max-width: 600px) {
  .phone-shots { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .phone-shots figure:nth-child(3):last-child { grid-column: 1 / -1; width: calc(50% - 8px); justify-self: center; }
  .learn li { grid-template-columns: 1fr; padding: 20px; }
}

/* ==========================================================================
   Home: career one pager
   ========================================================================== */
.home-hero { padding-block: 64px 24px; }
.home-hero__avatar { display: block; width: 96px; height: 96px; margin-bottom: 24px; border-radius: 50%; object-fit: cover; }
.home-hero .intro-hero { padding: 0; }
.home-hero h1 { max-width: 21ch; }
.home-hero p { max-width: 62ch; }
.home-hero__role { margin-top: 18px !important; font-size: clamp(20px, 1.9vw, 24px) !important; font-weight: 800; color: var(--ink); }
.focus-tags { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.focus-tags li { margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--ink); }
.home-facts { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.home-facts dt { font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.home-facts dd { margin: 4px 0 0; color: var(--ink); font-size: 16px; }
.home-facts a { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 2px; }

.home-section { margin-top: 112px; }
.home-section > .section-title { margin-bottom: 32px; }

/* Flight path: a timeline that ends on what's next */
.flight { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.flight::before { content: ""; position: absolute; left: 7px; right: 7px; top: 7px; border-top: 2px dashed color-mix(in srgb, var(--brand-ink) 45%, #fff); }
.flight li { position: relative; margin: 0; padding-top: 34px; }
.flight li::before { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-ink); box-shadow: 0 0 0 5px #fff; }
.flight li:last-child::before { background: #fff; border: 2px solid var(--brand-ink); }
.flight__when { font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-ink); }
.flight h3 { margin-top: 6px; font-size: 18px; font-weight: 800; }
.flight p { margin-top: 6px; font-size: 16px; line-height: 1.5; }

/* Selected impact */
.impact { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.impact > div { padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--brand-ink); }
.impact__figure { display: block; font-size: clamp(24px, 2.1vw, 29px); font-weight: 800; line-height: 1.1; color: var(--brand-ink); }
.impact h3 { margin-top: 12px; font-size: 18px; font-weight: 800; }
.impact p { margin-top: 8px; font-size: 16px; line-height: 1.5; }

/* What I bring / good fit */
.bring { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 48px; }
.bring li { margin: 0; }
.bring h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.bring p { font-size: 16px; line-height: 1.55; }
.fit { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.fit li { margin: 0; padding: 10px 18px; background: color-mix(in srgb, var(--brand) 12%, #fff); border-radius: 999px; font-size: 16px; color: var(--ink); }

.home-more { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 80px; }
.home-more h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
.home-more p { font-size: 17px; max-width: 62ch; }

/* ==========================================================================
   Work page + password screen
   ========================================================================== */
.work-intro { padding-block: 64px 8px; }
.work-intro h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; }
.work-intro p { max-width: 60ch; margin-top: 16px; font-size: clamp(18px, 1.6vw, 20px); }
.work-group { margin-top: 56px; }
.work-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.work-group__head .section-title { margin-bottom: 0; }
.work-group__note { margin: 0; font-size: 16px; color: var(--muted); max-width: 60ch; }
.work-group__note a { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
.lock-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: #f1f1f1; font-size: 14px !important; font-weight: 800; color: var(--ink); }
.lock-tag svg { width: 14px; height: 14px; }

.unlock { max-width: 520px; padding-block: 96px 64px; }
.unlock h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; }
.unlock p { margin-top: 14px; font-size: 18px; }
.unlock form { margin-top: 32px; display: grid; gap: 10px; }
.unlock label { font-weight: 800; color: var(--ink); }
.unlock input { font: inherit; font-size: 18px; padding: 12px 14px; border: 1px solid #8a8a8a; border-radius: 4px; }
.unlock input:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 1px; }
.unlock .btn { margin-top: 8px; justify-self: start; cursor: pointer; font: inherit; font-weight: 800; }
.unlock__error { margin-top: 20px !important; padding: 12px 16px; border-left: 4px solid #b3261e; background: #fbeceb; color: #7a1b15; font-size: 16px !important; }
.unlock__help { color: var(--muted); font-size: 16px !important; }
.unlock__help a { color: var(--ink); }

@media (max-width: 900px) {
  .home-facts { grid-template-columns: 1fr 1fr; }
  .flight { grid-template-columns: 1fr; gap: 28px; padding-left: 36px; }
  .flight::before { left: 7px; right: auto; top: 7px; bottom: 7px; border-top: 0; border-left: 2px dashed color-mix(in srgb, var(--brand-ink) 45%, #fff); }
  .flight li { padding-top: 0; }
  .flight li::before { left: -36px; top: 3px; }
  .impact { grid-template-columns: 1fr 1fr; }
  .bring { grid-template-columns: 1fr 1fr; }
  .home-more { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .home-facts, .impact, .bring { grid-template-columns: 1fr; }
  .home-section { margin-top: 80px; }
}
.home-more .about__section h3 { margin-bottom: 8px; }
.home-more .about__note a { color: var(--ink); text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
.home-more .about__note { margin-top: 16px !important; }
.home-section--first { margin-top: 72px; }
@media (max-width: 600px) { .home-section--first { margin-top: 56px; } }
/* Skills: three cards of chips */
.home-more { grid-template-columns: minmax(0, 1fr); gap: 0; }
.skills-title { margin-top: 48px; margin-bottom: 18px; font-size: 19px; font-weight: 800; }
.skill-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skill-card { padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--brand-ink); }
.skill-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.skill-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chips li { margin: 0; padding: 5px 12px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 12%, #fff); font-size: 15px; line-height: 1.35; color: var(--ink); }
@media (max-width: 900px) { .skill-cards { grid-template-columns: 1fr; } }

/* Work page: the locked "Recent work" card (the gate swaps in the project cards once unlocked) */
.locked-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 56px; align-items: center; padding: 32px 36px; background: #f6f6f4; border: 1px solid var(--line); }
.locked-card .lock-tag { margin-top: 0; background: #fff; }
.locked-card h3 { margin-top: 14px; font-size: 22px; font-weight: 800; }
.locked-card__text p:not(.lock-tag) { margin-top: 8px; font-size: 17px; max-width: 60ch; }
.locked-card__form { display: grid; gap: 8px; }
.locked-card__form label { font-weight: 800; color: var(--ink); }
.locked-card__row { display: flex; gap: 10px; }
.locked-card__row input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 11px 14px; border: 1px solid #8a8a8a; border-radius: 4px; background: #fff; }
.locked-card__row input:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 1px; }
.locked-card__row .btn { font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.locked-card .unlock__error { margin: 4px 0 0 !important; }
.locked-card__help { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.locked-card__help a { color: var(--ink); }
@media (max-width: 900px) { .locked-card { grid-template-columns: 1fr; padding: 24px; } }
@media (max-width: 600px) {
  .locked-card__row { flex-direction: column; }
  .locked-card__row .btn { width: 100%; justify-content: center; text-align: center; }
}
