/* ============================================
   Quintin Christopher - Portfolio
   Aligned to Quantesic Brand Pack (May 2026):
   Inter-led, Georgia for logo/quotes, SF Mono for labels.
   Cream/paper in light, lavender+champagne accents in dark.
   ============================================ */

:root {
  /* Light - cream & paper */
  --cream:        oklch(97.8% 0.006 120);   /* #FAFAF7 */
  --cream-2:      oklch(93.8% 0.012 112);   /* #F4EFE3 */
  --paper:        oklch(99.2% 0.004 110);   /* #FFFFFF */
  --ink:          oklch(19% 0.018 320);     /* #1A1518 */
  --ink-2:        oklch(45% 0.02 320);      /* #5C5258 */
  --ink-3:        oklch(60% 0.012 320);     /* muted */
  --line:         oklch(87% 0.012 110);     /* #E8E3DD */
  --line-2:       oklch(78% 0.017 110);     /* #D8D1C7 */
  --gold:         oklch(55% 0.12 76);       /* #B8862C */
  --gold-2:       oklch(47% 0.11 74);       /* #8B6420 */
  --aub:          oklch(33% 0.105 318);     /* #3F1F47 */
  --aub-2:        oklch(25% 0.09 318);
  --brand-soft:   oklch(92% 0.03 108);

  /* Semantic */
  --error:        oklch(50% 0.16 18);
  --warning:      oklch(64% 0.13 68);
  --success:      oklch(45% 0.095 145);
  --info:         oklch(48% 0.115 252);

  /* Aliases used by existing component CSS */
  --bg:           var(--cream);
  --bg-2:         var(--cream-2);
  --bg-3:         var(--paper);
  --fg:           var(--ink);
  --fg-2:         var(--ink-2);
  --fg-3:         var(--ink-3);
  --rule:         var(--line);
  --rule-strong:  var(--line-2);
  --accent:       var(--gold);
  --accent-2:     var(--aub);
  --green:        var(--success);
  --red:          var(--error);

  /* Type */
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif:   Georgia, "Times New Roman", ui-serif, serif;
  --mono:    "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, Menlo, monospace;
  --display: var(--sans);
  --body:    var(--sans);

  /* Spacing - controlled by density tweak */
  --density:    1;
  --section-y:  calc(96px * var(--density));
  --gap:        calc(24px * var(--density));

  /* Container */
  --maxw: 1340px;
  --pad:  clamp(20px, 4vw, 40px);

  /* Shadow */
  --shadow-card: 0 1px 2px rgba(26,21,24,.04), 0 10px 26px -18px rgba(26,21,24,.16);
  --shadow-hero: 0 22px 70px -44px rgba(26,21,24,.42), 0 10px 24px -18px rgba(26,21,24,.18);
  --focus-ring: 0 0 0 3px color-mix(in oklch, var(--gold) 24%, transparent);
}

[data-theme="dark"] {
  --cream:        oklch(17% 0.012 320);     /* #161214 */
  --cream-2:      oklch(22% 0.014 320);     /* #221C20 */
  --paper:        oklch(19% 0.012 320);     /* #1B1618 */
  --ink:          oklch(94% 0.008 95);      /* #F0EAE6 */
  --ink-2:        oklch(71% 0.012 95);      /* #A39A95 */
  --ink-3:        oklch(55% 0.012 95);
  --line:         oklch(29% 0.012 320);     /* #2E2629 */
  --line-2:       oklch(36% 0.014 320);     /* #3A3034 */
  --gold:         oklch(74% 0.08 302);      /* lavender #B89AC9 */
  --gold-2:       oklch(65% 0.085 302);
  --aub:          oklch(77% 0.07 86);       /* champagne #D9B888 */
  --aub-2:        oklch(67% 0.08 78);
  --brand-soft:   rgba(184, 154, 201, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fine grid texture in hero - same as marketing site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--ink) 4%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  z-index: -1;
  mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 80%);
}

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

::selection {
  background: color-mix(in oklch, var(--gold) 35%, transparent);
  color: var(--ink);
}

/* ================================================
   TYPE SYSTEM - Inter-led, Georgia for logo/quotes
   ================================================ */

.display {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 0.98;
  color: var(--ink);
}

/* Emphasis inside display: aubergine in light, champagne in dark.
   No italic. Weight matches surrounding. */
.display em,
.display .accent {
  font-style: normal;
  color: var(--aub);
  font-weight: 700;
}

[data-theme="dark"] .display em,
[data-theme="dark"] .display .accent {
  color: var(--aub);
}

.h-display {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.005em;
}

.h-section {
  font-family: var(--sans);
  font-weight: 680;
  font-size: clamp(36px, 4.4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

.h-card {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 25px;
  line-height: 1.15;
}

.serif-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.mono-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: 500;
}

.mono-tag.solid {
  background: var(--cream-2);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-2);
}

/* ================================================
   LAYOUT
   ================================================ */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section {
  padding: var(--section-y) 0;
  position: relative;
  scroll-margin-top: 88px;
}

section + section {
  border-top: 1px solid var(--line);
}

/* ================================================
   NAV
   ================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 68px;
  background: color-mix(in oklab, var(--cream) 82%, transparent);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  letter-spacing: -0.01em;
}

.nav-logo .qmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
}

.nav-logo .wordmark {
  color: var(--ink);
}

.nav-logo .wordmark .tesic {
  font-style: italic;
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14.5px;
  font-weight: 450;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 160ms ease, background 160ms ease;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--cream-2);
}

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

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 160ms ease;
}

.theme-btn:hover {
  color: var(--ink);
  background: var(--cream-2);
}

/* ================================================
   HERO
   ================================================ */

.hero {
  padding-top: calc(var(--section-y) + 50px);
  padding-bottom: var(--section-y);
}

.hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.005em;
  max-width: 16ch;
}

.hero h1 .line { display: block; }

.hero h1 em,
.hero h1 .accent {
  font-style: normal;
  color: var(--aub);
  font-weight: 700;
}

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.5;
  margin: 28px 0 0;
  font-weight: 400;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--gap) * 1.5);
}

.hero-split {
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: calc(var(--gap) * 1.5);
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-stacked-row { grid-template-columns: 1fr !important; gap: 28px !important; }
}

.hero-portrait { width: 100%; }

.hero-portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hero);
}

.hero-portrait-frame .stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 22px,
    color-mix(in oklch, var(--ink) 3.5%, transparent) 22px,
    color-mix(in oklch, var(--ink) 3.5%, transparent) 23px
  );
}

.hero-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  z-index: 0;
}

.hero-portrait-frame.has-image {
  background: var(--ink);
}

.hero-portrait-namecard {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 78px;
  z-index: 2;
  padding: 12px 14px;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid color-mix(in oklch, var(--ink) 8%, transparent);
  border-radius: 6px;
}

.hero-portrait-namecard .portrait-name {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.hero-portrait-namecard .portrait-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 3px;
  font-weight: 500;
}

.hero-portrait-label {
  position: absolute;
  top: 16px;
  left: 16px;
}

.hero-portrait-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.portrait-glyph {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(140px, 18vw, 220px);
  color: var(--gold);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.portrait-caption { margin-top: 18px; }

.portrait-name {
  font-family: var(--sans);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.portrait-role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 4px;
  font-weight: 500;
}

.hero-portrait-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: color-mix(in oklch, var(--paper) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-portrait-meta > div {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 600;
}

.hero-portrait-meta > div:last-child { border-right: none; }

.hero-portrait-meta strong {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 2px 0;
  text-transform: none;
}

.hero-portrait-meta em {
  font-style: normal;
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 500;
}

/* ================================================
   BUTTONS - primary is ink, not gold
   ================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 14px 30px -24px rgba(26,21,24,.6);
}

.btn-primary:hover {
  background: var(--aub);
  border-color: var(--aub);
  color: var(--paper);
}

[data-theme="dark"] .btn-primary {
  background: var(--ink);
  color: var(--cream);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--cream);
}

.btn-ghost {
  border-color: var(--line-2);
}

.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ================================================
   MARQUEE - running ticker of integrations
   ================================================ */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  margin-top: calc(var(--section-y) / 2);
  position: relative;
  mask-image: linear-gradient(90deg, transparent, oklch(0% 0 0) 8%, oklch(0% 0 0) 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, oklch(0% 0 0) 8%, oklch(0% 0 0) 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 50s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-weight: 500;
}

.marquee-item .dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.7;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ================================================
   SECTION HEADER
   ================================================ */

.section-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: calc(var(--gap) * 1.5);
  margin-bottom: calc(var(--gap) * 2);
}

.section-head h2 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 680;
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 1.04;
  max-width: 22ch;
}

.section-head h2 em,
.section-head h2 .accent {
  font-style: normal;
  color: var(--aub);
  font-weight: 680;
}

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; }
}

/* ================================================
   STORY / ABOUT
   ================================================ */

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: calc(var(--gap) * 2.5);
  align-items: start;
}

@media (max-width: 1100px) {
  .story-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: calc(var(--gap) * 2); }
}

@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: calc(var(--gap) * 1.5); }
  .about-portrait { max-width: 460px; margin-top: 1.5rem; position: static; }
}

.story-body {
  max-width: 64ch;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.story-body > .story-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 1.4em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.story-body > .story-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-2);
}

.story-body p { margin: 0 0 1.1em 0; }
.story-body p:last-child { margin-bottom: 0; }

.about-portrait {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 96px;
}
.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
}
.about-portrait figcaption {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.about-portrait figcaption strong {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.005em;
  text-transform: none;
}

.story-body .lead {
  font-family: var(--sans);
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin-bottom: 1.2em;
}

.story-body .lead em {
  font-style: normal;
  color: var(--aub);
  font-weight: 650;
}

.callout-pull {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  border: 1px solid color-mix(in oklch, var(--gold) 34%, var(--line));
  border-radius: 8px;
  background: color-mix(in oklch, var(--gold) 7%, transparent);
  padding: 18px 20px;
  margin: 1.6em 0;
  line-height: 1.4;
  max-width: 28ch;
}

/* ================================================
   CASE STUDY - Quantesic
   ================================================ */

.case-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

@media (max-width: 700px) {
  .case-head { grid-template-columns: 1fr; }
}

.case-title {
  font-family: var(--sans);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 680;
  letter-spacing: -0.005em;
  line-height: 1.04;
  margin: 0;
  max-width: 22ch;
}

.case-title em,
.case-title .accent {
  font-style: normal;
  color: var(--aub);
  font-weight: 680;
}

.case-summary {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 70ch;
  line-height: 1.55;
  margin: var(--gap) 0;
}

/* Metrics row */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: calc(var(--gap) * 1.5) 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

@media (max-width: 800px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

.metric {
  padding: 22px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric:nth-child(4n) { border-right: none; }
@media (max-width: 800px) {
  .metric { border-right: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: none; }
}

.metric-value {
  font-family: var(--sans);
  font-size: clamp(32px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.metric-value em {
  font-style: normal;
  color: var(--aub);
  font-weight: 700;
}

.metric-suffix {
  font-size: 0.55em;
  color: var(--ink-2);
  font-style: normal;
  letter-spacing: 0;
}

.metric-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 10px;
  font-weight: 500;
}

/* Case sub-sections */
.case-subhead {
  font-family: var(--sans);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 680;
  letter-spacing: -0.005em;
  margin: calc(var(--gap) * 2) 0 0 0;
  line-height: 1.1;
}

.case-sub {
  margin-top: calc(var(--gap) * 2.5);
  padding-top: calc(var(--gap) * 1.5);
  border-top: 1px solid var(--line);
}

.case-sub-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: var(--gap);
}

@media (max-width: 700px) {
  .case-sub-head { grid-template-columns: 1fr; gap: 8px; }
}

.case-sub-number {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 4.5vw, 60px);
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.case-sub-title {
  font-family: var(--sans);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 650;
  letter-spacing: -0.005em;
  line-height: 1.15;
  margin: 6px 0 0 0;
  color: var(--ink);
  max-width: 24ch;
}

.case-sub-title em,
.case-sub-title .accent {
  font-style: normal;
  color: var(--aub);
  font-weight: 650;
}

.case-sub-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-left: 100px;
  max-width: 80ch;
}

@media (max-width: 700px) { .case-sub-body { margin-left: 0; } }

.case-sub-body.with-visual {
  grid-template-columns: 1fr 1fr;
  max-width: none;
}

@media (max-width: 900px) {
  .case-sub-body.with-visual { grid-template-columns: 1fr; }
}

/* Product screenshot - used in case study visuals */
.product-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-shot-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-hero);
  aspect-ratio: 16 / 9;
}

.product-shot-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: left top;
}

.product-shot-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-shot-caption .mono {
  font-size: 11px;
  color: var(--fg-3);
}

.case-sub-text {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}

.case-sub-text p { margin: 0 0 1em 0; }

.case-sub-text .lead-line {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.4;
  margin-bottom: 1em;
}

.case-sub-text .lead-line em {
  font-style: normal;
  color: var(--aub);
  font-weight: 600;
}

.case-sub-extra {
  margin-top: calc(var(--gap) * 1.2);
  margin-left: 100px;
}

@media (max-width: 700px) { .case-sub-extra { margin-left: 0; } }

/* Moments grid */
.moments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.moment {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 240ms ease;
  box-shadow: var(--shadow-card);
}

.moment:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.moment-icon {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.6rem;
  line-height: 1;
}

.moment h5 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 4px 0 0 0;
  line-height: 1.2;
  color: var(--ink);
}

.moment p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.case-cta {
  margin-top: calc(var(--gap) * 2);
  padding-top: calc(var(--gap) * 1.5);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .case-cta { justify-content: flex-start; }
}

/* Striped placeholder */
.product-placeholder {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-card);
}

.product-placeholder .stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 22px,
    color-mix(in oklch, var(--ink) 3.5%, transparent) 22px,
    color-mix(in oklch, var(--ink) 3.5%, transparent) 23px
  );
}

.product-placeholder .label {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-placeholder .corner-meta {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-align: right;
  font-weight: 500;
}

.product-placeholder .center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.product-placeholder .center .glyph {
  font-family: var(--serif);
  font-style: italic;
  font-size: 88px;
  color: var(--gold);
  line-height: 1;
  opacity: 0.85;
  font-weight: 500;
}

.product-placeholder .center .caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 14px;
  font-weight: 500;
}

/* Stack grid */
.stack {
  margin-top: calc(var(--gap) * 1.5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stack-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 18px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.stack-card h5 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 10px 0;
  font-weight: 600;
}

.stack-card .items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.stack-card .item {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  padding: 2px 0;
  font-weight: 450;
}

/* ================================================
   EXPERIENCE TIMELINE
   ================================================ */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  margin-top: var(--gap);
}

.role {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: calc(var(--gap) * 1.5);
  padding: calc(var(--gap) * 1.5) 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background 220ms ease;
  cursor: pointer;
}

.role:hover {
  background: color-mix(in oklch, var(--cream-2) 50%, transparent);
}

.role:hover .role-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

.role:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 800px) {
  .role { grid-template-columns: 1fr; gap: 12px; }
}

.role-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-dates {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.role-loc {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.7;
  font-weight: 500;
}

.role-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-headline {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}

.role-company {
  font-family: var(--sans);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 650;
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--ink);
}

.role-title {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 450;
  color: var(--ink-2);
}

.role-arrow {
  margin-left: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-2);
  transition: all 220ms ease;
}

.role-summary {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 70ch;
  margin: 0;
}

.role-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 72ch;
}

.role-bullets li {
  padding-left: 22px;
  position: relative;
  font-size: 0.94rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.role-bullets li::before {
  content: "->";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-family: var(--mono);
}

.role-bullets li b {
  font-weight: 600;
  color: var(--ink);
}

/* ================================================
   SKILLS
   ================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.skill-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 22px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  transition: border-color 220ms ease, transform 220ms ease;
}

.skill-block:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.skill-block h3 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 0 0 4px 0;
  color: var(--ink);
}

.skill-block h3 em {
  font-style: normal;
  color: var(--aub);
  font-weight: 650;
}

.skill-block .skill-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
  font-weight: 500;
}

.skill-block .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 8px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ================================================
   CONTACT + FOOTER
   ================================================ */

.contact {
  background: var(--cream-2);
}

[data-theme="dark"] .contact {
  background: color-mix(in oklch, var(--aub) 8%, var(--cream));
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: calc(var(--gap) * 2);
  align-items: start;
}

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact h2 {
  font-family: var(--sans);
  font-size: clamp(44px, 5.5vw, 70px);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.0;
  margin: 0 0 var(--gap) 0;
}

.contact h2 em {
  font-style: normal;
  color: var(--aub);
  font-weight: 700;
}

.contact-blurb {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--paper);
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 220ms ease;
  box-shadow: var(--shadow-card);
}

.contact-link:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.contact-link .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: block;
  margin-bottom: 3px;
  font-weight: 500;
}

.contact-link .value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}

.contact-link .arrow {
  color: var(--ink-2);
  transition: transform 220ms ease, color 220ms ease;
}

.contact-link:hover .arrow {
  color: var(--gold);
  transform: translate(3px, -3px);
}

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ================================================
   WRITING / NOTES
   ================================================ */

.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.note-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 220ms ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.note-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.note-card .note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.note-card h3 {
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 0;
  line-height: 1.2;
  color: var(--ink);
}

.note-card h3 em {
  font-style: normal;
  color: var(--aub);
  font-weight: 650;
}

.note-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.note-card .read {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 200ms ease;
  font-weight: 600;
}

.note-card:hover .read { gap: 10px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: color-mix(in oklch, var(--ink) 35%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: cmd-fade 200ms ease;
}

@keyframes cmd-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cmd-rise {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  width: min(720px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px 44px;
  position: relative;
  animation: cmd-rise 280ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-hero);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
}

.modal-close:hover { background: var(--cream-2); color: var(--ink); }

.modal h2 {
  font-family: var(--sans);
  font-size: 1.9rem;
  font-weight: 680;
  letter-spacing: -0.005em;
  margin: 12px 0 14px 0;
  line-height: 1.15;
}

.modal h2 em {
  font-style: normal;
  color: var(--aub);
  font-weight: 680;
}

.modal-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 4px;
  font-weight: 500;
}

.modal-body {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}

.modal-body p { margin: 0 0 1em 0; }

.modal-body .lead {
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.modal-body .lead em {
  font-style: normal;
  color: var(--aub);
  font-weight: 600;
}

/* ================================================
   ANIMATIONS / HELPERS
   ================================================ */

.count {
  font-variant-numeric: tabular-nums;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================
   MINI DEMO - Quantesic Omnichannel Inbox
   Always-dark skin matching the real product
   ================================================ */

.demo {
  /* Real product is dark - bypass site theme */
  --bg:           oklch(17% 0.012 320);
  --bg-2:         oklch(22% 0.014 320);
  --bg-3:         oklch(26% 0.016 320);
  --fg:           oklch(94% 0.008 95);
  --fg-2:         oklch(71% 0.012 95);
  --fg-3:         oklch(55% 0.012 95);
  --rule:         oklch(29% 0.012 320);
  --rule-strong:  oklch(36% 0.014 320);
  --purple:       oklch(74% 0.08 302);              /* lavender */
  --purple-2:     oklch(65% 0.085 302);
  --purple-soft:  color-mix(in oklch, oklch(74% 0.08 302) 18%, transparent);
  --green-q:      oklch(66% 0.095 145);
  --red-q:        oklch(68% 0.13 18);
  --blue-q:       oklch(70% 0.095 252);
  --gold-q:       oklch(77% 0.07 86);               /* champagne */

  margin-top: calc(var(--gap) * 1.5);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.25), 0 8px 20px rgba(0,0,0,0.15);
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: oklch(13% 0.012 320);
}

.demo-dots { display: flex; gap: 6px; }

.demo-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.demo-url {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fg-3);
  padding: 4px 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--rule);
}

.demo-url .scheme { color: var(--fg-3); }
.demo-url .path { color: var(--fg-2); }

.demo-status {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--green-q);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.demo-status .pulse {
  width: 8px;
  height: 8px;
  background: var(--green-q);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--green-q);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--green-q) 50%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.demo-body {
  display: grid;
  grid-template-columns: 56px 240px 1fr 280px;
  min-height: 540px;
}

@media (max-width: 1100px) {
  .demo-body { grid-template-columns: 56px 220px 1fr; }
  .demo-aside { display: none; }
}

@media (max-width: 800px) {
  .demo-body { grid-template-columns: 1fr; }
  .demo-rail, .demo-sidebar { display: none; }
}

.demo-rail {
  border-right: 1px solid var(--rule);
  background: oklch(13% 0.012 320);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 6px;
}

.demo-rail .logo-q {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 14px;
}

.demo-rail .rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--fg-3);
  cursor: pointer;
  transition: all 200ms ease;
  font-size: 14px;
}

.demo-rail .rail-btn:hover {
  color: var(--fg);
  background: var(--bg-2);
}

.demo-rail .rail-btn.active {
  color: var(--purple);
  background: var(--purple-soft);
}

.demo-sidebar {
  border-right: 1px solid var(--rule);
  background: color-mix(in oklch, var(--bg-2) 50%, var(--bg));
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-sidebar-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 8px 10px;
  font-weight: 600;
}

.ticket-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 160ms ease;
  border: 1px solid transparent;
}

.ticket-row:hover { background: var(--bg-2); }
.ticket-row.active {
  background: var(--bg-2);
  border-color: var(--rule-strong);
}

.ticket-row .ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-pill {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.ticket-pill.p1   { background: color-mix(in oklch, var(--red-q) 18%, transparent);   color: var(--red-q);   border: 1px solid color-mix(in oklch, var(--red-q) 30%, transparent); }
.ticket-pill.p2   { background: color-mix(in oklch, var(--gold-q) 18%, transparent);  color: var(--gold-q);  border: 1px solid color-mix(in oklch, var(--gold-q) 30%, transparent); }
.ticket-pill.p3   { background: var(--bg-3);                                          color: var(--fg-3);    border: 1px solid var(--rule); }
.ticket-pill.test { background: color-mix(in oklch, var(--blue-q) 18%, transparent);  color: var(--blue-q);  border: 1px solid color-mix(in oklch, var(--blue-q) 30%, transparent); }

.ticket-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  font-weight: 500;
}

.ticket-row .ticket-title {
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.ticket-row .ticket-acct {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  font-weight: 500;
}

.demo-main {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.demo-ticket-id {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.demo-h {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 680;
  letter-spacing: -0.005em;
  margin: 4px 0 0;
  line-height: 1.2;
  color: var(--fg);
}

.demo-source {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--fg-3);
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-weight: 600;
}

.status-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.status-pill.blue {
  background: color-mix(in oklch, var(--blue-q) 14%, transparent);
  color: var(--blue-q);
  border: 1px solid color-mix(in oklch, var(--blue-q) 28%, transparent);
}

.status-pill.purple {
  background: color-mix(in oklch, var(--purple) 14%, transparent);
  color: var(--purple);
  border: 1px solid color-mix(in oklch, var(--purple) 28%, transparent);
}

.demo-payload {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  background: oklch(12% 0.012 320);
  color: var(--fg-2);
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  max-height: 130px;
  overflow: auto;
}

.demo-payload .k { color: var(--blue-q); }
.demo-payload .s { color: var(--gold-q); }
.demo-payload .n { color: var(--red-q); }

.demo-action {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-triage {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid color-mix(in oklch, var(--purple) 40%, transparent);
  background: var(--purple-soft);
  color: var(--purple);
  cursor: pointer;
  transition: all 200ms ease;
}

.btn-triage:hover:not(:disabled) {
  background: var(--purple);
  color: oklch(13% 0.012 320);
  border-color: var(--purple);
  transform: translateY(-1px);
}

.btn-triage:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-triage .qmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--gold-q);
  font-size: 1.05rem;
}

.demo-timer {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.demo-timer .num {
  color: var(--purple);
  font-weight: 600;
}

.diagnosis {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.diagnosis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  background: color-mix(in oklch, var(--purple) 10%, var(--bg-2));
  border-bottom: 1px solid var(--rule);
}

.diagnosis-head .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.diagnosis-head .label .qmark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--purple);
  font-size: 1.05rem;
}

.diagnosis-confidence {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--green-q);
  font-weight: 600;
}

.diagnosis-body {
  padding: 16px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diagnosis-section h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 6px 0;
  font-weight: 600;
}

.diagnosis-section p {
  margin: 0;
  font-size: 13.5px;
  color: var(--fg);
  line-height: 1.5;
}

.diagnosis-plan {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diagnosis-plan li {
  display: flex;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.45;
}

.diagnosis-plan .box {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--purple);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
}

.risk-flag {
  margin: 0 16px 16px;
  padding: 10px 14px;
  background: color-mix(in oklch, var(--red-q) 12%, var(--bg-2));
  border: 1px solid color-mix(in oklch, var(--red-q) 30%, transparent);
  border-radius: 6px;
  display: flex;
  gap: 10px;
  align-items: start;
}

.risk-flag .pill {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--red-q);
  font-weight: 700;
  padding-top: 2px;
}

.risk-flag p {
  margin: 0;
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.45;
}

.diagnosis-empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--fg-3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.diagnosis-empty .glyph {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--purple);
  font-size: 2.6rem;
  opacity: 0.7;
  line-height: 1;
}

.diagnosis-empty p {
  margin: 0;
  font-size: 13.5px;
  max-width: 36ch;
  line-height: 1.5;
}

.diagnosis-loading {
  padding: 56px 24px;
  text-align: center;
  color: var(--fg-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--rule);
  border-top-color: var(--purple);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { to { opacity: 0; } }

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-2) 0%,
    color-mix(in oklch, var(--purple) 18%, var(--bg-2)) 50%,
    var(--bg-2) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 4px;
  height: 9px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.demo-aside {
  border-left: 1px solid var(--rule);
  background: color-mix(in oklch, var(--bg-2) 60%, var(--bg));
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.aside-section h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 10px 0;
  font-weight: 600;
}

.aside-escalation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.escalate-card {
  padding: 12px 8px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-2);
  text-align: center;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.escalate-card:hover {
  border-color: var(--purple);
  background: color-mix(in oklch, var(--purple) 8%, var(--bg-2));
}

.escalate-card .icon { color: var(--blue-q); font-size: 14px; }

.escalate-card .label {
  font-size: 11.5px;
  color: var(--fg-2);
  line-height: 1.2;
  font-weight: 500;
}

