/* Brianna Godfrey: portfolio styles */

:root {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --ink: #141418;
  --ink-2: #55535E;
  --line: rgba(20, 20, 24, 0.10);
  --line-strong: rgba(20, 20, 24, 0.18);
  --accent: #5A3FE8;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECE8FF;
  --cyan: #0E8C96;

  --code-bg: #15151B;
  --code-ink: #E8E6F0;
  --code-muted: #8B8A99;
  --code-line: rgba(255, 255, 255, 0.08);
  --tok-key: #C3B5FF;
  --tok-str: #F5C482;
  --tok-fn: #7DE3EC;
  --tok-num: #FF9AB0;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 24, 0.04), 0 18px 40px -18px rgba(20, 20, 24, 0.22);

  --stage-edge: transparent;

  color-scheme: light;
}

/* Dark theme: a soft charcoal, chosen with the switch in the header */
[data-theme="dark"] {
  --bg: #1C1C22;
  --surface: #26262E;
  --ink: #EDEBE6;
  --ink-2: #B3B1BC;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --accent: #A898FF;
  --accent-ink: #141418;
  --accent-soft: #2B2645;
  --cyan: #7DE3EC;
  --code-bg: #141419;
  --stage-edge: rgba(255, 255, 255, 0.10);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* Base */

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 3px; }

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

h1, h2, h3 { margin: 0; font-weight: 500; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
  color: var(--ink-2);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 14px 0 0 var(--cyan);
  margin-right: 14px;
}

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 8px;
  min-height: 68px; transition: min-height 0.3s ease;
}
.wordmark {
  font-family: var(--serif); font-size: 21px; font-weight: 500;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap;
  margin-right: auto; transition: font-size 0.3s ease;
}
.wordmark span { color: var(--accent); }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  padding: 10px 12px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--line); }
.site-nav a[aria-current="page"] { color: var(--ink); }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15.5px; font-weight: 600; text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */

.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero h1 {
  font-family: var(--serif); font-size: clamp(44px, 7.4vw, 92px);
  line-height: 1.02; letter-spacing: -0.03em; margin: 22px 0 28px; max-width: 13.5em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 18.5px; color: var(--ink-2); max-width: 34em; margin-bottom: 32px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 36px 0 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }

/* Design / Code switcher */

.switcher {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.switcher-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line);
}
.switcher-label { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.tab {
  appearance: none; border: 0; cursor: pointer;
  font: 600 13.5px/1 var(--sans); color: var(--ink-2); background: transparent;
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.tab[data-kind="design"]::before { background: var(--accent); opacity: 1; }
.tab[data-kind="code"]::before { background: var(--cyan); opacity: 1; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.tab:hover { color: var(--ink); }
.tab-panel[hidden] { display: none; }

/* Hero spec card: design view */

.spec {
  position: relative; display: grid; place-items: center;
  min-height: 330px; padding: 48px 24px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    #1E2A23;
}
.spec-stage { position: relative; }
.spec-btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: #E3A857; color: #1E2A23; font-weight: 600; font-size: 16px;
  outline: 1px dashed rgba(125, 227, 236, 0.9); outline-offset: 0;
}
.spec-note {
  position: absolute; font-family: var(--mono); font-size: 11.5px; line-height: 1.2;
  color: #7DE3EC; white-space: nowrap;
}
.spec-note.top { left: 0; right: 0; top: -30px; text-align: center; }
.spec-note.top::after,
.spec-note.left::after {
  content: ""; position: absolute; background: rgba(125, 227, 236, 0.7);
}
.spec-note.top::after { left: 0; right: 0; bottom: -9px; height: 1px; }
.spec-note.left { right: calc(100% + 14px); top: 50%; transform: translateY(-50%); }
.spec-note.left::after { right: -8px; top: -14px; bottom: -14px; width: 1px; }
.spec-note.bottom { left: 0; top: calc(100% + 16px); color: #E8E1D6; }
.spec-note.bottom b { color: #E3A857; font-weight: 500; }
.spec-swatches { display: flex; gap: 8px; margin-top: 8px; }
.spec-swatches i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); }
.spec-caption {
  margin: 0; padding: 14px 18px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}

/* Code blocks */

.code {
  margin: 0; padding: 22px 24px; overflow-x: auto;
  background: var(--code-bg); color: var(--code-ink);
  font: 400 13.5px/1.7 var(--mono); tab-size: 2;
}
.code .c { color: var(--code-muted); font-style: italic; }
.code .k { color: var(--tok-key); }
.code .s { color: var(--tok-str); }
.code .f { color: var(--tok-fn); }
.code .n { color: var(--tok-num); }
.switcher .code { min-height: 330px; border-radius: 0; }

/* Sections */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 {
  font-family: var(--serif); font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.1; letter-spacing: -0.02em; margin-top: 14px;
}
.section-head p { color: var(--ink-2); max-width: 30em; margin: 0; }

/* Project cards */

.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 32px); }
.project-card {
  display: flex; flex-direction: column; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.project-card:focus-visible { outline-offset: 4px; border-radius: var(--radius); }

.stage {
  position: relative; aspect-ratio: 16 / 11; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 32px 32px 0;
}
.stage img {
  width: 100%; border-radius: 10px 10px 0 0;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s ease;
}
.project-card:hover .stage img { transform: translateY(-6px); }
.stage-phones { gap: 4%; align-items: center; padding: 24px; }
.stage-phones img { width: 30%; border-radius: 0; box-shadow: none; filter: drop-shadow(0 16px 24px rgba(80, 40, 20, 0.25)); }
.stage-phones img:nth-child(2) { width: 34%; }

.stage-weekflow { background: linear-gradient(160deg, #E9E9E5, #CFCFCA); }
.stage-ironclad { background: radial-gradient(120% 90% at 80% 0%, #2E4057, #1A1D21 70%); }
.stage-palette { background: linear-gradient(150deg, #F3E6DC, #E2C3B4); }
.stage-helix { background: radial-gradient(110% 90% at 20% 0%, #34463B, #1E2A23 70%); }

.project-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.project-type { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.project-card h3 { font-family: var(--serif); font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
.project-card p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.project-more {
  margin-top: auto; padding-top: 8px; font-size: 15px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.project-more::after { content: "→"; transition: transform 0.2s ease; }
.project-card:hover .project-more::after { transform: translateX(4px); }

.disciplines { display: inline-flex; gap: 6px; }
.disc {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1;
  padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2);
}
.disc::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.disc-design::before { background: var(--accent); }
.disc-code::before { background: var(--cyan); }

/* About: design + build */

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.about-intro h2 {
  font-family: var(--serif); font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.15; letter-spacing: -0.02em; margin: 14px 0 20px;
}
.about-intro p { color: var(--ink-2); }
.toolkit {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.toolkit h3 { font-family: var(--mono); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.toolkit h3::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.toolkit-design h3::before { background: var(--accent); }
.toolkit-code h3::before { background: var(--cyan); }
.toolkit p { font-size: 15.5px; color: var(--ink-2); margin: 12px 0 18px; }
.toolkit ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toolkit li {
  font-size: 13.5px; padding: 6px 11px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line);
}

/* Contact */

.contact { padding: clamp(72px, 10vw, 128px) 0 40px; border-top: 1px solid var(--line); }
.contact h2 {
  font-family: var(--serif); font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.06; letter-spacing: -0.025em; margin: 16px 0 24px; max-width: 14em;
}
.contact-email {
  display: inline-block; font-family: var(--serif); font-size: clamp(22px, 3vw, 32px);
  color: var(--accent); text-decoration: none; border-bottom: 2px solid currentColor;
  padding-bottom: 2px; overflow-wrap: anywhere;
}
.contact-email:hover { border-bottom-width: 4px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 40px 0 0; padding: 0; list-style: none; }
.contact-links a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; gap: 6px;
}
.contact-links a::after { content: "↗"; color: var(--ink-2); font-size: 0.9em; }
.contact-links a:hover { color: var(--accent); }
.site-footer {
  margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
}

/* Case study pages */

.case-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 4vw, 48px); }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.back-link:hover { color: var(--accent); }
.case-hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.06; letter-spacing: -0.025em; margin: 20px 0 20px; max-width: 16em;
}
.case-hero .tagline { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 38em; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line);
}
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 15.5px; }
.facts dd a { display: block; font-weight: 500; }

.case-figure { margin: 0 0 clamp(48px, 7vw, 88px); }
.case-figure .switcher-bar { flex-wrap: wrap; }
.figure-stage { padding: clamp(20px, 4vw, 48px) clamp(20px, 4vw, 48px) 0; display: flex; justify-content: center; align-items: flex-end; }
.figure-stage img { border-radius: 10px 10px 0 0; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.5); }
.figure-stage.stage-phones { padding: clamp(24px, 4vw, 48px); align-items: center; gap: 3%; }
.figure-stage.stage-phones img { border-radius: 0; box-shadow: none; }
.figure-caption { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.figure-caption code { font-family: var(--mono); font-size: 13px; color: var(--ink); }

.case-layout { display: grid; grid-template-columns: 200px 1fr; gap: clamp(32px, 6vw, 88px); padding-bottom: clamp(48px, 8vw, 96px); }
.toc { position: sticky; top: 100px; align-self: start; }
.toc p { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 14.5px; color: var(--ink-2); text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); }

.case-body { max-width: 680px; }
.case-body section + section { margin-top: clamp(40px, 5vw, 56px); }
.case-body h2 {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.015em; margin-bottom: 16px;
}
.case-body p, .case-body li { font-size: 17.5px; }
.case-body ul { padding-left: 20px; margin: 0; }
.case-body li { margin-bottom: 12px; padding-left: 4px; }
.case-body li::marker { color: var(--accent); }
.case-body code { font-family: var(--mono); font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.case-body figure { margin: 32px 0 0; }
.case-body figure img { border-radius: 12px; border: 1px solid var(--line); }
.case-body figcaption { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.note {
  background: var(--accent-soft); border-radius: 14px; padding: 22px 24px;
}
.note h2 { font-size: 22px; margin-bottom: 8px; }
.note p:last-child { margin: 0; }

.case-body .tag-list { padding-left: 0; }
.case-body .tag-list li { padding-left: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.tag-list li { font-family: var(--mono); font-size: 12.5px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--ink-2); margin: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 40px 0 0; border-top: 1px solid var(--line); }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease;
}
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager span { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.pager strong { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.pager .next { text-align: right; grid-column: 2; }

/* Responsive */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-intro { grid-column: 1 / -1; }
  .case-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .work-grid, .about-grid { grid-template-columns: 1fr; }
  .stage { padding: 22px 22px 0; }
  .stage-phones { padding: 18px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 10px 8px; font-size: 14.5px; }
  .wordmark { font-size: 19px; }
  .spec { min-height: 280px; }
  .spec-note.left { display: none; }
  .switcher .code { min-height: 280px; font-size: 12.5px; padding: 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .case-body p, .case-body li { font-size: 16.5px; }
}

@media (max-width: 380px) {
  .wordmark span { display: none; }
}

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

/* Small helpers */

.spec-swatches .sw-honey { background: #E3A857; }
.spec-swatches .sw-forest { background: #1E2A23; }
.figure-stage.stage-phones img { width: 22%; }
.figure-stage.stage-phones img:nth-child(2) { width: 25%; }
/* About: skill groups */

.about-grid { grid-template-columns: 0.9fr 1.6fr; align-items: start; }
.about-intro { position: sticky; top: 100px; }
.toolkits { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 20px); }
.toolkit-code { grid-row: span 2; }
.toolkit-work { grid-column: 1 / -1; }
.toolkit-security h3::before { background: var(--ink); }
.toolkit-work h3::before { background: var(--ink-2); }
.toolkit h4 { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-2); margin: 18px 0 10px; }
.toolkit p + h4 { margin-top: 0; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-intro { position: static; grid-column: auto; }
}

@media (max-width: 680px) {
  .toolkits { grid-template-columns: 1fr; }
  .toolkit-code { grid-row: auto; }
  .toolkit-work { grid-column: auto; }
}
/* Theme toggle */

.theme-toggle {
  appearance: none; cursor: pointer; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: transparent; color: var(--ink-2); border: 1px solid var(--line);
  transition: color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { color: var(--ink); background: var(--line); }
.theme-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; transition: transform 0.4s ease, opacity 0.3s ease; }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: none; }

/* Header gets smaller once you scroll */

.site-header.is-small .wrap { min-height: 54px; }
.site-header.is-small .wordmark { font-size: 18px; }

/* Dark project backdrops get a thin edge in dark mode */

.stage, .figure-stage { box-shadow: inset 0 0 0 1px var(--stage-edge); }

/* Design to code story: pinned while you scroll */

.story { border-top: 1px solid var(--line); }
.story-track { height: 280vh; position: relative; }
.story-pin {
  position: sticky; top: 72px; min-height: calc(100vh - 72px);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center;
  padding: 32px 0;
}
.story-text h2 {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1; letter-spacing: -0.02em; margin: 14px 0 24px;
}
.story-steps { list-style: none; margin: 0; padding: 0; }
.story-steps li { color: var(--ink-2); opacity: 0.5; margin-bottom: 16px; font-size: 17px; transition: opacity 0.3s ease, color 0.3s ease; }
.story-steps li.is-on { color: var(--ink); opacity: 1; }
.story-steps b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--accent); }
.story-progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.story-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.story-caption { font-size: 14px; color: var(--ink-2); margin: 14px 0 0; }

.morph {
  position: relative; height: clamp(280px, 40vw, 380px); border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    #1E2A23;
  box-shadow: var(--shadow);
}
.morph-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: #E3A857; color: #1E2A23; font-weight: 600; font-size: 16px; white-space: nowrap;
  outline: 1px dashed transparent;
  transition: outline-color 0.4s ease, opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.morph-note {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; color: #7DE3EC; white-space: nowrap;
  opacity: 0; transition: opacity 0.4s ease;
}
.morph-note-top { top: calc(50% - 50px); }
.morph-note-bottom { top: calc(50% + 40px); color: #E8E1D6; }
.morph-code {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.6s ease;
}
.morph[data-step="1"] .morph-btn { outline-color: rgba(125, 227, 236, 0.9); }
.morph[data-step="1"] .morph-note { opacity: 1; }
.morph[data-step="2"] .morph-btn { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
.morph[data-step="2"] .morph-code { opacity: 1; transform: none; }

/* Motion. JavaScript adds .motion to the page only when the visitor
   hasn't asked for reduced motion, so nothing is ever hidden without it. */

.motion .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(0.5em); filter: blur(6px); }
.motion .hero.is-in h1 .w { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i) * 60ms); }
.motion .hero .hero-sub,
.motion .hero .btn-row,
.motion .hero .hero-facts { opacity: 0; }
.motion .hero.is-in .hero-sub,
.motion .hero.is-in .btn-row,
.motion .hero.is-in .hero-facts { animation: fade-up 0.8s ease forwards; animation-delay: 0.9s; }
.motion .hero.is-in .btn-row { animation-delay: 1.05s; }
.motion .hero.is-in .hero-facts { animation-delay: 1.2s; }
@keyframes rise { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.motion .reveal {
  opacity: 0; transform: translateY(28px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}
.motion .reveal.is-in { opacity: 1; transform: none; }
.motion .reveal.is-settled { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; transition-delay: 0s; }
.motion .project-card.reveal.is-settled:hover { transform: translateY(-4px); }

.motion .work-grid { perspective: 1200px; }
.project-card .stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 55%);
}
.motion .project-card:hover .stage::after { opacity: 1; }

.motion .figure-stage img { transform: scale(var(--grow, 1)); transform-origin: 50% 100%; opacity: var(--fade, 1); will-change: transform; }

.fill-text .fw { transition: color 0.3s ease; }
.motion .fill-text .fw { color: var(--line-strong); }
.motion .fill-text .fw.is-lit { color: inherit; }
.contact h2.fill-text { color: var(--ink); }

@media (max-width: 900px) {
  .story-track { height: 240vh; }
  .story-pin { grid-template-columns: 1fr; gap: 20px; align-content: center; }
}

@media (max-width: 680px) {
  .site-header .wrap { gap: 4px; }
  .site-nav a { padding: 10px 6px; font-size: 14px; }
  .wordmark { font-size: 17.5px; }
  .site-header.is-small .wordmark { font-size: 17px; }
  .theme-toggle { width: 40px; height: 40px; }
  .story-steps li:not(.is-on) { display: none; }
  .story-text h2 { margin-bottom: 14px; }
  .morph { height: 260px; }
  .morph .code { font-size: 12px; padding: 18px; }
}

/* Smooth story: with motion on, scroll position drives the story directly */

.motion .morph { transform: scale(var(--enter, 1)); }
.motion .morph .morph-btn {
  transition: none;
  opacity: calc(1 - var(--out, 0));
  transform: translate(-50%, calc(-50% - 28px * var(--out, 0))) scale(calc(1 - 0.08 * var(--out, 0)));
  outline-color: rgba(125, 227, 236, calc(0.9 * var(--spec, 0)));
}
.motion .morph .morph-note { transition: none; opacity: calc(var(--spec, 0) * (1 - var(--out, 0))); }
.motion .morph .morph-code {
  transition: none;
  opacity: var(--in, 0);
  transform: translateY(calc(24px * (1 - var(--in, 0))));
}
/* Helix & Hue: offer for real stylists */

.offer {
  margin-top: clamp(40px, 6vw, 56px); padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius); background: var(--accent-soft);
}
.case-body .offer h2 { margin: 12px 0 10px; }
.case-body .offer p { color: var(--ink); }
.offer .btn { margin-top: 4px; }
.offer-tag {
  align-self: flex-start; margin-top: 4px;
  font-family: var(--mono); font-size: 12px; line-height: 1;
  padding: 7px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
/* Resume link in the hero */

.btn-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 6px;
  font-size: 15.5px; font-weight: 600; color: var(--accent); text-decoration: none;
}
.btn-link::after { content: "↓"; transition: transform 0.2s ease; }
.btn-link:hover::after { transform: translateY(2px); }
/* PaySupport: featured card and its labels */

.stage-paysupport { background: linear-gradient(160deg, #EFEDE8, #D9D5CC); }
.disc-security::before { background: var(--ink); }
@media (min-width: 900px) {
  .project-card.is-featured { grid-column: 1 / -1; flex-direction: row; }
  .project-card.is-featured .stage { flex: 1.35; aspect-ratio: auto; min-height: 380px; }
  .project-card.is-featured .project-body { flex: 1; justify-content: center; padding: 36px; }
  .project-card.is-featured h3 { font-size: 32px; }
}
.case-body .fig-phone { max-width: 300px; }

/* AI Buying Concierge: case study */

.stage-concierge { background: linear-gradient(160deg, #E6E6E3, #C9C9C5); }
.disc-product::before { background: var(--ink-2); }

.flow {
  list-style: none; margin: 24px 0; padding: 0;
  display: grid; gap: 10px; counter-reset: flow;
}
.case-body .flow li {
  counter-increment: flow; margin: 0; padding: 14px 18px 14px 56px; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; font-weight: 500;
}
.flow li::before {
  content: counter(flow, decimal-leading-zero);
  position: absolute; left: 18px; top: 15px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.case-body .flow li.is-key { background: var(--accent-soft); border-color: var(--accent); }
.flow li span {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--accent);
}

.next-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.next-steps h3 {
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px;
}
.status {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400; line-height: 1;
  padding: 5px 8px; border-radius: 999px; background: var(--surface); color: var(--ink-2);
}
.case-body .next-steps li { font-size: 15.5px; margin-bottom: 8px; }

@media (max-width: 680px) {
  .next-steps { grid-template-columns: 1fr; }
}

/* Work grid: a last card left alone on its row goes full width, like the featured card */

@media (min-width: 900px) {
  .work-grid > .project-card:not(.is-featured):last-child:nth-child(even) { grid-column: 1 / -1; flex-direction: row; }
  .work-grid > .project-card:not(.is-featured):last-child:nth-child(even) .stage { flex: 1.35; aspect-ratio: auto; min-height: 380px; }
  .work-grid > .project-card:not(.is-featured):last-child:nth-child(even) .project-body { flex: 1; justify-content: center; padding: 36px; }
}
