/* Shared styles for every page. Design tokens first, then base rules, then hover states. */

:root {
  --bg:#F7F4EF;
  --bg-glass:rgba(247,244,239,0.92);
  --ink:#24231F;
  --ink-2:#4A4741;
  --ink-3:#3B3934;
  --muted:#6B6862;
  --muted-2:#6C6860;
  --rule:#E3DCCF;
  --rule-2:#E0D8C9;
  --rule-3:#C9BFA9;
  --gold:#7D653A;
  --accent-ink:#80642F;
  --live:#4C7A5B;
  --surface:#EFEAE1;
  --tint-green:#ECF6EF;
  --tint-green-rule:#DCE8DF;
  --tint-teal:#EEF4F3;
  --tint-sage:#EFF3EC;
  --tint-sage-rule:#C9D6C3;
  --tint-sage-ink:#7D8A78;
  --card-dark:#1C1B19;
  --card-grey:#D3CABA;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg:#161513;
  --bg-glass:rgba(22,21,19,0.9);
  --ink:#EDE8DF;
  --ink-2:#C9C3B8;
  --ink-3:#D6D0C5;
  --muted:#A09A8F;
  --muted-2:#8C877D;
  --rule:#2E2C28;
  --rule-2:#3A3732;
  --rule-3:#57523F;
  --gold:#C9A765;
  --accent-ink:#D8B774;
  --live:#6FAE84;
  --surface:#221F1C;
  --tint-green:#1D2520;
  --tint-green-rule:#2C3830;
  --tint-teal:#1C2423;
  --tint-sage:#1E231C;
  --tint-sage-rule:#3A4535;
  --tint-sage-ink:#A3B09D;
  --card-dark:#252320;
  --card-grey:#46423B;
  color-scheme: dark;
}


/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
:root {
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(56px, 6.5vw, 88px);
  --radius: 2px;
  --header-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; transition: background-color 250ms ease, color 250ms ease; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 1px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); font-size: 14px; }
.skip-link:focus { top: 12px; color: var(--bg); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes dcRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rise { animation: rise 800ms cubic-bezier(.2,.7,.3,1) both; }

/* ------------------------------------------------------------------
   Layout + type
   ------------------------------------------------------------------ */
.page { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-block: var(--section-y); }
.section + .section, .section--rule { border-top: 1px solid var(--rule); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-label { font-family: var(--font-sans); font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.section-note { font-size: 14px; color: var(--muted); }
.eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.025em; line-height: 1.04; }
.display em { font-style: italic; color: var(--accent-ink); }
.lede { font-size: clamp(16.5px, 1.4vw, 18px); line-height: 1.7; color: var(--ink-2); max-width: 52ch; }
.prose p { font-size: 17px; line-height: 1.75; color: var(--ink-3); max-width: 60ch; }
.prose p + p { margin-top: 18px; }
.text-link { border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.text-link:hover { border-bottom-color: var(--accent-ink); }

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; font: 500 14px/1.2 var(--font-sans); border: 1px solid var(--rule-3); border-radius: var(--radius); color: var(--ink); background: transparent; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-3); border-color: var(--ink-3); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------
   Header + navigation
   ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; min-height: var(--header-h); padding: 12px 0; background: var(--bg-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-logo { font-family: var(--font-display); font-size: 19px; letter-spacing: -0.01em; margin-right: auto; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px 22px; font-size: 14px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 32px; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.site-nav a[aria-current] { border-bottom-color: var(--ink); }
.site-tools { display: flex; align-items: center; gap: 16px; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; font: 500 13px var(--font-sans); color: var(--ink); background: transparent; border: 1px solid var(--rule-3); border-radius: var(--radius); cursor: pointer; }
.menu-btn-bars { position: relative; width: 14px; height: 1px; background: currentColor; }
.menu-btn-bars::before, .menu-btn-bars::after { content: ""; position: absolute; left: 0; width: 14px; height: 1px; background: currentColor; transition: transform 200ms ease; }
.menu-btn-bars::before { top: -4px; } .menu-btn-bars::after { top: 4px; }
.site-header.is-open .menu-btn-bars { background: transparent; }
.site-header.is-open .menu-btn-bars::before { transform: translateY(4px) rotate(45deg); }
.site-header.is-open .menu-btn-bars::after { transform: translateY(-4px) rotate(-45deg); }

.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-pill .dot, .live-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--live); }
.status-pill time { color: var(--ink); }
.lagos-time[hidden] { display: none; }

/* ------------------------------------------------------------------
   Home: hero
   ------------------------------------------------------------------ */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 96px); }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-greeting { font-family: var(--font-display); font-size: clamp(20px, 2vw, 24px); letter-spacing: -0.01em; color: var(--ink-2); }
.hero h1 { font-size: clamp(40px, 5.2vw, 70px); }
.hero .lede { max-width: 50ch; }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: var(--radius); }
.hero .status-pill { align-self: flex-start; }

/* ------------------------------------------------------------------
   Home: Pixel Playground marquee
   ------------------------------------------------------------------ */
.marquee { position: relative; overflow: hidden; padding-block: 8px 4px; }
.marquee-track { display: flex; gap: 18px; width: max-content; padding-inline: 4px; }
.marquee.is-running .marquee-track { animation: marquee 80s linear infinite; }
.marquee.is-running:hover .marquee-track, .marquee.is-running:focus-within .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee:not(.is-running) { overflow-x: auto; scrollbar-width: thin; }
.pp-card { position: relative; z-index: 1; width: 320px; display: flex; flex-direction: column; gap: 12px; transform-origin: center; transition: transform 420ms cubic-bezier(.2,.7,.3,1); }
.pp-frame { width: 100%; aspect-ratio: 4 / 3; padding: 12px; background: var(--card-grey); border-radius: var(--radius); overflow: hidden; }
.pp-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pp-card figcaption { font-size: 12.5px; color: var(--muted); }
.marquee-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; font: 500 12.5px var(--font-sans); color: var(--muted); background: transparent; border: 1px solid var(--rule-2); border-radius: 999px; cursor: pointer; }
.marquee-toggle:hover { color: var(--ink); border-color: var(--ink); }
@media (hover: hover) { .marquee.is-running .pp-card:hover { transform: scale(1.12); z-index: 5; } }

/* ------------------------------------------------------------------
   Home: what I do (pillars) + shared ruled grids
   ------------------------------------------------------------------ */
.ruled-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.ruled-grid > * { background: var(--bg); }
.pillars { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.pillar { padding: 30px 28px 34px; display: flex; flex-direction: column; gap: 12px; }
.pillar-no { font-size: 11.5px; color: var(--gold); font-variant-numeric: tabular-nums; }
.pillar h3 { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.2; }
.pillar p { font-size: 15px; line-height: 1.65; color: var(--ink-2); }

/* ------------------------------------------------------------------
   Home: selected work cards
   ------------------------------------------------------------------ */
.work-list { display: flex; flex-direction: column; }
.work-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); }
.work-card:first-child { border-top: 0; padding-top: 0; }
.work-card.is-flipped .work-media { order: 2; }
.work-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: clamp(14px, 2vw, 22px); background: var(--tint-green); border-radius: var(--radius); overflow: hidden; }
.work-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 1px solid var(--tint-green-rule); transition: transform 500ms cubic-bezier(.2,.7,.3,1); }
.work-card:hover .work-media img { transform: scale(1.03); }
.work-body { display: flex; flex-direction: column; gap: 16px; }
.work-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.work-meta .sep { color: var(--rule-3); }
.work-card h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.work-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.work-card h3 a:focus-visible { outline: none; }
.work-card:has(h3 a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 8px; }
.work-kicker { font-size: 15px; letter-spacing: 0.02em; color: var(--accent-ink); }
.work-summary { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 48ch; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tag { border: 1px solid var(--rule-2); padding: 4px 10px; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.work-stats { display: flex; flex-wrap: wrap; gap: 14px 0; margin: 4px 0 0; }
.work-stats div { display: flex; flex-direction: column; gap: 2px; padding: 0 22px 0 14px; border-left: 1px solid var(--rule-2); }
.work-stats dt { order: 2; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.work-stats dd { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.work-stats-note { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.work-cta { align-self: flex-start; margin-top: 4px; font-size: 14px; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.work-card:hover .work-cta { color: var(--accent-ink); }

/* ------------------------------------------------------------------
   Home + About: about teaser, chips, stack, experience
   ------------------------------------------------------------------ */
.about-teaser { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.about-teaser img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-teaser-body { display: flex; flex-direction: column; gap: 24px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0 0; margin: 0; list-style: none; border-top: 1px solid var(--rule); }
.chip { border: 1px solid var(--rule-2); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; color: var(--ink-2); }

.stack { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.stack-group { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 12px; }
.stack-group h3 { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

.xp-list { margin: 0; padding: 0; list-style: none; }
.xp { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding-block: 30px; border-top: 1px solid var(--rule); }
.xp-when { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.xp-dates { color: var(--muted); font-variant-numeric: tabular-nums; }
.xp-org { color: var(--gold); }
.xp-body { display: flex; flex-direction: column; gap: 12px; }
.xp-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.2; }
.xp-body p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }

/* ------------------------------------------------------------------
   Home: testimonials
   ------------------------------------------------------------------ */
.testimonials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 48px) clamp(32px, 5vw, 64px); margin: 0; padding: 0; list-style: none; }
.testimonial { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; border-top: 1px solid var(--ink); }
.testimonial blockquote p { font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--ink); }
.testimonial figcaption { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------------
   Closing CTA + footer
   ------------------------------------------------------------------ */
.cta { display: flex; flex-direction: column; gap: 28px; max-width: 900px; }
.cta-title { font-size: clamp(38px, 5.4vw, 68px); }
.cta .lede { max-width: 48ch; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 28px 0 44px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------------
   About page
   ------------------------------------------------------------------ */
.page-intro { padding-block: clamp(56px, 8vw, 96px) clamp(48px, 6vw, 80px); }
.page-intro h1 { font-size: clamp(36px, 4.8vw, 60px); line-height: 1.08; max-width: 22ch; }
.about-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.about-intro-copy { display: flex; flex-direction: column; gap: 26px; }
.about-intro-side { display: flex; flex-direction: column; gap: 28px; }
.about-intro-side img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.pull { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: 1px solid var(--ink); }
.pull blockquote p { font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.45; }
.pull figcaption { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.traits { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.trait { padding: 28px 26px 32px; display: flex; flex-direction: column; gap: 10px; }
.trait h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.trait p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 32px 20px; margin: 0; padding: 0; list-style: none; }
.photo-grid figure { display: flex; flex-direction: column; gap: 12px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); border-radius: var(--radius); }
.photo-grid figcaption { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-row p { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.02em; max-width: 20ch; }

/* ------------------------------------------------------------------
   Contact page
   ------------------------------------------------------------------ */
.contact { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 72px); align-items: start; padding-block: clamp(56px, 8vw, 96px) clamp(64px, 8vw, 104px); }
.contact-copy { display: flex; flex-direction: column; gap: 28px; }
.contact-copy h1 { font-size: clamp(38px, 5.4vw, 66px); max-width: 20ch; }
.contact-copy .status-pill { align-self: flex-start; white-space: normal; }
.link-list { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--rule); border: 1px solid var(--rule); }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 18px 24px; background: var(--bg); transition: background-color 160ms ease; }
.link-row:hover { background: var(--surface); color: var(--ink); }
.link-row-text { display: flex; flex-direction: column; gap: 4px; }
.link-row-label { font-family: var(--font-display); font-size: 19px; }
.link-row-note { font-size: 13px; color: var(--muted); }
.link-row-arrow { color: var(--gold); }

/* ------------------------------------------------------------------
   Blog page
   ------------------------------------------------------------------ */
.blog-intro { max-width: 760px; }
.blog-intro h1 { font-size: clamp(36px, 5vw, 62px); line-height: 1.06; margin: 20px 0; }
.post-list { padding-bottom: clamp(64px, 8vw, 104px); }
.post-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 32px; align-items: baseline; padding: 30px 8px; border-top: 1px solid var(--rule); transition: background-color 160ms ease; }
.post-row:hover { background: var(--surface); color: var(--ink); }
.post-row:hover .post-title { color: var(--accent-ink); }
.post-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-main { display: flex; flex-direction: column; gap: 10px; }
.post-title { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.015em; }
.post-excerpt { font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 58ch; }
.post-read { font-size: 12.5px; color: var(--gold); text-align: right; }
.feed-status { margin: 24px 4px 0; padding: 12px 16px; border: 1px dashed var(--rule-3); font-size: 13px; color: var(--muted-2); max-width: 560px; }
.feed-status[hidden] { display: none; }
.feed-status a { border-bottom: 1px solid var(--gold); }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero, .about-teaser, .about-intro, .contact, .work-card { grid-template-columns: minmax(0, 1fr); }
  .work-card.is-flipped .work-media { order: 0; }
  .hero-portrait { max-width: 440px; }
  .about-teaser figure { max-width: 400px; }
  .testimonials { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .site-header.has-menu .menu-btn { display: inline-flex; }
  .site-header.has-menu .site-nav { display: none; }
  .site-header.has-menu.is-open { flex-wrap: wrap; }
  .site-header.has-menu.is-open .site-nav { display: flex; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 4px; font-size: 16px; }
  .site-header.has-menu.is-open .site-nav a { min-height: 48px; border-bottom: 1px solid var(--rule); }
  .site-header.has-menu.is-open .site-nav a[aria-current] { font-weight: 600; }
  .site-header .status-pill { display: none; }
  .site-header:not(.has-menu) { flex-wrap: wrap; }
  .site-header:not(.has-menu) .site-nav { flex-wrap: wrap; flex-basis: 100%; order: 3; }
  .xp { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pillar, .trait { padding: 24px 22px 28px; }
  .post-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 24px 4px; }
  .post-read { text-align: left; }
  .pp-card { width: 260px; }
  .link-row { padding: 16px 18px; }
}
@media (max-width: 480px) {
  .btn-row .btn { flex: 1 1 auto; padding: 0 18px; }
  .work-stats dd { font-size: 21px; }
}

/* Motion: respect the device setting. The marquee stops and becomes a scrollable row. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .marquee.is-running .marquee-track { animation: none; }
}

/* ------------------------------------------------------------------
   Case study components (blumefy / nextrole / forgetask).
   Each page sets --cs-tint on .cs to its own image background.
   ------------------------------------------------------------------ */
.cs { --cs-tint: var(--tint-green); }
.cs-col { max-width: 720px; margin: 0 auto; }
.cs-wide { max-width: 1000px; margin: 0 auto; }

.cs-title { padding: 88px 0 48px; display: flex; flex-direction: column; gap: 26px; }
.cs-eyebrow { font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.cs-title h1 { margin: 0; font-family: Newsreader, serif; font-weight: 400; font-size: clamp(36px, 5vw, 62px); line-height: 1.06; letter-spacing: -0.025em; }
.cs-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13.5px; color: var(--ink); }
.cs-live a { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.cs .cs-lede { margin: 0; font-family: Newsreader, serif; font-size: clamp(19px, 2.1vw, 25px); line-height: 1.5; color: var(--ink-3); }

.cs-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; margin: 0 0 64px; background: var(--rule); border: 1px solid var(--rule); }
.cs-meta-grid > div { background: var(--bg); padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 8px; }
.cs-meta-grid dt { font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.cs-meta-grid dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.cs-meta-grid a { border-bottom: 1px solid var(--gold); }

.cs-section { padding: 0 0 72px; }
.cs-section h2 { margin: 0 0 28px; display: flex; align-items: baseline; gap: 14px; font-family: Newsreader, serif; font-weight: 400; font-size: 30px; line-height: 1.2; }
.cs-num { flex: none; font-family: "Public Sans", sans-serif; font-size: 11.5px; letter-spacing: 0.16em; color: var(--gold); }
.cs p, .cs-list li { font-size: 17.5px; line-height: 1.75; color: var(--ink-3); }
.cs p { margin: 0 0 22px; }
.cs strong { font-weight: 600; color: var(--ink); }
.cs code { font-size: 0.88em; background: var(--surface); padding: 1px 5px; border-radius: 3px; }
.cs-list { margin: 0 0 22px; padding-left: 22px; }
.cs-list li + li { margin-top: 10px; }
.cs .cs-process { font-size: 14px; letter-spacing: 0.02em; color: var(--muted); }

.cs-note { margin: 0 0 28px; padding: 14px 18px; border-left: 2px solid var(--rule-3); background: var(--surface); }
.cs .cs-note p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.cs-pullquote { margin: 8px 0 0; padding-left: 22px; border-left: 2px solid var(--gold); }
.cs .cs-pullquote p { margin: 0; font-family: Newsreader, serif; font-size: 21px; line-height: 1.55; color: var(--ink); }

/* Figures. Screenshots are cropped to the UI itself, so sizing is uniform:
   landscape images fill the frame width, portrait (phone) images share one fixed height. */
.cs-figure { margin: 0 0 32px; display: flex; flex-direction: column; gap: 12px; }
.cs-figure[hidden] { display: none; }
.cs-media { background: var(--cs-tint); padding: 28px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cs-media img { width: 100%; height: auto; }
.cs-figure.is-portrait .cs-media img { width: auto; height: 520px; max-width: 100%; object-fit: contain; }
.cs-figure figcaption, .cs .cs-caption, .cs-tile figcaption { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Tiles: compact fixed-ratio frames, used for the end-of-page gallery and captioned image runs.
   Each opens the full-size screenshot in a new tab. */
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 24px 20px; margin: 0 0 32px; }
.cs-tile { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cs-tile-media { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 14px; background: var(--cs-tint); overflow: hidden; transition: outline-color 160ms ease; outline: 1px solid transparent; outline-offset: -1px; }
.cs-tile-media:hover { outline-color: var(--rule-3); }
.cs-tile-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.cs-more { padding-top: 8px; border-top: 1px solid var(--rule); }
.cs-more h2 { margin-top: 40px; }

/* Persona card */
.cs-persona { border: 1px solid var(--rule); background: var(--bg); }
.cs-persona-head { padding: 24px 26px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.cs .cs-persona-head p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.cs .cs-persona-head .cs-persona-name { margin-bottom: 8px; font-family: Newsreader, serif; font-size: 23px; line-height: 1.3; color: var(--ink); }
.cs-persona-name strong { font-weight: 400; }
.cs-persona dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); }
.cs-persona dl > div { background: var(--bg); padding: 20px 24px 22px; }
.cs-persona dt { margin-bottom: 8px; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.cs-persona dd { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-3); }

/* User stories */
.cs-stories { list-style: none; margin: 0; padding: 0; }
.cs-stories li { position: relative; padding: 18px 0 18px 30px; border-top: 1px solid var(--rule); font-size: 16.5px; line-height: 1.7; color: var(--ink-3); }
.cs-stories li:last-child { border-bottom: 1px solid var(--rule); }
.cs-stories li::before { content: "\201C"; position: absolute; left: 0; top: 10px; font-family: Newsreader, serif; font-size: 34px; line-height: 1; color: var(--gold); }

/* User flow */
.cs-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.cs-flow li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.cs-flow li span { border: 1px solid var(--rule-2); background: var(--bg); padding: 7px 12px; }
.cs-flow li:not(:last-child)::after { content: "\2192"; color: var(--gold); }
.cs .cs-flow-label { margin: 22px 0 12px; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* User journey table */
.cs-journey-scroll { overflow-x: auto; border: 1px solid var(--rule); -webkit-overflow-scrolling: touch; }
.cs-journey { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.cs-journey th, .cs-journey td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cs-journey th:first-child { border-left: 0; }
.cs-journey tr:last-child > * { border-bottom: 0; }
.cs-journey thead th { background: var(--surface); font-family: Newsreader, serif; font-weight: 400; font-size: 17px; color: var(--ink); }
.cs-journey thead th:first-child, .cs-journey tbody th { width: 130px; font-family: "Public Sans", sans-serif; font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.cs-journey td { color: var(--ink-3); }
.cs-journey tbody tr:last-child td { background: var(--cs-tint); color: var(--ink); }

/* Wireframe blocks */
.cs-wireframes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 20px; }
.cs-wireframe { margin: 0; padding: 14px; border: 1px solid var(--rule-3); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.cs-wireframe figcaption { padding-bottom: 6px; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cs-wireframe ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-wireframe li { padding: 9px 10px; border: 1px dashed var(--rule-3); background: var(--surface); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }

/* Decision / challenge / finding cards */
.cs-decision-list { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: cs-step; }
.cs-decision-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 24px 0; border-top: 1px solid var(--rule); }
.cs-decision-card::before { counter-increment: cs-step; content: counter(cs-step, decimal-leading-zero); padding-top: 6px; font-size: 11.5px; letter-spacing: 0.14em; color: var(--gold); }
.cs-decision-list.is-bulleted .cs-decision-card::before { content: "\2014"; }
.cs .cs-decision-card p { margin: 0; font-size: 16.5px; line-height: 1.7; }
.cs-decision-card strong { display: block; margin-bottom: 6px; font-family: Newsreader, serif; font-weight: 400; font-size: 21px; line-height: 1.3; }

/* Feature cards (Blumefy scope of work) */
.cs-feature { padding: 30px 0; border-top: 1px solid var(--rule); }
.cs-feature h3 { margin: 0 0 12px; font-family: Newsreader, serif; font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.cs .cs-feature p { margin: 0; font-size: 16.5px; }
.cs-feature .cs-figure { margin: 20px 0 0; }

/* Final design items */
.cs-final-item h3 { margin: 40px 0 10px; font-family: Newsreader, serif; font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }

/* Learned + stats */
.cs-learned { list-style: none; margin: 0; padding: 0; }
.cs-learned li { padding: 20px 0; border-top: 1px solid var(--rule); font-size: 16.5px; line-height: 1.7; color: var(--ink-3); }
.cs-learned strong { display: block; margin-bottom: 4px; }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1px; margin: 8px 0 32px; background: var(--rule); border: 1px solid var(--rule); }
.cs-stat { background: var(--bg); padding: 24px 20px 28px; display: flex; flex-direction: column; gap: 10px; }
.cs-stat-n { font-family: Newsreader, serif; font-size: 34px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cs-stat-n.is-text { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
.cs-stat-label { font-size: 13.5px; line-height: 1.5; color: var(--muted); }

@media (max-width: 640px) {
  .cs-title { padding: 56px 0 36px; }
  .cs-section { padding-bottom: 56px; }
  .cs p, .cs-list li { font-size: 16.5px; }
  .cs-media { padding: 16px; }
  .cs-figure.is-portrait .cs-media img { height: 420px; }
  .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .cs-tile-media { padding: 8px; }
  .cs-persona dl { grid-template-columns: minmax(0, 1fr); }
  .cs-decision-card { grid-template-columns: minmax(0, 1fr); }
}

/* Contents list at the top of each case study */
.cs-toc { margin: 0 0 64px; padding: 22px 0 0; border-top: 1px solid var(--rule); }
.cs-toc h2 { margin-bottom: 14px; }
.cs-toc ol { columns: 2; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.cs-toc li { break-inside: avoid; }
.cs-toc a { display: flex; gap: 12px; padding: 7px 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
.cs-toc a:hover { color: var(--accent-ink); }
.cs-toc-num { flex: none; width: 22px; font-size: 11.5px; letter-spacing: 0.12em; color: var(--gold); padding-top: 2px; }
.cs-section { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Key design decisions (label, title, tension, decision) */
.cs-decision { padding: 32px 0 8px; border-top: 1px solid var(--rule); }
.cs-decision-label { margin: 0 0 10px !important; font-size: 11px !important; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold) !important; }
.cs-decision h3 { margin: 0 0 18px; font-family: var(--font-display); font-weight: 400; font-size: clamp(23px, 2.6vw, 30px); line-height: 1.2; letter-spacing: -0.015em; }
.cs .cs-decision p { font-size: 16.5px; }
.cs .cs-decision .cs-decision-outcome { padding: 20px 22px; background: var(--surface); color: var(--ink); }
.cs-subhead { margin: 8px 0 14px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 640px) {
  .cs-toc ol { columns: 1; }
  .cs-toc { margin-bottom: 48px; }
}

/* Touch targets: at least 44px tall for small inline controls (WCAG 2.5.8 needs 24px; 44px is comfortable). */
theme-toggle button { min-height: 44px !important; } /* theme.js sets "all: unset" inline, so this needs !important */
.site-footer nav a, .cs-live a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 640px) {
  .cs-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta-grid > div { padding: 14px 14px 16px; }
}
