/* Icarian Forge — Dan West's portfolio.
   Layout: one editorial column with a wide work section; project pages read like short case studies.
   Light by default, dark when the device asks for it. One ember accent, used for links and the sun in the mark. */

/* Stand-in fonts sized to match the web fonts, so nothing jumps when the real fonts arrive (measured in Chrome). */
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 500 600; size-adjust: 97.2%; }
@font-face { font-family: 'Bricolage Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 700 800; size-adjust: 98.6%; }
@font-face { font-family: 'Geist Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 400; size-adjust: 102.2%; }
@font-face { font-family: 'Geist Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 500; size-adjust: 105.1%; }
@font-face { font-family: 'Geist Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 700; size-adjust: 100.9%; }
@font-face { font-family: 'Geist Mono Fallback'; src: local('Menlo'), local('Menlo-Regular'); }
@font-face { font-family: 'Instrument Fallback'; src: local('Georgia Italic'), local('Georgia-Italic'); font-style: italic; size-adjust: 77.9%; }

:root {
  --paper: #f6f6f3;
  --card: #ffffff;
  --ink: #141413;
  --mute: #5f5e58;
  --faint: #6e6d66;
  --line: rgba(20, 20, 19, 0.12);
  --line-strong: rgba(20, 20, 19, 0.24);
  --accent: #c2410c;          /* ember */
  --accent-soft: rgba(194, 65, 12, 0.08);
  --accent-on-ink: #f97343;   /* the accent on the inverted contact card */
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.06), 0 12px 32px -16px rgba(20, 20, 19, 0.18);

  --font-display: 'Bricolage Grotesque', 'Bricolage Fallback', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Geist', 'Geist Fallback', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'Geist Mono Fallback', ui-monospace, 'SF Mono', monospace;
  --font-wit: 'Instrument Serif', 'Instrument Fallback', Georgia, serif;   /* the quiet italic for a turn of phrase */

  --wide: 1120px;
  --text: 680px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111110;
    --card: #1a1a18;
    --ink: #edece8;
    --mute: #a3a29b;
    --faint: #8c8b83;
    --line: rgba(237, 236, 232, 0.12);
    --line-strong: rgba(237, 236, 232, 0.24);
    --accent: #f97343;
    --accent-soft: rgba(249, 115, 67, 0.1);
    --accent-on-ink: #ad3a0b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--paper); }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem/1 var(--font-display); letter-spacing: -0.01em; }
.mark svg { width: 28px; height: 28px; flex: none; }
.mark .sun { fill: var(--accent); }
/* Brand rule: wherever the name appears, the I and Forge are ember ("I Forge"). */
.mark .forge, .brand-name .forge { color: var(--accent); }
/* Header menus: four groups that drop down on hover or click (public/nav.js); one "Menu" panel on phones */
.site-nav { position: relative; }
.nav-toggle { display: none; }
.nav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-group { position: relative; }
.nav-top { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 0.95rem; color: var(--mute); white-space: nowrap; cursor: pointer; }
.nav-top::after { content: ''; width: 5px; height: 5px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.55; transition: transform 0.15s; }
.nav-top:hover, .nav-group.open .nav-top { color: var(--ink); }
.nav-group.open .nav-top::after { transform: rotate(225deg); margin-top: 3px; }
.nav-top.nav-resume { color: var(--accent); font-weight: 500; }
.nav-sub { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 250px; list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.35); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; }
.nav-sub::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.nav-group:nth-last-child(-n+2) .nav-sub { left: auto; right: 0; }
.nav-group.open .nav-sub { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 721px) { .nav-group:hover .nav-sub { opacity: 1; visibility: visible; transform: none; } .nav-group:hover .nav-top { color: var(--ink); } }
.nav-sub a, .nav-sub button { display: grid; gap: 2px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 0.95rem; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer; }
.nav-sub a:hover, .nav-sub button:hover, .nav-sub a:focus-visible, .nav-sub button:focus-visible { background: var(--accent-soft); }
.nav-sub small { color: var(--faint); font-size: 0.72rem; }
.nav-sub a[aria-current="page"] > span { color: var(--accent); }

/* ---------- Landing ---------- */
.hero { padding-block: clamp(56px, 10vw, 120px) clamp(48px, 7vw, 88px); }
.eyebrow { color: var(--mute); display: flex; align-items: flex-start; gap: 10px; }
.eyebrow .dot { flex: none; margin-top: 0.5em; width: 8px; height: 8px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 4px rgba(34, 163, 90, 0.14); }
.hero h1 { margin-top: 22px; max-width: 19ch; font: 600 clamp(3rem, 8vw, 5.6rem)/1 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.hero h1 em { font: italic 400 0.5em/1 var(--font-wit); letter-spacing: 0.005em; color: var(--accent); white-space: nowrap; } /* small print, set small */
.hero .signature { margin-top: 18px; font: 600 clamp(1.2rem, 2.3vw, 1.55rem)/1.3 var(--font-display); letter-spacing: -0.015em; color: var(--ink); }
.hero .signature span { color: var(--accent); }
/* the two halves: industry and AI, repeated as a quiet reminder */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: clamp(56px, 8vw, 96px); }
.pillar { display: grid; align-content: start; gap: 8px; padding: clamp(22px, 3vw, 32px); border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.pillar::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 6px; }
.pillar .mono { color: var(--accent); }
.pillar h2 { font: 700 clamp(1.4rem, 2.4vw, 1.8rem)/1.15 var(--font-display); letter-spacing: -0.025em; }
.pillar p { color: var(--mute); }
/* in a case study the three halves become a quiet list */
.pillars.compact { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 0; border-top: 2px solid var(--ink); }
.pillars.compact .pillar { grid-template-columns: 120px minmax(0, 1fr); gap: 4px 20px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: none; }
.pillars.compact .pillar::before { display: none; }
.pillars .pillar .mono { color: var(--accent); margin-bottom: 0; }
.signature-h span { color: var(--accent); }
.hero p.lede { margin-top: 28px; max-width: 58ch; color: var(--mute); font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-weight: 500; font-size: 0.97rem; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
button.btn { background: transparent; color: inherit; font-family: inherit; cursor: pointer; }
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn .arrow { transition: transform 0.15s; }
.creds { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--mute); }
.creds li { display: inline-flex; align-items: center; gap: 8px; }
.creds li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.creds a { color: var(--accent); text-decoration: none; }
.creds a:hover { text-decoration: underline; }
.principles, .namesake { scroll-margin-top: 90px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.btn:hover .arrow { transform: translateX(2px); }

section { scroll-margin-top: 72px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.sec-head h2 { font: 600 1.6rem/1.15 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.sec-head .mono { color: var(--faint); }

/* work */
.work { padding-block: 24px 96px; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.project { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s; }
.project.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
a.project { text-decoration: none; }
a.project:hover { transform: translateY(-3px); border-color: var(--line-strong); }
@media (prefers-reduced-motion: reduce) { a.project:hover { transform: none; } }
.shot { position: relative; background: #17120d; aspect-ratio: 16 / 10; overflow: hidden; }
.project.featured .shot { aspect-ratio: auto; min-height: 100%; }
/* The Unlisted's tile: web, phone and share card as three separate pieces on a warm backdrop, each with its own depth */
.stage { --stage-a: #e9dcc5; --stage-b: #c9b08a; background: radial-gradient(120% 90% at 20% 10%, var(--stage-a), var(--stage-b)); min-height: 340px; }
@media (prefers-color-scheme: dark) { .stage { --stage-a: #6e5639; --stage-b: #2b2118; } }
.stage::before { content: ''; position: absolute; inset: 0; opacity: 0.35; background: repeating-radial-gradient(circle at 85% 110%, transparent 0 22px, rgba(255, 255, 255, 0.07) 22px 23px); }
.device { position: absolute; margin: 0; overflow: hidden; background: #15110c; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.stage .device img { width: 100%; height: auto; object-fit: initial; transition: none; }
.device.web { left: 7%; top: 9%; width: 76%; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 240, 215, 0.12), 0 2px 4px rgba(0, 0, 0, 0.12), 0 24px 48px -12px rgba(40, 24, 8, 0.45); z-index: 1; }
.device.web .chrome { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px; background: #251d15; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.device.web .chrome i { width: 7px; height: 7px; border-radius: 50%; background: rgba(238, 226, 200, 0.25); }
.device.web .chrome span { margin-left: 10px; font: 500 9px var(--font-mono); color: rgba(238, 226, 200, 0.55); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; }
.device.card { left: 4%; bottom: 7%; width: 40%; border-radius: 8px; transform: rotate(-3deg); box-shadow: 0 0 0 1px rgba(255, 240, 215, 0.14), 0 2px 4px rgba(0, 0, 0, 0.15), 0 22px 40px -14px rgba(30, 18, 6, 0.6); z-index: 2; }
.device.phone { right: 6%; bottom: 6%; width: 21%; border-radius: 22px; transform: rotate(3deg); border: 5px solid #0d0a07; box-shadow: 0 0 0 1px rgba(255, 240, 215, 0.16), 0 2px 4px rgba(0, 0, 0, 0.2), 0 30px 50px -14px rgba(30, 18, 6, 0.7); z-index: 3; }
a.project:hover .device.web { transform: translateY(-4px); }
a.project:hover .device.card { transform: rotate(-3deg) translateY(-7px); }
a.project:hover .device.phone { transform: rotate(3deg) translateY(-10px); }
@media (prefers-reduced-motion: reduce) { .device { transition: none; } a.project:hover .device.web { transform: none; } a.project:hover .device.card { transform: rotate(-3deg); } a.project:hover .device.phone { transform: rotate(3deg); } }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.5s ease; }
a.project:hover .shot:not(.stage) img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { a.project:hover .shot img { transform: none; } }
.body { display: flex; flex-direction: column; gap: 12px; padding: 28px; min-width: 0; }
.project.featured .body { padding: clamp(28px, 4vw, 44px); justify-content: center; }
.status { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.live::before { background: #22a35a; }
.status.forge::before { background: var(--accent); }
.project h3 { font: 700 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -0.025em; }
.project p { color: var(--mute); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; }
.tags li { padding: 3px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); }
.facts b { display: block; font: 700 1.35rem/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts span { color: var(--mute); font-size: 0.85rem; line-height: 1.35; display: block; margin-top: 2px; }
.more { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); }
.more .arrow { color: var(--accent); transition: transform 0.15s; }
a.project:hover .more .arrow { transform: translateX(3px); }
/* placeholder art for projects still in the forge */
.forge-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper); border-bottom: 1px solid var(--line); }
.forge-art::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 14px, var(--line) 14px 15px); }
.forge-art::after { content: ''; position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 70%); }
.forge-art span { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: var(--faint); }
.project.placeholder { box-shadow: none; }
.project.placeholder.wide { grid-column: 1 / -1; flex-direction: row; }
.project.placeholder.wide .forge-art { aspect-ratio: auto; width: 38%; min-height: 180px; border-bottom: 0; border-right: 1px solid var(--line); }
.project.placeholder.wide .body { justify-content: center; }

/* second featured tile: image on the right, set on the album's leather */
.project.featured.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.project.featured.flip .shot { order: 2; }
.stage.leather { --stage-a: #b58460; --stage-b: #6b3a26; }
.stage.ember { --stage-a: #fbe3d2; --stage-b: #e8a27c; }
@media (prefers-color-scheme: dark) { .stage.ember { --stage-a: #6a3218; --stage-b: #1c1410; } }
@media (prefers-color-scheme: dark) { .stage.leather { --stage-a: #7a4a30; --stage-b: #24140c; } }
.device.print { left: 5%; bottom: 7%; width: 24%; padding: 5px 5px 16px; background: #f1eadb; border-radius: 3px; transform: rotate(-4deg); box-shadow: 0 0 0 1px rgba(60, 30, 10, 0.18), 0 2px 4px rgba(0, 0, 0, 0.15), 0 22px 40px -14px rgba(30, 14, 4, 0.65); z-index: 2; }
a.project:hover .device.print { transform: rotate(-4deg) translateY(-7px); }
@media (prefers-reduced-motion: reduce) { a.project:hover .device.print { transform: rotate(-4deg); } }
.status.done::before { background: #a0784a; }
/* Project 4 is this site: a thin ember ring that slowly drifts, and a pin that says so */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.project.self { --ring-a: var(--accent); --ring-b: #e8894f; overflow: visible; border: 1.5px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, conic-gradient(from var(--spin), var(--ring-a), var(--ring-b), var(--ring-a), var(--ring-b), var(--ring-a)) border-box; box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); animation: ring-spin 9s linear infinite; }
@keyframes ring-spin { to { --spin: 360deg; } }
.project.self .shot { border-radius: 0 16px 16px 0; }
.project.self:not(.flip) .shot { border-radius: 16px 0 0 16px; }
.here { position: absolute; top: -13px; left: 28px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 10px; border-radius: 999px; background: var(--accent); color: var(--paper); font-weight: 500; box-shadow: 0 4px 14px -4px rgba(194, 65, 12, 0.55); }
.here::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); animation: here-pulse 2.4s ease-out infinite; }
@keyframes here-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .project.self, .here::before { animation: none; } }

/* about */
.about { padding-block: 24px 96px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); margin-top: 28px; }
.about-grid .lead { font: 600 clamp(1.4rem, 2.6vw, 1.9rem)/1.25 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.prose { display: grid; gap: 1em; max-width: var(--text); }
.prose p { color: var(--ink); }
.prose .soft { color: var(--mute); }
.principles { list-style: none; padding: 0; margin-top: 32px; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.principles li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--line-strong); }
.principles b { font: 600 1.05rem/1.35 var(--font-display); letter-spacing: -0.01em; }
.principles span { color: var(--mute); }
/* why the name: a quiet note with the mark */
.namesake { margin-top: 40px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-strong); }
.namesake-mark svg { width: 40px; height: 40px; }
.namesake-mark .sun { fill: var(--accent); }
.namesake h3 { font: 600 1.15rem/1.3 var(--font-display); letter-spacing: -0.01em; margin-bottom: 8px; }
.namesake p { color: var(--mute); }
.namesake p + p { margin-top: 0.7em; }
@media (max-width: 560px) { .namesake { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; } }

/* contact */
.contact { padding-block: 24px 120px; }
.contact-card { margin-top: 28px; padding: clamp(28px, 5vw, 56px); border-radius: 22px; background: var(--ink); color: var(--paper); display: grid; gap: 18px; }
.contact-card h3 { font: 700 clamp(1.8rem, 4.5vw, 3.2rem)/1.05 var(--font-display); letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance; }
.contact-card h3 em { font: italic 400 0.62em/1 var(--font-wit); color: var(--accent-on-ink); white-space: nowrap; }
.contact-card p { color: color-mix(in srgb, var(--paper) 72%, transparent); max-width: 52ch; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.contact-card .btn { border-color: color-mix(in srgb, var(--paper) 30%, transparent); color: var(--paper); }
.contact-card .btn:hover { border-color: var(--paper); }
.contact-card .btn.solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.contact-card .btn.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.email { font-family: var(--font-mono); font-size: 0.95rem; user-select: all; }
.copied { color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 0.9rem; min-height: 1.4em; }

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 28px 40px; color: var(--faint); }

/* ---------- Case study ---------- */
.case-head { padding-block: clamp(40px, 8vw, 88px) 36px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--mute); text-decoration: none; }
.back:hover { color: var(--ink); }
.case-head h1 { margin-top: 18px; font: 700 clamp(2.8rem, 8vw, 5.6rem)/1 var(--font-display); letter-spacing: -0.04em; }
.case-head .lede { margin-top: 18px; max-width: 46ch; color: var(--mute); font-size: clamp(1.1rem, 1.8vw, 1.3rem); text-wrap: pretty; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.meta dt { color: var(--faint); }
.meta dd { margin-top: 6px; font-size: 0.97rem; }
.figure { margin-block: 8px 0; }
.figure .frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #17120d; }
.figure figcaption { margin-top: 12px; color: var(--faint); }
.chapter { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(20px, 5vw, 64px); padding-block: 56px; border-top: 1px solid var(--line); }
.chapter:first-of-type { border-top: 0; }
.chapter h2 { font: 600 1.55rem/1.2 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.chapter .mono { color: var(--faint); display: block; margin-bottom: 8px; }
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; font: 600 0.85rem var(--font-mono); color: var(--accent); padding-top: 3px; }
ul.steps li { grid-template-columns: 20px minmax(0, 1fr); }
ul.steps li::before { content: ''; width: 7px; height: 7px; margin-top: 9px; border-radius: 50%; background: var(--accent); }
.steps b { font-weight: 600; }
.steps span { color: var(--mute); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.stat { padding: 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.stat b { display: block; font: 700 1.9rem/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 6px; color: var(--mute); font-size: 0.9rem; line-height: 1.35; }
.timeline { list-style: none; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 22px 22px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-strong); }
.timeline li:last-child::before { background: var(--accent); border-color: var(--accent); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--mute); }
.gallery { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 48px; }
.gallery .frame img { width: 100%; }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 40px 96px; border-top: 1px solid var(--line); }

/* the album: leaves, transcriptions and a poem */
.eyebrow .dot.ember { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.frame.paper { background: #e9dfc9; }
.leaf-fig { display: grid; gap: 12px; margin: 4px 0 8px; }
.leaf-fig .frame, .leaf-strip .frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.leaf-fig figcaption, .leaf-strip figcaption { color: var(--faint); }
.leaf-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-bottom: 56px; }
.leaf-strip figure { margin: 0; }
.leaf-strip .frame { aspect-ratio: 7 / 10; }
.leaf-strip img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.leaf-strip figcaption { margin-top: 10px; }
.figure.yellow { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 16px clamp(20px, 4vw, 48px); align-items: center; padding-bottom: 56px; }
.figure.yellow figcaption { grid-column: 1 / -1; margin-top: 0; }
.yellow-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.yellow-text .mono { display: block; color: var(--faint); margin-bottom: 10px; }
.yellow-text p { font: 400 1.15rem/1.5 var(--font-wit); }
.yellow-text div:last-child p { font-style: italic; }
.yellow-text p + p { margin-top: 0.8em; color: var(--mute); }
.redact { display: inline-block; width: 2.6em; height: 0.8em; vertical-align: -0.05em; border-radius: 3px; background: currentColor; opacity: 0.22; }
.poem { margin-top: 4px; padding: clamp(22px, 4vw, 36px); border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 1em; }
.poem p { font: italic 400 clamp(1.25rem, 2vw, 1.45rem)/1.45 var(--font-wit); color: var(--ink); }
.poem footer { border: 0; color: var(--faint); }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project.featured { grid-template-columns: minmax(0, 1fr); }
  .project.featured .shot { aspect-ratio: 16 / 10; min-height: 0; }
  .about-grid, .chapter { grid-template-columns: minmax(0, 1fr); }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles li { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .frame:last-child { max-width: 320px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .project.featured.flip { grid-template-columns: minmax(0, 1fr); }
  .project.featured.flip .shot { order: 0; }
  .project.self .shot, .project.self:not(.flip) .shot { border-radius: 16px 16px 0 0; }
  .figure.yellow { grid-template-columns: minmax(0, 1fr); }
  .figure.yellow .frame { max-width: 420px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .facts, .stat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .facts div:last-child, .stat-row .stat:last-child { grid-column: 1 / -1; }
  .stat-row.six .stat:last-child { grid-column: auto; }
  .body { padding: 22px; }
  .project.placeholder.wide { flex-direction: column; }
  .project.placeholder.wide .forge-art { width: auto; min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .leaf-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 40px; }
  .leaf-strip figure { scroll-snap-align: start; }
  .yellow-text { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 440px) {
  .pillars.compact .pillar { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Site feedback dialog (public/feedback.js) ---------- */
.link-btn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fb { margin: auto; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45); }
.fb::backdrop { background: rgba(17, 17, 16, 0.45); backdrop-filter: blur(3px); }
.fb-form { display: grid; gap: 14px; padding: clamp(22px, 5vw, 32px); }
.fb-eyebrow { color: var(--accent); }
.fb h2 { font: 700 1.6rem/1.1 var(--font-display); letter-spacing: -0.02em; margin-top: -6px; }
.fb-lede { color: var(--mute); }
.fb-rating { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.fb-rating label { position: relative; }
.fb-rating input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-rating span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 500; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.fb-rating input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fb-rating input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-field { display: grid; gap: 6px; font-size: 0.95rem; }
.fb-field em { font-style: normal; color: var(--faint); font-size: 0.85em; margin-left: 4px; }
.fb-field textarea, .fb-field input { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; width: 100%; resize: vertical; }
.fb-field textarea:focus, .fb-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-status { min-height: 1.4em; font-size: 0.92rem; color: var(--accent); }
.fb-status:empty { display: none; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-actions .btn { cursor: pointer; font-family: inherit; }
.fb-note { color: var(--faint); }

/* ---------- AI certifications (résumé page) ---------- */
.certs { padding-block: 8px 96px; scroll-margin-top: 72px; }
.certs-lede { margin-top: 18px; max-width: 60ch; color: var(--mute); }
.cert-grid { list-style: none; padding: 0; margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.cert { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.cert-logo { display: flex; align-items: center; height: 52px; margin-bottom: 10px; padding: 9px 14px; width: fit-content; min-width: 52px; border-radius: 10px; background: #fff; border: 1px solid rgba(20, 20, 19, 0.08); }
.cert-logo img { height: 32px; width: auto; max-width: 150px; object-fit: contain; }
/* The two headline credentials (MIT, CCAO-F): their own row, warmer, a touch larger */
.cert-grid.headline { margin-top: 28px; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cert-grid.headline .cert { padding: clamp(24px, 3vw, 32px); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card) 70%); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.cert-grid.headline .cert-logo { height: 64px; }
.cert-grid.headline .cert-logo img { height: 42px; }
.cert-grid.headline .cert h3 { font-size: clamp(1.3rem, 2.2vw, 1.5rem); }
.cert-subhead { margin-top: 44px; color: var(--faint); }
.cert-issuer { color: var(--accent); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cert h3 { font: 600 1.12rem/1.3 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.cert-meta { color: var(--mute); font-size: 0.92rem; }
.cert-verify { margin-top: auto; padding-top: 8px; align-self: flex-start; font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--ink); }
.cert-verify span { color: var(--accent); }
.cert-verify:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.cert.pending { border-style: dashed; border-color: var(--line-strong); background: transparent; }
/* "In progress" uses its own blue, never the earned-credential amber */
.cert.pending { --pending: #1d4ed8; --pending-ink: #fff; }
@media (prefers-color-scheme: dark) { .cert.pending { --pending: #9cc3ff; --pending-ink: #0b1b33; } }
.cert.pending .cert-issuer { color: var(--faint); }
.cert.pending .cert-logo img { filter: grayscale(1); opacity: 0.7; }
.cert-status { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--pending); border: 1px solid var(--pending); color: var(--pending-ink); font-size: 0.82rem; font-weight: 600; box-shadow: 0 4px 12px -6px var(--pending); }
.cert-status svg { width: 15px; height: 15px; }
.cert-not-yet { color: var(--pending); font-weight: 600; }

/* Phones: one Menu button opens a panel with every group laid out */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); font: inherit; font-size: 0.95rem; font-weight: 500; color: var(--ink); cursor: pointer; }
  .nav-burger, .nav-burger::before, .nav-burger::after { display: block; width: 14px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
  .nav-burger { position: relative; }
  .nav-burger::before, .nav-burger::after { content: ''; position: absolute; left: 0; }
  .nav-burger::before { top: -4.5px; }
  .nav-burger::after { top: 4.5px; }
  .site-nav.open .nav-burger { background: transparent; }
  .site-nav.open .nav-burger::before { transform: translateY(4.5px) rotate(45deg); }
  .site-nav.open .nav-burger::after { transform: translateY(-4.5px) rotate(-45deg); }
  .nav-list { display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: min(330px, calc(100vw - 32px)); max-height: calc(100dvh - 96px); overflow-y: auto; flex-direction: column; gap: 4px; padding: 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.4); }
  .site-nav.open .nav-list { display: flex; }
  .nav-top { min-height: 0; padding: 10px 12px 4px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--faint); pointer-events: none; }
  .nav-top::after { display: none; }
  .nav-top.nav-resume { color: var(--accent); }
  .nav-sub { position: static; min-width: 0; padding: 0 0 6px; border: 0; border-radius: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; }
  .nav-group + .nav-group { border-top: 1px solid var(--line); }
  .nav-sub small { display: none; }
  .nav-sub a, .nav-sub button { padding: 8px 12px; }
}

/* Certificate previews and the viewer (public/certs.js) */
.cert-proof { position: relative; display: block; margin-top: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.35); text-decoration: none; }
.cert-proof img { width: 100%; height: auto; transition: transform 0.35s ease; }
.cert-proof-label { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(20, 20, 19, 0.82); color: #fff; font-size: 0.85rem; font-weight: 500; backdrop-filter: blur(4px); transition: background 0.15s; }
.cert-proof-label svg { width: 15px; height: 15px; }
.cert-proof:hover img { transform: scale(1.03); }
.cert-proof:hover .cert-proof-label, .cert-proof:focus-visible .cert-proof-label { background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .cert-proof img { transition: none; } .cert-proof:hover img { transform: none; } }
.cert-grid.headline .cert { display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 34%, 340px); column-gap: clamp(20px, 4vw, 48px); row-gap: 6px; align-content: start; }
.cert-grid.headline .cert > * { grid-column: 1; }
.cert-grid.headline .cert > .cert-proof { grid-column: 2; grid-row: 1 / span 6; align-self: start; margin-top: 0; }
.cert-grid.headline .cert > .cert-verify { margin-top: 8px; }
@media (max-width: 680px) { .cert-grid.headline .cert { grid-template-columns: minmax(0, 1fr); } .cert-grid.headline .cert > .cert-proof { grid-column: 1; grid-row: auto; margin-top: 10px; } }

.proof { margin: auto; padding: 0; width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 1px solid var(--line-strong); border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55); overflow: auto; }
.proof::backdrop { background: rgba(17, 17, 16, 0.6); backdrop-filter: blur(4px); }
.proof figure { margin: 0; display: grid; }
.proof-frame { background: #fff; display: grid; place-items: center; padding: clamp(8px, 2vw, 18px); border-bottom: 1px solid var(--line); }
.proof-frame img { width: 100%; height: auto; max-height: calc(100dvh - 210px); object-fit: contain; }
.proof figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px clamp(16px, 3vw, 26px) 22px; }
.proof-issuer { color: var(--accent); }
.proof h2 { font: 600 1.2rem/1.25 var(--font-display); letter-spacing: -0.01em; margin-top: 4px; }
.proof-links { display: flex; flex-wrap: wrap; gap: 10px; }
.proof-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.proof-close:hover { border-color: var(--ink); }
