/* ==========================================================================
   putik.ai — design system
   Concept: "Settled." Payments-native, editorial, quiet. Cobalt palette.
   Sections: 1 Tokens · 2 Fonts · 3 Base · 4 Layout · 5 Header/nav · 6 Buttons
             7 Home · 8 Case studies · 9 Experience · 10 Writing · 11 Footer
             12 Placeholders · 13 Motion · 14 Print
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --paper: #f1f3f6;          /* cool paper background */
  --surface: #ffffff;        /* raised panels */
  --sunk: #e6e9ef;           /* recessed wells */
  --ink: #141922;            /* primary text */
  --ink-2: #4a5262;          /* secondary text (AA) */
  --ink-3: #5c6576;          /* tertiary / captions (AA) */
  --line: #d5dae3;           /* hairlines */
  --line-strong: #b4bcc9;
  --accent: #2a4ba0;         /* cobalt */
  --accent-ink: #ffffff;
  --accent-soft: #dfe6f6;
  --pending: #a86a12;        /* secondary signal colour, used sparingly in diagrams */
  --focus: #2a4ba0;

  --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-prose: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;

  /* Type scale (major third, clamped) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  --t-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --t-hero: clamp(2.5rem, 1.3rem + 4.6vw, 5.125rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --max: 76rem;
  --measure: 38rem;
  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --radius-s: 6px;
  --radius-m: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10141c; --surface: #171c26; --sunk: #0b0e14;
    --ink: #e8ebf1; --ink-2: #b0b8c6; --ink-3: #8c95a5;
    --line: #262d3a; --line-strong: #39424f;
    --accent: #93acf2; --accent-ink: #0b0e14; --accent-soft: #1e2a45;
    --pending: #e0aa52; --focus: #93acf2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10141c; --surface: #171c26; --sunk: #0b0e14;
  --ink: #e8ebf1; --ink-2: #b0b8c6; --ink-3: #8c95a5;
  --line: #262d3a; --line-strong: #39424f;
  --accent: #93acf2; --accent-ink: #0b0e14; --accent-soft: #1e2a45;
  --pending: #e0aa52; --focus: #93acf2;
  color-scheme: dark;
}

/* 2. Fonts (self-hosted, Latin subset, SIL OFL) ------------------------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

/* 3. Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-md);
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.022em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); letter-spacing: -0.018em; }
h3 { font-size: var(--t-lg); letter-spacing: -0.012em; line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-color .15s, color .15s; }
a:hover { text-decoration-color: var(--accent); color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11"; }
.prose { font-family: var(--font-prose); font-size: 1.125rem; line-height: 1.68; max-width: var(--measure); }
.prose p + p { margin-top: 0; }
.prose h2 { font-size: var(--t-xl); margin: 2.2em 0 .6em; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: .45em; }
.lede { font-family: var(--font-prose); font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); max-width: 36rem; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.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: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius-s); text-decoration: none; }
.skip-link:focus { top: 1rem; color: var(--paper); }

/* 4. Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-section); }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem); }
.section--rule { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: .75rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); max-width: 44rem; }
.section-head p { color: var(--ink-2); margin: 0; font-size: var(--t-md); }
.split { display: grid; gap: clamp(2rem, 1rem + 4vw, 5rem); }
@media (min-width: 60rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .sticky-col { position: sticky; top: 6rem; }
}

/* 5. Header / nav ------------------------------------------------------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { display: block; padding: .5rem .75rem; border-radius: var(--radius-s); text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); }
.nav-list a:hover { color: var(--ink); background: var(--sunk); }
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"]::after { content: ""; display: block; height: 2px; margin-top: 2px; border-radius: 2px; background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--radius-s); background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }
.menu-toggle[aria-expanded="true"] .i-menu { display: none; }
@media (max-width: 51.99rem) {
  .menu-toggle { display: inline-grid; }
  .site-nav { position: fixed; inset: 4rem 0 auto 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1.25rem; display: none; max-height: calc(100dvh - 4rem); overflow-y: auto; }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a { font-size: 1.125rem; padding: .85rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
  .nav-list a:hover { background: transparent; }
  .nav-list a[aria-current="page"]::after { display: none; }
  .nav-list a[aria-current="page"] { color: var(--accent); }
  .no-js .site-nav { position: static; display: block; border: 0; }
}

/* 6. Buttons ------------------------------------------------------------ */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.875rem; padding: .7rem 1.2rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 500 var(--t-sm)/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn svg { width: 16px; height: 16px; }
.text-link { font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .25em; }
.text-link:hover { color: var(--accent); }

/* 7. Home --------------------------------------------------------------- */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) clamp(3rem, 2rem + 5vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 64rem) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.hero-name { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); margin: 0 0 1.25rem; display: flex; align-items: center; gap: .65rem; }
.hero-name .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: var(--t-hero); line-height: 0.98; letter-spacing: -0.035em; font-weight: 600; max-width: 12ch; }
.hero .lede { margin: 1.75rem 0 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.5rem; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--ink-2); }
.hero-meta li { display: flex; gap: .4rem; align-items: baseline; }
.hero-meta strong { color: var(--ink); font-weight: 600; }

/* Payment route — the hero's single orchestrated moment */
.route-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(1rem, .5rem + 2vw, 1.75rem); }
.route-card figcaption { font-size: var(--t-xs); color: var(--ink-3); margin-top: .85rem; line-height: 1.45; }
.route svg { width: 100%; }
.route .r-line { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.route .r-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; }
.route .r-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.route .r-node--on { stroke: var(--accent); }
.route .r-label { font: 500 12px var(--font-ui); fill: var(--ink); }
.route .r-sub { font: 400 10.5px var(--font-ui); fill: var(--ink-3); }
.route .r-pill { fill: var(--sunk); }
.route .r-pill-text { font: 500 10.5px var(--font-ui); fill: var(--ink-2); }
.route .r-ok { fill: var(--accent); }
.route .r-ok-text { font: 600 11px var(--font-ui); fill: var(--accent-ink); }
.route .r-pending { fill: var(--pending); }
.route .r-step { opacity: 0; }
.route.is-live .r-path { animation: draw 2.4s cubic-bezier(.6,.1,.2,1) .3s forwards; }
.route.is-live .r-step { animation: appear .45s ease-out forwards; }
.route.is-live .r-s1 { animation-delay: .35s; }
.route.is-live .r-s2 { animation-delay: .9s; }
.route.is-live .r-s3 { animation-delay: 1.45s; }
.route.is-live .r-s4 { animation-delay: 2.0s; }
.route.is-live .r-s5 { animation-delay: 2.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.route .r-step { transform-box: fill-box; }

/* Expertise as a layered stack */
.stack { border-top: 1px solid var(--line); }
.stack-row { display: grid; gap: .75rem 2rem; padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .stack-row { grid-template-columns: 14rem minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.stack-layer { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: .5rem; }
.stack-layer svg { width: 44px; height: 28px; flex: none; }
.stack-row h3 { font-size: var(--t-lg); }
.stack-row p { margin: .4rem 0 0; color: var(--ink-2); font-size: var(--t-sm); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: var(--t-xs); padding: .35rem .65rem; border-radius: 999px; background: var(--sunk); color: var(--ink-2); line-height: 1.2; }

/* Impact statement (ledger) */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.ledger-head, .ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.5rem; padding: 1rem clamp(1rem, .5rem + 2vw, 1.75rem); align-items: baseline; }
@media (min-width: 46rem) { .ledger-head, .ledger-row { grid-template-columns: 7rem minmax(0, 1fr) auto; } }
.ledger-head { font-size: var(--t-xs); color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--sunk); }
.ledger-head span:last-child { text-align: right; }
.ledger-row + .ledger-row { border-top: 1px dashed var(--line); }
.ledger-org { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }
@media (max-width: 45.99rem) { .ledger-org { grid-column: 1 / -1; margin-bottom: -.75rem; } .ledger-head span:first-child { display: none; } }
.ledger-desc { font-size: var(--t-sm); }
.ledger-desc strong { font-weight: 600; display: block; font-size: var(--t-md); margin-bottom: .1rem; }
.ledger-desc span { color: var(--ink-2); }
.ledger-fig { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.02em; text-align: right; white-space: nowrap; font-feature-settings: "tnum"; }
.ledger-fig small { font: 500 var(--t-xs) var(--font-ui); color: var(--ink-3); letter-spacing: 0; margin-left: .15rem; }
.ledger-foot { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, .5rem + 2vw, 1.75rem); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-3); flex-wrap: wrap; }

/* Selected work */
.work-feature { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; transition: border-color .2s; }
.work-feature:hover { border-color: var(--ink); color: inherit; }
@media (min-width: 56rem) { .work-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; } }
.work-feature h2, .work-feature h3 { font-size: var(--t-2xl); line-height: 1.02; margin: .4rem 0 1rem; }
.work-feature .chips { margin-top: 1.25rem; }
.work-meta { font-size: var(--t-sm); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.work-meta b { color: var(--ink); font-weight: 600; }
.work-feature p { color: var(--ink-2); }
.work-feature .art { background: var(--sunk); border-radius: var(--radius-s); padding: clamp(1rem, .5rem + 2vw, 2rem); }
.work-list { display: grid; gap: 0; margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-top: 1px solid var(--line); }
@media (min-width: 52rem) { .work-list { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; gap: clamp(1rem, .5rem + 2vw, 2rem); } }
.work-item { display: grid; align-content: start; gap: .6rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
@media (min-width: 52rem) { .work-item { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 1.25rem; } }
.work-item:hover { color: inherit; }
.work-item:hover h2, .work-item:hover h3 { color: var(--accent); }
.work-item h2, .work-item h3 { font-size: var(--t-xl); transition: color .15s; }
.work-item p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.work-item .go { font-size: var(--t-sm); font-weight: 500; color: var(--ink); margin-top: .35rem; }

/* Career step chart */
.journey { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(1rem, .5rem + 2vw, 2rem); overflow-x: auto; }
.journey svg { min-width: 640px; }
.journey .j-grid { stroke: var(--line); stroke-width: 1; }
.journey .j-axis { font: 500 11px var(--font-ui); fill: var(--ink-3); }
.journey .j-band { font: 500 11px var(--font-ui); fill: var(--ink-2); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.journey .j-step { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.journey .j-area { fill: var(--accent-soft); opacity: .7; }
.journey .j-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.journey .j-org { font: 600 12.5px var(--font-ui); fill: var(--ink); }
.journey .j-role { font: 400 11px var(--font-ui); fill: var(--ink-2); }
.journey-note { font-size: var(--t-xs); color: var(--ink-3); margin-top: .75rem; }

/* Closing CTA band */
.closing { background: var(--ink); color: var(--paper); border-radius: var(--radius-m); padding: clamp(2rem, 1rem + 5vw, 5rem); display: grid; gap: 2rem; }
@media (min-width: 56rem) { .closing { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; } }
.closing h2 { font-size: var(--t-2xl); line-height: 1.02; }
.closing p { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); margin: 1rem 0 0; max-width: 32rem; }
.closing .btn { border-color: color-mix(in srgb, var(--paper) 35%, var(--ink)); color: var(--paper); }
.closing .btn:hover { border-color: var(--paper); }
.closing .btn--primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.closing .btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.closing .ph { color: var(--ink); }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem) clamp(2rem, 1rem + 3vw, 4rem); }
.page-hero h1 { font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4.5rem); line-height: 1; letter-spacing: -0.032em; max-width: 18ch; }
.page-hero .lede { margin-top: 1.5rem; }
.crumbs { font-size: var(--t-sm); color: var(--ink-3); margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-2); }

/* 8. Case studies -------------------------------------------------------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0; border-block: 1px solid var(--line); margin: 0; }
.facts div { padding: 1.1rem 1.25rem 1.1rem 0; }
.facts div + div { border-left: 1px solid var(--line); padding-left: 1.25rem; }
@media (max-width: 40rem) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(odd) { border-left: 0; padding-left: 0; } .facts div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.facts dt { font-size: var(--t-xs); color: var(--ink-3); margin-bottom: .25rem; }
.facts dd { margin: 0; font-weight: 500; font-size: var(--t-sm); }
.cs-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .75rem; margin: 2rem 0 0; }
.cs-figure { padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.cs-figure b { display: block; font: 600 clamp(1.75rem, 1.4rem + 1vw, 2.25rem)/1 var(--font-display); letter-spacing: -0.02em; font-feature-settings: "tnum"; margin-bottom: .45rem; }
.cs-figure span { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.4; display: block; }
.cs-figure em { font-style: normal; font-size: var(--t-xs); color: var(--ink-3); display: block; margin-top: .5rem; }
.chapters { counter-reset: ch; }
.chapter { display: grid; gap: 1rem 3rem; padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-top: 1px solid var(--line); }
@media (min-width: 60rem) { .chapter { grid-template-columns: 15rem minmax(0, 1fr); } }
.chapter-label { counter-increment: ch; font-family: var(--font-display); font-weight: 600; font-size: var(--t-lg); letter-spacing: -0.01em; display: flex; gap: .75rem; align-items: baseline; }
.chapter-label::before { content: counter(ch); font: 500 var(--t-xs)/1 var(--font-ui); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; min-width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; flex: none; transform: translateY(-.15em); }
.chapter-body > :last-child { margin-bottom: 0; }
.chapter-body .prose { max-width: 40rem; }
.diagram { margin: 1.5rem 0 0; padding: clamp(1rem, .5rem + 2vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.diagram figcaption { font-size: var(--t-xs); color: var(--ink-3); margin-top: .85rem; }
.diagram svg { width: 100%; }
.dg-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.25; }
.dg-box--accent { fill: var(--accent-soft); stroke: var(--accent); }
.dg-box--sunk { fill: var(--sunk); stroke: var(--line); }
.dg-line { stroke: var(--line-strong); stroke-width: 1.25; fill: none; }
.dg-line--accent { stroke: var(--accent); stroke-width: 1.75; }
.dg-arrow { fill: var(--line-strong); }
.dg-arrow--accent { fill: var(--accent); }
.dg-t { font: 500 12.5px var(--font-ui); fill: var(--ink); }
.dg-t-strong { font: 600 13.5px var(--font-ui); fill: var(--ink); }
.dg-s { font: 400 11px var(--font-ui); fill: var(--ink-2); }
.dg-xs { font: 400 10px var(--font-ui); fill: var(--ink-3); }
.dg-accent-t { fill: var(--accent); }
.tension { display: grid; gap: 1rem; margin: 1.25rem 0 0; }
@media (min-width: 44rem) { .tension { grid-template-columns: 1fr 1fr; } }
.tension div { padding: 1.1rem 1.25rem; border-radius: var(--radius-s); background: var(--sunk); }
.tension b { display: block; font-size: var(--t-sm); margin-bottom: .3rem; }
.tension p { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.owned { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
@media (min-width: 44rem) { .owned { grid-template-columns: 1fr 1fr; } }
.owned li { padding: .85rem 1rem; border-left: 2px solid var(--accent); background: var(--surface); font-size: var(--t-sm); }
.owned b { display: block; font-weight: 600; }
.owned span { color: var(--ink-2); }
.next-case { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 2rem; border-top: 1px solid var(--line); }
.next-case a { text-decoration: none; display: grid; gap: .2rem; }
.next-case small { color: var(--ink-3); font-size: var(--t-xs); }
.next-case strong { font-family: var(--font-display); font-size: var(--t-lg); }
.next-case a:last-child { text-align: right; margin-left: auto; }
.source-note { font-size: var(--t-xs); color: var(--ink-3); margin-top: 1rem; }

/* 9. Experience page ---------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: .4rem; top: .6rem; bottom: .6rem; width: 1px; background: var(--line-strong); }
@media (min-width: 52rem) { .timeline::before { left: 10.4rem; } }
.tl-item { position: relative; display: grid; gap: .25rem 2.5rem; padding: 0 0 2.75rem 2rem; }
@media (min-width: 52rem) { .tl-item { grid-template-columns: 9rem minmax(0, 1fr); padding-left: 0; } }
.tl-item::before { content: ""; position: absolute; left: 0; top: .45rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-strong); }
@media (min-width: 52rem) { .tl-item::before { left: 10rem; } }
.tl-item.is-current::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-when { font-size: var(--t-sm); color: var(--ink-3); font-feature-settings: "tnum"; padding-top: .2rem; }
.tl-body { max-width: 44rem; }
@media (min-width: 52rem) { .tl-body { padding-left: 1.5rem; } }
.tl-body h3 { font-size: var(--t-xl); }
.tl-role { font-weight: 500; color: var(--ink-2); margin: .3rem 0 .9rem; }
.tl-body > p { color: var(--ink-2); }
.edu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.edu-list h3 { font-size: var(--t-xl); }
.edu-list .tl-role { margin-bottom: 0; }
.tl-more { margin-top: .5rem; }
.tl-more > button { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem 0; border: 0; background: none; color: var(--ink); font: 500 var(--t-sm) var(--font-ui); cursor: pointer; }
.tl-more > button:hover { color: var(--accent); }
.tl-more > button svg { width: 14px; height: 14px; transition: transform .2s; }
.tl-more > button[aria-expanded="true"] svg { transform: rotate(45deg); }
.tl-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.tl-panel > div { overflow: hidden; }
.tl-panel.is-open { grid-template-rows: 1fr; }
.no-js .tl-panel { grid-template-rows: 1fr; }
.tl-panel h4 { font-size: var(--t-sm); margin: 1rem 0 .5rem; font-weight: 600; letter-spacing: 0; }
.tl-panel ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); font-size: var(--t-sm); }
.tl-panel li { margin-bottom: .35rem; }
.caps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.cap { display: grid; gap: .75rem 2.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .cap { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); } }
.cap h3 { font-size: var(--t-lg); }
.cap-items { display: grid; gap: .9rem 2rem; margin: 0; }
@media (min-width: 40rem) { .cap-items { grid-template-columns: 1fr 1fr; } }
.cap-items dt { font-weight: 600; font-size: var(--t-sm); }
.cap-items dd { margin: .15rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.tools { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tools li { font-size: var(--t-xs); padding: .3rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink-2); }

/* 10. Writing ----------------------------------------------------------- */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post { border-bottom: 1px solid var(--line); }
.post a { display: grid; gap: .3rem 2rem; padding: 1.25rem 0; text-decoration: none; }
@media (min-width: 46rem) { .post a { grid-template-columns: 8rem minmax(0, 1fr) auto; align-items: baseline; } }
.post a:hover { color: inherit; }
.post a:hover .post-title { color: var(--accent); }
.post time, .post .post-src { font-size: var(--t-sm); color: var(--ink-3); font-feature-settings: "tnum"; }
.post-title { font-family: var(--font-display); font-weight: 600; font-size: var(--t-lg); letter-spacing: -0.01em; transition: color .15s; }
.post-topic { display: block; font-size: var(--t-xs); color: var(--ink-3); margin-top: .2rem; font-family: var(--font-ui); font-weight: 400; letter-spacing: 0; }
.empty-state { display: grid; gap: 1rem; padding: clamp(1.5rem, 1rem + 3vw, 3rem); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.empty-state h3 { font-size: var(--t-xl); }
.empty-state p { margin: 0; color: var(--ink-2); max-width: 40rem; }
.topics { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .5rem 0 0; }
.topics li { font-size: var(--t-sm); padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.article { padding-bottom: var(--space-section); }
.article-meta { font-size: var(--t-sm); color: var(--ink-3); margin-top: 1rem; }

/* BI samples */
.bi-case { display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem); padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); border-top: 1px solid var(--line); }
@media (min-width: 60rem) { .bi-case { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.bi-case dl { display: grid; gap: 1rem; margin: 1.5rem 0 0; }
.bi-case dt { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }
.bi-case dd { margin: .2rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.pipeline { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: var(--t-xs); }
.pipeline li { padding: .4rem .7rem; border-radius: var(--radius-s); background: var(--sunk); color: var(--ink-2); }
.pipeline li[aria-hidden] { background: none; padding: 0; color: var(--ink-3); }

/* Contact page */
.contact-grid { display: grid; gap: 1rem; }
@media (min-width: 46rem) { .contact-grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 52rem; } }
.contact-card { display: grid; gap: .5rem; align-content: start; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); text-decoration: none; transition: border-color .2s; }
a.contact-card:hover { border-color: var(--ink); color: inherit; }
.contact-card b { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; }
.contact-card span { font-size: var(--t-sm); color: var(--ink-2); }

/* 11. Footer ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; margin-top: var(--space-section); font-size: var(--t-sm); color: var(--ink-2); }
main:has(> .closing-wrap:last-child) + .site-footer { margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); } }
.footer-grid h2 { font-size: var(--t-sm); font-family: var(--font-ui); font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: .75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-grid a { text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--ink-3); }

/* 12. Placeholders — content awaiting the owner's confirmation ---------- */
/* Every placeholder uses class "ph" and a data-todo note. Search the code for
   class="ph" before launch. All must be resolved or removed. */
.ph { display: inline; background: repeating-linear-gradient(-45deg, #fff4d6, #fff4d6 6px, #ffeebf 6px, #ffeebf 12px); color: #5a4300; outline: 1px dashed #b38600; outline-offset: 1px; border-radius: 3px; padding: 0 .3em; font-family: var(--font-ui); font-size: .92em; font-style: normal; }
.ph::before { content: "To confirm: "; font-weight: 600; }
div.ph, p.ph, li.ph { display: block; padding: .8rem 1rem; margin: .5rem 0; line-height: 1.5; }
.ph--draft::before { content: "Draft for your review: "; }

/* Back to top (inner pages) */
.not-found { min-height: 60vh; display: grid; align-content: center; gap: 1.25rem; }
.not-found h1 { font-size: var(--t-hero); }

/* 13. Motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .route .r-path { stroke-dashoffset: 0; }
  .route .r-step { opacity: 1; }
}
.no-js .route .r-path { stroke-dashoffset: 0; }
.no-js .route .r-step { opacity: 1; }

/* 14. Print ------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .closing-wrap, .theme-toggle, .menu-toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .route .r-path { stroke-dashoffset: 0; } .route .r-step { opacity: 1; }
  .tl-panel { grid-template-rows: 1fr !important; }
  a { text-decoration: underline; }
}
