/* anisahmedzaid.com · portfolio
   System type, one accent, surfaces that read as layers. Spacing on a 4px grid,
   tracking that tightens as type grows, motion that never blocks input. */

:root {
  --paper: #e7e6e1;
  --card: #fdfdfb;
  --inset: #f2f1ed;
  --raised: #fdfdfb;
  --sunk: #dddbd5;
  --ink: #111113;
  --ink-2: #36363a;
  --ink-3: #47474c;
  --ink-display: #636368;
  --rule: #d2d0c9;
  --accent: #00428f;
  --accent-ink: #003c80;
  --accent-soft: #dce7f5;
  --live: #136b37;
  --live-ink: #0f5a2e;
  --live-soft: #e3f3e8;
  --mark: #fbe9a6;
  --glass: rgba(231, 230, 225, 0.74);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.07);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --wide: 1080px;
  --text: 42rem;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

[data-theme="dark"] {
  --paper: #0e0e10;
  --card: #1e1e21;
  --inset: #26262a;
  --raised: #303035;
  --sunk: #2c2c31;
  --ink: #f2f2f4;
  --ink-2: #d4d4da;
  --ink-3: #b6b6be;
  --ink-display: #9a9aa1;
  --rule: #34343a;
  --accent: #b2d7ff;
  --accent-ink: #cce4ff;
  --accent-soft: #0f2a47;
  --live: #6fdc95;
  --live-ink: #a8efc0;
  --live-soft: #10301c;
  --mark: #5a4718;
  --glass: rgba(14, 14, 16, 0.7);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4 { text-wrap: balance; }
.nowrap { white-space: nowrap; }

/* Theme switch: soft crossfade, no abrupt brightness jump */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
html.theme-fade, html.theme-fade * { transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease !important; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  letter-spacing: -0.003em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 600; color: var(--ink); }
p { margin: 0; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

/* Navigation: a translucent layer, content scrolls underneath */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
/* Scroll edge: a soft fade where content meets the bar, only once content is under it */
.top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(var(--glass), transparent); opacity: 0; transition: opacity .25s var(--ease);
}
.top.scrolled::after { opacity: 1; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.top .name { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.015em; color: var(--ink); white-space: nowrap; }
.top .name:hover { text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a:not(.cv) { color: var(--ink-2); font-size: 0.9375rem; padding: 6px 12px; border-radius: 999px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.top nav a:not(.cv):hover { text-decoration: none; color: var(--ink); background: var(--sunk); }
.top nav a[aria-current="true"] { color: var(--ink); background: var(--sunk); }
.top .cv {
  margin-left: 8px; padding: 6px 14px; border-radius: 999px; font-size: 0.9375rem; font-weight: 600;
  background: var(--ink); color: var(--paper);
}
.top .cv:hover { text-decoration: none; opacity: .86; }
.theme-btn {
  margin-left: 4px; width: 36px; height: 36px; display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color .2s var(--ease);
}
.theme-btn:hover { background: var(--sunk); color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .moon, [data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* Press feedback lives on pointer-down, and it is instant */
.btn, .top .cv, .theme-btn, .inbox button, .rag-questions button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn:active, .top .cv:active, .theme-btn:active, .inbox button:active, .rag-questions button:active {
  transform: scale(0.97); transition: transform 100ms ease-out;
}

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px 64px; align-items: center;
  padding-top: 88px; padding-bottom: 96px;
}
.hero h1 {
  font-size: clamp(2.75rem, 6.6vw, 5rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
  margin-bottom: 28px; text-wrap: balance;
}
.h1-name { display: block; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.h1-soft { display: block; color: var(--ink-display); font-weight: 600; font-size: 0.6em; line-height: 1.12; letter-spacing: -0.026em; margin-top: 12px; }
.intro { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--ink-2); max-width: 38rem; letter-spacing: -0.008em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font: 600 1rem/1 var(--sans); letter-spacing: -0.005em;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
[data-theme="dark"] .btn { color: #00152b; }
.btn:hover { text-decoration: none; background: var(--accent-ink); }
.btn-quiet, [data-theme="dark"] .btn-quiet { background: var(--sunk); color: var(--ink); }
.btn-quiet:hover, [data-theme="dark"] .btn-quiet:hover { background: var(--rule); }
.text-link { font-weight: 500; }
.text-link::after { content: "\00a0›"; }

.portrait { align-self: start; }
.portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 36px; background: var(--sunk);
}

.stats {
  grid-column: 1 / -1; list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.stats li { background: var(--card); border-radius: var(--r-md); padding: 22px 22px 20px; box-shadow: var(--shadow); }
.stats b { display: block; font-family: var(--display); font-size: clamp(2rem, 3.4vw, 2.5rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stats span { display: block; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }

/* Sections */
section { padding: 112px 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { max-width: 46rem; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.07; letter-spacing: -0.032em; font-weight: 700; text-wrap: balance; }
.section-head p { margin-top: 16px; font-size: 1.1875rem; color: var(--ink-2); line-height: 1.5; }

/* Case studies: each a card, the strongest proof first */
.case {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 48px; margin-bottom: 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
}
.case-head { max-width: 48rem; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.9375rem; color: var(--ink-3); margin-bottom: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0; line-height: 1.4;
  background: var(--sunk); color: var(--ink-2);
}
.pill-live { background: var(--live-soft); color: var(--live-ink); }
.case h3 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.028em; font-weight: 700; margin-bottom: 18px; text-wrap: balance; }
.case-head > .lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.45; color: var(--ink); letter-spacing: -0.01em; }
.case .body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: start; }
.case .body > p { grid-column: 1; color: var(--ink-2); }
.case .body > .steps { grid-column: 1; }
.case .body > .facts { grid-column: 2; grid-row: 1 / span 2; }
.case .body > .tools { grid-column: 1 / -1; }

.facts { margin: 0; display: grid; gap: 18px; }
.facts > div { padding-top: 14px; border-top: 1px solid var(--rule); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 0.9375rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }

.tools { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { font-size: 0.875rem; line-height: 1.4; padding: 5px 12px; border-radius: 999px; background: var(--inset); color: var(--ink-2); border: 1px solid var(--rule); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--inset); }
.steps li::before { content: counter(s); grid-row: 1 / span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 0.875rem; align-self: center; }
.steps b { font-weight: 600; }
.steps span { font-size: 0.9375rem; color: var(--ink-2); }

/* Demos: a sunken surface inside the card */
.demo { margin: 0; background: var(--inset); border-radius: var(--r-md); padding: 28px; }
.demo-head { font-size: 1.0625rem; font-weight: 600; color: var(--ink); margin-bottom: 18px; letter-spacing: -0.01em; }
.demo-note { font-size: 0.875rem; color: var(--ink-3); margin-top: 18px; line-height: 1.5; max-width: 48rem; }

/* Demo · email triage */
.mail-demo { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
.inbox { display: flex; flex-direction: column; gap: 8px; }
.inbox button {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit;
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); background: var(--raised);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.inbox button strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.inbox button:hover { border-color: var(--rule); }
.inbox button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mail-out { background: var(--raised); border-radius: var(--r-sm); padding: 6px 20px 18px; font-size: 0.9375rem; min-height: 300px; }
.mail-out .row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mail-out .row > span:first-child { color: var(--ink-3); font-size: 0.875rem; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.875rem; font-weight: 600; }
.draft { margin-top: 16px; padding: 16px 18px; background: var(--inset); border-radius: var(--r-sm); white-space: pre-line; color: var(--ink); line-height: 1.6; }
.draft mark { background: var(--mark); color: var(--ink); padding: 0 3px; border-radius: 4px; }
.draft-state { margin-top: 12px; font-size: 0.875rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.draft-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.swap { animation: swap .32s var(--ease-out) both; }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Demo · RAG tool choice */
.rag { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
.rag-questions { display: flex; flex-direction: column; gap: 8px; }
.rag-questions button {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 0.9375rem; line-height: 1.4;
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--raised); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.rag-questions button:hover { border-color: var(--rule); }
.rag-questions button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rag-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rag-step { padding: 12px 16px; border-radius: var(--r-sm); background: var(--raised); font-size: 0.9375rem; color: var(--ink-2); }
.rag-step b { color: var(--ink); font-weight: 600; }
.rag-tools ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rag-tools li {
  padding: 12px 14px; border-radius: var(--r-sm); background: var(--raised); border: 1px solid var(--rule);
  font-size: 0.875rem; line-height: 1.4; color: var(--ink-3);
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.rag-tools b { display: block; font-size: 0.9375rem; color: var(--ink-2); font-weight: 600; margin-bottom: 2px; }
.rag-tools li.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.rag-tools li.on b { color: var(--accent-ink); }
.rag-tools li.on b::after { content: "\00a0✓"; }

/* Other projects */
.more { margin-top: 56px; }
.more-title { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 20px; }
.more-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.more-grid li { background: var(--card); border-radius: var(--r-md); padding: 26px 28px; box-shadow: var(--shadow); }
.more-grid h4 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.018em; margin: 14px 0 8px; }
.more-grid p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }

/* Method */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.principles h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 10px; }
.principles p { color: var(--ink-2); max-width: 32rem; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 32px; padding: 28px 0; border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { color: var(--ink-3); font-size: 0.9375rem; font-variant-numeric: tabular-nums; padding-top: 4px; }
.timeline h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; }
.timeline .where { color: var(--ink-3); font-size: 0.9375rem; margin: 2px 0 10px; }
.timeline p:not(.when):not(.where) { color: var(--ink-2); max-width: var(--text); }

/* Skills */
.skills { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.skills > div { background: var(--card); border-radius: var(--r-md); padding: 24px 26px; box-shadow: var(--shadow); }
.skills dt { font-family: var(--display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 14px; }
.skills dd { margin: 0; }
.skills dd p { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-3); }
.skills dd p .where-label { font-weight: 600; color: var(--ink-2); }
.langs { margin: 24px 0 0; text-align: center; color: var(--ink-2); }
.langs b { font-weight: 600; color: var(--ink); margin-right: 12px; }

/* Contact */
.contact { padding-bottom: 96px; }
.contact-main { text-align: center; max-width: 46rem; margin: 0 auto; }
.contact h2 { font-size: clamp(2.25rem, 5.4vw, 3.75rem); line-height: 1.06; letter-spacing: -0.034em; font-weight: 700; text-wrap: balance; }
.contact .open { color: var(--ink-2); font-size: 1.1875rem; margin: 20px auto 28px; max-width: 36rem; }
.contact .mail { font-family: var(--display); font-size: clamp(1.375rem, 3.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.contact .actions { justify-content: center; margin-top: 28px; }

.ai-copy { margin: 72px auto 0; max-width: 46rem; background: var(--card); border-radius: var(--r-lg); padding: 32px 36px; box-shadow: var(--shadow); }
.ai-copy h3 { font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.ai-copy > p:not(.ai-status) { color: var(--ink-2); }
.ai-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.ai-actions a { font-weight: 500; }
.ai-status { color: var(--ink-3); font-size: 0.9375rem; margin-top: 12px; }
.ai-status:empty { display: none; }

footer { padding: 32px 0 48px; font-size: 0.875rem; color: var(--ink-3); border-top: 1px solid var(--rule); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; text-align: center; }
footer a { color: var(--ink-3); }
footer a:hover { color: var(--ink); }


/* 404 page (same sheet) */
.hero.solo { display: block; }
.hero.solo h1 em { display: block; font-style: normal; color: var(--ink-display); }
.hero.solo .links { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 32px; }

/* Legal pages (same sheet) */
.legal { max-width: calc(var(--text) + 64px); padding-top: 72px; padding-bottom: 96px; }
.legal-head { margin-bottom: 48px; }
.legal-head .back { display: inline-block; margin-bottom: 28px; font-size: 0.9375rem; }
.legal-head .back::after { content: none; }
.legal-head .back::before { content: "‹\00a0"; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; }
.legal .updated { margin-top: 12px; color: var(--ink-3); font-size: 0.9375rem; }
.legal section { padding: 28px 0; border-top: 1px solid var(--rule); }
.legal h2 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 600; margin-bottom: 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p, .legal p + ul { margin-top: 10px; }
.legal ul { padding-left: 1.25em; }
.legal li + li { margin-top: 4px; }
.legal-card { margin: 0; background: var(--card); border-radius: var(--r-md); padding: 8px 24px; box-shadow: var(--shadow); }
.legal-card div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px; padding: 12px 0; }
.legal-card div + div { border-top: 1px solid var(--rule); }
.legal-card dt { color: var(--ink-3); }
.legal-card dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* Footer "Prompt du site": the prompt, skill and model behind this site */
.making-btn { font: inherit; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; }
.making-btn:hover { color: var(--ink); }
.making {
  width: min(680px, calc(100vw - 32px)); max-height: min(82vh, 760px); padding: 0; border: 0; border-radius: var(--r-lg);
  background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  margin: auto 16px 16px auto; transform-origin: bottom right;
}
.making[open] { display: flex; flex-direction: column; animation: making-in .42s var(--ease-out) both; }
.making::backdrop { background: rgba(0, 0, 0, 0.32); animation: fadeonly .3s linear both; }
.making-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 28px 28px 0; }
.making-head h2 { font-size: 1.5rem; letter-spacing: -0.02em; font-weight: 700; }
.making-close { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--ink); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.making-close:active { transform: scale(0.92); }
.making-body { overflow-y: auto; padding: 16px 28px 28px; }
.making-body > p { color: var(--ink-2); }
.making-meta { margin: 20px 0; display: grid; gap: 8px; }
.making-meta div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 12px; }
.making-meta dt { color: var(--ink-3); }
.making-meta dd { margin: 0; }
.making pre {
  margin: 0; padding: 18px 20px; border-radius: var(--r-sm); background: var(--sunk); color: var(--ink);
  font: 0.875rem/1.55 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}
.making-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.making-actions span { color: var(--ink-3); font-size: 0.9375rem; }
@keyframes making-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 960px) {
  .top nav .hide-md { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .case { padding: 36px; }
  .case .body { grid-template-columns: minmax(0, 1fr); }
  .case .body > .facts { grid-column: 1; grid-row: auto; }
  .mail-demo, .rag { grid-template-columns: minmax(0, 1fr); }
  .inbox, .rag-questions { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; }
  .inbox button, .rag-questions button { flex: 0 0 min(240px, 78%); scroll-snap-align: start; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; padding-bottom: 72px; }
  .portrait { grid-row: 1; width: 112px; }
  .portrait img { border-radius: 50%; }
  .principles, .skills, .more-grid { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@media (max-width: 640px) {
  .top nav .hide-sm { display: none; }
  .wrap { padding: 0 16px; }
  body { font-size: 1rem; }
  section { padding: 80px 0; }
  .stats { gap: 8px; margin-top: 28px; }
  .stats li { padding: 16px; }
  .case { padding: 24px 20px; border-radius: 22px; gap: 24px; }
  .demo { padding: 14px; border-radius: 14px; }
  .inbox button, .mail-out, .draft, .rag-questions button, .rag-step, .rag-tools li { border-radius: 8px; }
  .mail-out { padding: 4px 14px 14px; }
  .mail-out .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rag-tools ul { grid-template-columns: minmax(0, 1fr); }
  .ai-copy { padding: 24px 20px; }
  .more-grid li, .skills > div { padding: 22px 20px; }
  .legal { padding-top: 48px; }
  .legal-card { padding: 4px 18px; }
  .legal-card div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .making { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--r-lg) var(--r-lg) 0 0; transform-origin: bottom center; }
  .making-head { padding: 24px 20px 0; }
  .making-body { padding: 14px 20px 24px; }
}

/* Preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .swap { animation: fadeonly .2s linear both; }
  .btn:active, .top .cv:active, .theme-btn:active, .inbox button:active, .rag-questions button:active { transform: none; }
  .making[open] { animation: fadeonly .2s linear both; }
}
@keyframes fadeonly { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .top { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--ink); }
  .case, .stats li, .more-grid li, .skills > div, .ai-copy { box-shadow: none; border: 1px solid var(--ink-3); }
  .tools li, .rag-tools li { border-color: var(--ink-3); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top { background: var(--paper); }
}
