/* =========================================================
   XY — Personal portfolio · editorial edition
   ---------------------------------------------------------
   Palette (contrast on cream):
     ink     #1C1A17  near-black text        ~15:1
     ink-2   #5C554C  secondary text         ~6.5:1
     accent  #3E4A34  dark olive (actions)   ~8:1
     muted   #A8977E  warm taupe — rules & decoration only
   Spacing: 8px scale (--s1 … --s20)
   ========================================================= */

:root {
  --cream: #F6F1E9;
  --paper: #FBF8F2;
  --sand: #EEE7DB;
  --ink: #1C1A17;
  --ink-2: #5C554C;
  --accent: #3E4A34;
  --accent-deep: #2A3123;
  --accent-tint: #E4E4D6;
  --muted: #A8977E;
  --line: rgba(28, 26, 23, .12);
  --line-strong: rgba(28, 26, 23, .24);
  --on-dark: #F6F1E9;
  --on-dark-2: #C9C0AE;
  --line-dark: rgba(246, 241, 233, .16);
  --header-bg: rgba(246, 241, 233, .72);
  --field-focus: #FFFFFF;
  --placeholder: #6F675D;
  --error: #9B3D2C;
  --live: #4F7A45;
  --tag-ink: #2A3123;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1A17' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px;
  --s6: 48px; --s8: 64px; --s10: 80px; --s12: 96px; --s16: 128px; --s20: 160px;

  --radius: 16px;
  --radius-lg: 24px;
  --measure: 65ch;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .7, .2, 1);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Dark theme: the same token names, so every component follows automatically.
   --cream is "page background" and --ink is "main text" in both themes. */
:root[data-theme="dark"] {
  --cream: #151613;
  --paper: #1C1E19;
  --sand: #20231D;
  --ink: #EDE7DB;
  --ink-2: #B5AC9C;
  --accent: #B9C4A0;
  --accent-deep: #0E100C;
  --accent-tint: #2C3326;
  --muted: #6F6656;
  --line: rgba(237, 231, 219, .12);
  --line-strong: rgba(237, 231, 219, .24);
  --on-dark: #EDE7DB;
  --on-dark-2: #B5AC9C;
  --line-dark: rgba(237, 231, 219, .14);
  --header-bg: rgba(21, 22, 19, .72);
  --field-focus: #10110E;
  --placeholder: #958C7D;
  --error: #E8957F;
  --live: #9BC48B;
  --tag-ink: #D4DCC0;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EDE7DB' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #151613;
    --paper: #1C1E19;
    --sand: #20231D;
    --ink: #EDE7DB;
    --ink-2: #B5AC9C;
    --accent: #B9C4A0;
    --accent-deep: #0E100C;
    --accent-tint: #2C3326;
    --muted: #6F6656;
    --line: rgba(237, 231, 219, .12);
    --line-strong: rgba(237, 231, 219, .24);
    --on-dark: #EDE7DB;
    --on-dark-2: #B5AC9C;
    --line-dark: rgba(237, 231, 219, .14);
    --header-bg: rgba(21, 22, 19, .72);
    --field-focus: #10110E;
    --placeholder: #958C7D;
    --error: #E8957F;
    --live: #9BC48B;
    --tag-ink: #D4DCC0;
  --tag-ink: #D4DCC0;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EDE7DB' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* Circular theme-switch reveal (View Transitions API; falls back to an instant swap) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s2)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; line-height: 1.1; font-optical-sizing: auto; }
p, figure { margin: 0; }
em { font-style: italic; color: var(--accent); }
strong { font-weight: 600; }
::selection { background: var(--accent); color: var(--cream); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1200px, 100% - var(--s4)); margin-inline: auto; }
@media (min-width: 768px) { .container { width: min(1200px, 100% - var(--s10)); } }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }

.skip-link { position: absolute; left: var(--s2); top: -64px; z-index: 100; background: var(--ink); color: var(--cream); padding: var(--s1) var(--s2); border-radius: 8px; }
.skip-link:focus { top: var(--s2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 48px; padding: 0 var(--s3); border-radius: 999px;
  font: 600 .9375rem/1 var(--sans); letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .icon { transform: translateX(2px); }
.btn-solid { background: var(--accent); color: var(--cream); }
.btn-solid:hover { background: var(--accent-deep); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
/* The frosted blur lives on a separate layer: a backdrop-filter on the header itself
   would trap the full-screen mobile menu inside the 72px header bar. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: transparent; transition: background-color .4s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header.scrolled::before {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}
.nav { display: flex; align-items: center; gap: var(--s3); }
.nav .logo { margin-right: auto; }
.nav-actions { order: 3; }
.logo { font-family: var(--serif); font-size: 1.75rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.logo span { color: var(--accent); }
.logo-light { color: var(--on-dark); }
.logo-light span { color: var(--on-dark-2); }

.nav-links { display: flex; align-items: center; gap: var(--s4); font-size: .9375rem; font-weight: 500; }
.nav-links a { position: relative; color: var(--ink-2); transition: color .25s; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s2); border: 1px solid var(--ink); border-radius: 999px; color: var(--ink) !important; transition: background-color .3s, color .3s !important; }
.nav-cta:hover { background: var(--ink); color: var(--cream) !important; }

.nav-toggle { display: none; }
.nav-links a { white-space: nowrap; }

/* Small laptops: keep the full menu on one line */
@media (max-width: 1240px) and (min-width: 881px) {
  .nav-links { gap: var(--s3); }
}
@media (max-width: 1100px) and (min-width: 881px) {
  .nav-links { gap: 18px; font-size: .875rem; }
  .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-cta { padding: 0 14px; }
}

@media (max-width: 880px) {
  .nav-toggle {
    position: relative; z-index: 60;
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: transparent; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1.25px; background: var(--ink); transition: transform .35s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.6px) rotate(-45deg); }

  .nav-links {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; justify-content: center; gap: var(--s3);
    background: var(--cream);
    font-family: var(--serif); font-size: 2.25rem; font-weight: 400;
    opacity: 0; visibility: hidden;
    transition: opacity .35s var(--ease), visibility 0s .35s;
  }
  .nav-links a { color: var(--ink); }
  .nav-links.open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
  .nav-cta { font-family: var(--sans); font-size: 1rem; min-height: 48px; padding: 0 var(--s3); margin-top: var(--s2); }
  body.menu-open { overflow: hidden; }
}

/* ---------- Section system ---------- */
.section { padding-block: clamp(var(--s12), 12vw, var(--s20)); }
.section-alt { background: var(--sand); }
.section-dark { background: var(--accent-deep); color: var(--on-dark-2); }
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-dark em { color: #D9CFB8; }
.section-dark .eyebrow { color: var(--on-dark-2); }
.section-dark .eyebrow .num { color: var(--on-dark); border-color: var(--line-dark); }

.eyebrow {
  display: flex; align-items: center; gap: var(--s2);
  font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: var(--s3);
}
.eyebrow .num { font-family: var(--serif); font-size: .9375rem; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink); padding-right: var(--s2); border-right: 1px solid var(--line-strong); line-height: 1; }

h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); font-weight: 350; letter-spacing: -.02em; max-width: 16ch; }
h2 em { font-weight: 300; }
.section-head { margin-bottom: clamp(var(--s6), 6vw, var(--s10)); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s8); }
.section-intro { max-width: 52ch; margin-top: var(--s3); color: var(--ink-2); }
.aside { max-width: 36ch; color: var(--ink-2); font-size: .9375rem; }
.aside strong { color: var(--ink); }

/* ---------- 1. Hero ---------- */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(var(--s6), 7vw, var(--s12))); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s3); align-items: center; }
.hero-text { grid-column: 1 / span 7; padding-bottom: var(--s6); }
.hero-media { grid-column: 9 / span 4; position: relative; margin-top: var(--s4); isolation: isolate; }

.hero-title { font-size: clamp(3.5rem, 9.4vw, 8rem); font-weight: 300; letter-spacing: -.035em; line-height: .92; margin-bottom: var(--s4); }
.hero-title em { font-weight: 300; }
.hero-tagline { font-size: clamp(1rem, 1.4vw, 1.125rem); font-weight: 500; color: var(--ink); margin-bottom: var(--s3); }
.hero-intro { max-width: 52ch; color: var(--ink-2); margin-bottom: var(--s5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Arched photo with warm grade + grain */
.arch {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  background: var(--sand);
  isolation: isolate;
}
.arch img, .frame-soft img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(.12) saturate(.9) contrast(1.03) brightness(1.02);
  color: transparent; /* hides alt text if a photo fails to load */
}
/* Framed on Xy at the laptop; this photo is already color-graded, so the CSS grade is lighter */
.arch img { object-position: 55% 50%; transform: translate3d(0, var(--py, 0px), 0) scale(1.22); transform-origin: 56% 52%; filter: sepia(.04) saturate(.96) contrast(1.02); }
.arch::after, .frame-soft::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); background-size: 160px;
  mix-blend-mode: multiply; opacity: .16;
}
.arch::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(246,241,233,0) 60%, rgba(62,74,52,.12));
}
/* thin offset outline for asymmetry */
.hero-media::before {
  content: ""; position: absolute; inset: var(--s3) calc(-1 * var(--s3)) calc(-1 * var(--s3)) var(--s3);
  border: 1px solid var(--line-strong); border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  z-index: -1;
}

.badge-float {
  position: absolute; left: calc(-1 * var(--s6)); bottom: var(--s5);
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: var(--s1) var(--s2); border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .875rem; font-weight: 500; color: var(--ink);
  box-shadow: 0 8px 24px -16px rgba(28,26,23,.35);
  animation: drift 6s ease-in-out infinite;
}
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--live); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes drift { 50% { transform: translateY(-6px); } }

/* on-load entrance: under 600ms, staggered by --d */
.load { opacity: 0; transform: translateY(16px); animation: rise 560ms var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.ticker { margin-top: clamp(var(--s8), 8vw, var(--s12)); border-block: 1px solid var(--line); padding-block: var(--s3); overflow: hidden; }
.ticker-track { display: flex; align-items: center; gap: var(--s4); width: max-content; animation: ticker 48s linear infinite; font-family: var(--serif); font-size: 1.375rem; font-weight: 300; color: var(--ink-2); white-space: nowrap; }
.ticker-track i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--muted); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 2. About ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: start; }
.split .section-head { position: sticky; top: calc(var(--header-h) + var(--s5)); margin-bottom: 0; }
.prose { max-width: var(--measure); }
.prose p { color: var(--ink-2); margin-bottom: var(--s3); }
.prose .lead { font-family: var(--serif); font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 350; line-height: 1.4; color: var(--ink); margin-bottom: var(--s4); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s1); }
.facts dd { font-weight: 500; line-height: 1.45; }

/* ---------- 3. Journey ---------- */
.timeline { border-top: 1px solid var(--line-strong); }
.tl-item { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--s4); padding-block: var(--s5); border-bottom: 1px solid var(--line-strong); }
.tl-when { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); font-size: .9375rem; font-weight: 600; color: var(--ink); }
.tl-body { max-width: var(--measure); }
.tl-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; letter-spacing: -.01em; margin-bottom: var(--s1); }
.tl-org { color: var(--accent); font-weight: 500; margin-bottom: var(--s2); }
.list li { position: relative; padding-left: var(--s3); color: var(--ink-2); margin-bottom: var(--s1); }
.list li::before { content: ""; position: absolute; left: 0; top: .85em; width: 10px; height: 1px; background: var(--muted); }
.tl-award { display: flex; align-items: center; gap: var(--s1); margin-top: var(--s3); padding: var(--s1) var(--s2); border: 1px solid var(--line-strong); border-radius: 999px; width: fit-content; font-size: .875rem; font-weight: 500; }
.tl-award .icon { width: 18px; height: 18px; color: var(--accent); }

.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--ink-2); background: var(--paper); }
.tag-accent { background: var(--accent); border-color: var(--accent); color: var(--cream); }

/* ---------- 4. Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.skill { padding: var(--s5) var(--s4) var(--s5) 0; }
.skill + .skill { padding-left: var(--s4); border-left: 1px solid var(--line); }
.skill .icon-lg { color: var(--accent); margin-bottom: var(--s4); }
.skill h3 { font-size: 1.75rem; font-weight: 400; margin-bottom: var(--s3); }
.note { font-size: .9375rem; color: var(--ink-2); font-style: italic; margin: calc(-1 * var(--s1)) 0 var(--s3); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chips li { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .875rem; color: var(--ink); transition: background-color .25s, border-color .25s; }
.chips li:hover { background: var(--paper); border-color: var(--ink-2); }

/* ---------- 5. Tech journey ---------- */
.tech { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tech-card { padding: var(--s6) var(--s5); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.tech-card:hover { border-color: rgba(246,241,233,.36); background: rgba(246,241,233,.03); }
.tech-card .icon-lg { color: var(--on-dark); margin-bottom: var(--s8); }
.tech-card h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 350; margin-bottom: var(--s2); }
.tech-card p { max-width: 44ch; }
.log { margin-top: var(--s3); padding: var(--s5); border: 1px solid var(--line-dark); border-radius: var(--radius-lg); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s4); }
.log-head h3 { font-size: 1.75rem; font-weight: 350; margin-bottom: var(--s1); }
.log-head p { font-size: .9375rem; }
.log-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--s2); align-items: baseline; padding-block: var(--s2); border-bottom: 1px solid var(--line-dark); }
.log-list li:last-child { border-bottom: 0; }
.log-when { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.log-what { color: var(--on-dark); }
.log-status { font-size: .75rem; padding: 2px 10px; border: 1px solid var(--line-dark); border-radius: 999px; color: var(--on-dark); white-space: nowrap; }

/* ---------- 6. Projects (case study cards) ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8) var(--s4); }
.project { display: flex; flex-direction: column; gap: var(--s3); cursor: pointer; transition: transform .5s var(--ease); }
.project:hover, .project:focus-visible { transform: translateY(-6px); }
.project:focus-visible { outline-offset: 8px; border-radius: var(--radius-lg); }

.browser { border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--paper); overflow: hidden; transition: border-color .5s var(--ease); }
.project:hover .browser { border-color: var(--ink-2); }
.browser-bar { display: flex; align-items: center; gap: var(--s1); height: 36px; padding: 0 var(--s2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-strong); }
.browser-url { margin-left: var(--s1); flex: 1; max-width: 60%; height: 20px; border-radius: 999px; background: var(--sand); font-size: .6875rem; line-height: 20px; padding-inline: var(--s1); color: var(--ink-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.browser-view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.project:hover .browser-view img, .project:hover .slot { transform: scale(1.03); }

/* Empty image slot (shown until a real screenshot is added) */
.slot {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: var(--s1);
  color: var(--ink-2); font-size: .8125rem; font-weight: 500; letter-spacing: .04em;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--sand);
  transition: transform .8s var(--ease);
}
.slot .icon { width: 32px; height: 32px; color: var(--muted); }

.project-meta { display: flex; flex-direction: column; gap: var(--s1); }
.project-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.project h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 400; letter-spacing: -.01em; }
.project-desc { color: var(--ink-2); max-width: 52ch; }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s1); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tags li { font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--tag-ink); }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem; font-weight: 600; color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link .icon { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.project:hover .link .icon { transform: translate(2px, -2px); }

/* ---------- 7. Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.service { padding: var(--s5) var(--s4) var(--s5) 0; border-bottom: 1px solid var(--line); }
.service:not(:nth-child(3n + 1)) { padding-left: var(--s4); border-left: 1px solid var(--line); }
.service-photo { position: relative; margin: 0 0 var(--s3); height: clamp(170px, 15.5vw, 215px); overflow: hidden; border-radius: var(--radius); background: var(--art-bg); }
.service-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s var(--ease); }
.service:hover .service-photo img { transform: scale(1.05); }
.service-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.night .service-photo img { filter: brightness(.88) saturate(.92); }
.service-n { display: block; font-family: var(--serif); font-size: 1rem; color: var(--accent); margin-bottom: var(--s4); }
.service h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: var(--s2); }
.service p { color: var(--ink-2); font-size: .9375rem; max-width: 40ch; }
.service .service-price { margin-top: var(--s2); color: var(--ink-2); font-size: .875rem; }
.service-price b { font-family: var(--serif); font-weight: 400; font-size: 1.625rem; color: var(--ink); margin-left: 4px; }
.service-includes { margin-top: var(--s1); display: grid; gap: 4px; font-size: .875rem; color: var(--ink-2); }
.service-includes li { padding-left: 22px; position: relative; }
.service-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Launch promo, process, inclusions, FAQ */
.promo-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: var(--s3); padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--tag-ink); font-size: .9375rem; }
.promo-badge .promo-label { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--cream); font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.process, .included, .faq { margin-top: var(--s8); }
.process-title { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-bottom: var(--s4); }
.process-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); counter-reset: none; }
.process-steps li { position: relative; padding: var(--s4) var(--s3) var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.process-steps span { position: absolute; top: -18px; left: var(--s3); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--cream); font-family: var(--serif); font-size: 1.125rem; }
.process-steps h4 { font-size: 1.25rem; margin: var(--s1) 0 var(--s1); }
.process-steps p { color: var(--ink-2); font-size: .9375rem; line-height: 1.6; }
.process-time { margin-top: var(--s3); color: var(--ink-2); font-size: .9375rem; }
.process-time b { color: var(--ink); font-weight: 600; }
.included-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2) var(--s4); }
.included-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-size: 1rem; line-height: 1.5; }
.included-list li::before { content: "✓"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: .8125rem; font-weight: 700; }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s3) 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font-family: var(--sans); font-size: 1.125rem; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 var(--s3); max-width: 65ch; color: var(--ink-2); }
@media (max-width: 880px) {
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s5); }
  .included-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .process-steps, .included-list { grid-template-columns: minmax(0, 1fr); }
  .faq summary { font-size: 1.125rem; }
}
.services-cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  margin-top: var(--s6); padding: var(--s4) var(--s5); border-radius: var(--radius-lg);
  background: var(--accent); color: var(--cream);
  transition: background-color .3s var(--ease);
}
.services-cta strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.75rem; margin-bottom: 4px; }
.services-cta .icon { width: 32px; height: 32px; transition: transform .4s var(--ease); }
.services-cta:hover { background: var(--accent-deep); }
.services-cta:hover .icon { transform: translate(4px, -4px); }

/* ---------- 8. Beyond work ---------- */
.beyond { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.frame-soft { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-lg) var(--radius-lg) 999px 999px; background: var(--sand); isolation: isolate; }
.frame-soft img { object-position: 50% 80%; transform: translate3d(0, var(--py, 0px), 0) scale(1.3); transform-origin: 52% 62%; }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s4); }
.trait { display: flex; flex-direction: column; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line-strong); }
.trait .icon { color: var(--accent); width: 24px; height: 24px; }
.trait h3 { font-size: 1.375rem; font-weight: 400; margin-bottom: 4px; }
.trait p { color: var(--ink-2); font-size: .9375rem; }

/* ---------- 9. Education ---------- */
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); }
.edu-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); gap: var(--s8); align-items: start; }
.edu-portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px var(--radius-lg) var(--radius-lg); background: #2a2b2e; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .55); }
.edu-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ease); }
.edu-portrait:hover img { transform: scale(1.04); }
.edu-portrait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.edu-title { font-family: var(--sans); font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: var(--s2); border-bottom: 1px solid var(--line-strong); }
.edu-item { padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.edu-year { font-size: .8125rem; font-weight: 600; color: var(--accent); }
.edu-item h4 { font-size: 1.375rem; font-weight: 400; line-height: 1.25; margin: 4px 0; }
.edu-item p { color: var(--ink-2); font-size: .9375rem; }

/* ---------- 10. Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s10); align-items: start; }
.contact-intro { color: var(--ink-2); max-width: 46ch; margin: var(--s3) 0 var(--s4); }
.contact-card { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s5); }
.contact-card img { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px var(--line-strong); }
.contact-card-name { font-family: var(--serif, serif); font-size: 1.125rem; line-height: 1.2; }
.contact-card-role { font-size: .8125rem; color: var(--ink-2); margin-top: 2px; }
.dm { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.contact-links li { border-top: 1px solid var(--line); }
.contact-links li:last-child { border-bottom: 1px solid var(--line); }
.contact-links a { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: var(--s2); padding-block: var(--s2); font-size: .9375rem; transition: color .25s; word-break: break-word; }
.contact-links span { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.contact-links .icon { width: 18px; height: 18px; color: var(--ink-2); transition: transform .35s var(--ease), color .25s; }
.contact-links a:hover { color: var(--accent); }
.contact-links a:hover .icon { color: var(--accent); transform: translate(2px, -2px); }

/* Custom form fields */
.form { padding: var(--s5); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); }
.field { margin-bottom: var(--s3); }
.field label { display: block; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--ink); margin-bottom: var(--s1); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px var(--s2);
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line-strong); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 144px; line-height: 1.6; }
.field select {
  padding-right: var(--s6); cursor: pointer;
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.field ::placeholder { color: var(--placeholder); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--field-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.error { min-height: 1.25em; font-size: .8125rem; color: var(--error); margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: var(--s2); font-size: .9375rem; text-align: center; min-height: 1.5em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--error); }

/* ---------- 11. Footer ---------- */
.site-footer { background: var(--accent-deep); color: var(--on-dark-2); padding-block: var(--s10) var(--s4); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: var(--s5); padding-bottom: var(--s6); border-bottom: 1px solid var(--line-dark); }
.footer-statement { margin-top: var(--s2); font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.5rem; color: var(--on-dark); }
.footer-links, .footer-social { display: grid; gap: var(--s1); font-size: .9375rem; }
.footer-social a { display: inline-flex; align-items: center; gap: var(--s1); }
.footer-social .icon { width: 18px; height: 18px; }
.footer-links a, .footer-social a { transition: color .25s; }
.footer-links a:hover, .footer-social a:hover { color: var(--on-dark); }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s3); font-size: .875rem; }
.footer-bottom a:hover { color: var(--on-dark); }
.footer-bottom p a { text-decoration: underline; text-underline-offset: 3px; }
.form-privacy { margin-top: var(--s1); font-size: .8125rem; color: var(--ink-2); text-align: center; }
.form-privacy a { text-decoration: underline; text-underline-offset: 3px; }
.form-privacy a:hover { color: var(--ink); }

/* ---------- Dialog ---------- */
.dialog { max-height: calc(100dvh - var(--s4)); overflow-y: auto; }
.dialog [hidden] { display: none !important; }
.dialog { width: min(640px, 100% - var(--s4)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); color: var(--ink); overflow: hidden; }
.dialog::backdrop { background: rgba(28, 26, 23, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dialog[open] { animation: rise 400ms var(--ease); }
.dialog-media { border-bottom: 1px solid var(--line); }
.dialog-media .browser { border: 0; border-radius: 0; }
.dialog-body { padding: var(--s4) var(--s5) var(--s5); display: grid; gap: var(--s2); justify-items: start; }
.dialog-body h3 { font-size: 2rem; font-weight: 400; }
.dialog-body p { color: var(--ink-2); }
.dialog-note { padding: var(--s2); border-radius: 12px; background: var(--sand); font-size: .9375rem; justify-self: stretch; }
.dialog-close { position: absolute; top: var(--s1); right: var(--s1); z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); cursor: pointer; }

/* ---------- Theme toggle ---------- */
.nav-actions { display: flex; align-items: center; gap: var(--s1); position: relative; z-index: 60; }
.theme-toggle {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  overflow: hidden; transition: border-color .3s, background-color .3s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .icon { position: absolute; width: 18px; height: 18px; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .i-sun { transform: translateY(150%) rotate(-90deg); opacity: 0; }
:root[data-theme="dark"] .theme-toggle .i-sun { transform: none; opacity: 1; }
:root[data-theme="dark"] .theme-toggle .i-moon { transform: translateY(-150%) rotate(90deg); opacity: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { transform: none; opacity: 1; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { transform: translateY(-150%) rotate(90deg); opacity: 0; }
}

/* ---------- Illustrations ----------
   Inline SVG art drawn in the brand palette. Colors come from --art-* tokens,
   so every illustration follows light/dark mode automatically.
   a1–a6 = fill, s1–s6 = stroke (same numbering). */
:root {
  --art-bg: #ECE4D6;
  --art-1: #3E4A34;  /* olive */
  --art-2: #B9C4A0;  /* sage */
  --art-3: #DDD3C1;  /* sand */
  --art-4: #FBF8F2;  /* paper */
  --art-5: #C98B6B;  /* clay accent */
  --art-6: #A89A86;  /* taupe */
}
:root[data-theme="dark"], .section-dark {
  --art-bg: #1E211B;
  --art-1: #B9C4A0;
  --art-2: #55613F;
  --art-3: #2E3328;
  --art-4: #23261F;
  --art-5: #C98B6B;
  --art-6: #6F6656;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --art-bg: #1E211B; --art-1: #B9C4A0; --art-2: #55613F; --art-3: #2E3328;
    --art-4: #23261F; --art-5: #C98B6B; --art-6: #6F6656;
  }
}
.section-dark { --art-bg: rgba(246, 241, 233, .05); }
.a1 { fill: var(--art-1); } .a2 { fill: var(--art-2); } .a3 { fill: var(--art-3); }
.a4 { fill: var(--art-4); } .a5 { fill: var(--art-5); } .a6 { fill: var(--art-6); }
.s1, .s2, .s4, .s6 { fill: none; }
.s1 { stroke: var(--art-1); } .s2 { stroke: var(--art-2); } .s4 { stroke: var(--art-4); } .s6 { stroke: var(--art-6); }
.a4.s6 { fill: var(--art-4); stroke: var(--art-6); }

.art-box { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--art-bg); }
.art-box::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); background-size: 160px; mix-blend-mode: multiply; opacity: .07; }
.art { display: block; width: 100%; height: auto; transform: translate3d(0, var(--py, 0px), 0); transition: scale .8s var(--ease); }

/* About: workspace photo with a small stat badge */
.about-media { position: relative; margin: 0; }
.about-media .frame-soft { border-radius: 999px 999px var(--radius-lg) var(--radius-lg); }
.about-media .frame-soft img { object-position: 50% 60%; transform: translate3d(0, var(--py, 0px), 0) scale(1.28); }
.about-stamp {
  position: absolute; right: calc(-1 * var(--s3)); bottom: var(--s6);
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3); border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 10px 30px -18px rgba(28, 26, 23, .45);
  font-size: .8125rem; line-height: 1.3; color: var(--ink-2);
}
.about-stamp strong { font-family: var(--serif); font-size: 2.25rem; font-weight: 400; line-height: 1; color: var(--accent); }

/* Journey: wide editorial photo under the heading */
.journey-banner { margin: 0 0 var(--s8); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 21 / 8; background: var(--sand); }
.journey-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; filter: sepia(.04) saturate(.95); transform: translate3d(0, var(--py, 0px), 0) scale(1.32); }

/* Hero: soft leaf shadows behind the photo (light mode only) */
.hero::before {
  content: ""; position: absolute; top: 0; right: 0; width: 62%; height: 100%;
  background: url("images/leaf-shadow.jpg?v=2") left top / cover no-repeat;
  transform: translate3d(0, var(--leaf, 0px), 0) scaleX(-1); opacity: .5; mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, #000 40%, transparent 95%);
  mask-image: linear-gradient(to right, #000 40%, transparent 95%);
}
.hero-grid, .ticker { position: relative; z-index: 1; }
/* Hero text glides up and fades as you scroll away (set by script.js) */
.hero-text { transform: translate3d(0, var(--lift, 0px), 0); opacity: var(--fade, 1); will-change: transform, opacity; }
:root[data-theme="dark"] .hero::before { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { display: none; } }

/* About: illustration + short text */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.about-art { margin: 0; aspect-ratio: 6 / 5; display: grid; place-items: center; }
.about-art .art { width: 92%; }

/* Skills, tech, services: picture first, then a few words */
.skill-art { margin-bottom: var(--s3); aspect-ratio: 2 / 1; }
.skill:hover .art, .tech-card:hover .art, .service:hover .art { scale: 1.04; }
.tech-art { margin-bottom: var(--s4); border-radius: var(--radius); }
.service-art { margin-bottom: var(--s3); aspect-ratio: 12 / 7; border-radius: var(--radius); }
.tl-sum { color: var(--ink-2); max-width: 56ch; }

/* Download CV links */
.cv-links { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s3); }
.journey-cv-btns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.cv-link { display: inline-flex; align-items: center; gap: var(--s1); font-size: .9375rem; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color .25s, border-color .25s; }
.cv-link span { font-weight: 400; color: var(--ink-2); }
.cv-link .icon { width: 18px; height: 18px; color: var(--accent); transition: transform .3s var(--ease); }
.cv-link:hover { color: var(--accent); border-color: var(--accent); }
.cv-link:hover .icon { transform: translateY(2px); }
.journey-cv { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-top: var(--s5); }
.journey-cv p { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }

/* ---------- Intro loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column; justify-content: space-between;
  padding-block: clamp(var(--s10), 18vh, var(--s20)) var(--s5);
  background: var(--cream); color: var(--ink);
  transition: transform .9s cubic-bezier(.76, 0, .24, 1);
}
html.is-loading .loader, .loader.leaving { display: flex; }
html.is-loading body { overflow: hidden; }
.loader.leaving { transform: translateY(-100%); }
/* hold the hero's entrance until the loader lifts */
html.is-loading .load, html.is-loading .char { animation-play-state: paused; }

.loader-eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s3); opacity: 0; animation: rise 500ms var(--ease) 100ms forwards; }
.loader-name { font-family: var(--serif); font-weight: 300; font-size: clamp(2.75rem, 9vw, 7.5rem); line-height: .98; letter-spacing: -.03em; max-width: 13ch; }
.loader-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.loader-word > span { display: inline-block; transform: translateY(105%); animation: word-up 800ms var(--ease) forwards; animation-delay: calc(150ms + var(--w) * 110ms); }
@keyframes word-up { to { transform: none; } }
.loader-role { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 500; color: var(--ink); opacity: 0; animation: rise 600ms var(--ease) 550ms forwards; }
.loader-dash { width: var(--s5); height: 1px; background: var(--accent); }

.loader-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); }
.loader-note { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-bottom: var(--s2); }
.loader-count { font-family: var(--serif); font-weight: 300; font-size: clamp(3.5rem, 12vw, 9rem); line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--accent); }
.loader-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.loader-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform 120ms linear; }

/* ---------- Night garden (dark mode extras, see night.js) ---------- */
.fireflies { position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.fireflies.on { opacity: 1; }

/* Lantern glow: warm light around the hero photo, breathing slowly */
.hero-media::after {
  content: ""; position: absolute; inset: -18% -22%; z-index: -2; pointer-events: none;
  background: radial-gradient(closest-side, rgba(242, 190, 112, .30), rgba(242, 190, 112, .10) 55%, transparent 75%);
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.arch::after { transition: opacity .8s; }
.night .hero-media::after { opacity: 1; animation: lantern 6s ease-in-out infinite; }
.night .arch { box-shadow: 0 0 0 1px rgba(242, 190, 112, .18), 0 30px 80px -30px rgba(242, 190, 112, .45); }
.night .arch img { filter: sepia(.14) saturate(.95) brightness(.92) contrast(1.04); }
@keyframes lantern { 50% { opacity: .65; transform: scale(.97); } }

/* Greeting swap: fade via text color (the entrance animation owns opacity) */
.hero-text .eyebrow { transition: color .25s var(--ease); }
.hero-text .eyebrow.swap { color: transparent; }

/* Night sounds button: only shown in dark mode */
.sound-toggle {
  display: none; align-items: center; gap: var(--s1);
  height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink); font: 500 .8125rem/1 var(--sans); cursor: pointer;
  transition: border-color .3s, background-color .3s, color .3s;
}
.night .sound-toggle { display: inline-flex; animation: rise 500ms var(--ease) both; }
.sound-toggle:hover { border-color: var(--ink); }
.sound-toggle .icon { width: 18px; height: 18px; }
.sound-toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.sound-bars { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.sound-bars i { width: 2px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.sound-bars i:nth-child(2) { animation-delay: -.4s; } .sound-bars i:nth-child(3) { animation-delay: -.8s; }
.sound-toggle[aria-pressed="true"] .sound-bars { display: inline-flex; }
.sound-toggle[aria-pressed="true"] .icon { display: none; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@media (max-width: 880px) { .sound-label { display: none; } .sound-toggle { width: 40px; padding: 0; justify-content: center; } }

/* Night sounds menu: Piano / Rain / Both */
.sound-wrap { position: relative; display: none; }
.night .sound-wrap { display: block; }
.sound-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 220px; padding: 8px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: grid; gap: 2px;
  transform-origin: top right; animation: menu-in .22s var(--ease) both;
}
.sound-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.sound-menu-title { margin: 4px 10px 6px; font: 500 .6875rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.sound-menu button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font: 500 .875rem/1.2 var(--sans); text-align: left; cursor: pointer; transition: background-color .2s;
}
.sound-menu button small { font-size: .75rem; font-weight: 400; color: var(--ink-2); }
.sound-menu button:hover, .sound-menu button:focus-visible { background: var(--accent-tint); outline: none; }
.sound-menu button[aria-checked="true"] { background: var(--accent); color: var(--cream); }
.sound-menu button[aria-checked="true"] small { color: inherit; opacity: .8; }
.sound-menu .sound-off { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--ink-2); }
.sound-menu .sound-off[hidden] { display: none; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto; z-index: 70; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- Letter-by-letter headline ---------- */
.hero-title.split-ready { animation: none; opacity: 1; transform: none; }
.word { display: inline-block; white-space: nowrap; }
.char { display: inline-block; opacity: 0; transform: translateY(.35em); animation: rise 420ms var(--ease) forwards; animation-delay: calc(40ms + var(--i) * 16ms); }

/* ---------- Click ripple + celebration ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; z-index: -1; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: currentColor; opacity: .22; pointer-events: none; animation: ripple 600ms var(--ease) forwards; }
@keyframes ripple { to { transform: scale(28); opacity: 0; } }
.burst { position: fixed; z-index: 90; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 2px; pointer-events: none; animation: burst 900ms cubic-bezier(.2, .6, .3, 1) forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.magnetic { transition: transform .35s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }

/* ---------- 3D tilt on project previews ---------- */
.browser { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), border-color .5s var(--ease); will-change: transform; }

/* ---------- Hero video slot ---------- */
.arch video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease); filter: sepia(.1) saturate(.92) contrast(1.03); }
.arch video.playing { opacity: 1; }

/* ---------- Guided assistant (chatbot) ---------- */
.chat-fab {
  position: fixed; right: var(--s3); bottom: var(--s3); z-index: 80;
  display: inline-flex; align-items: center; gap: var(--s1);
  height: 56px; padding: 0 var(--s3) 0 var(--s2); border: 0; border-radius: 999px;
  background: var(--accent); color: var(--cream); font: 600 .9375rem/1 var(--sans); cursor: pointer;
  box-shadow: 0 12px 32px -16px rgba(0,0,0,.45);
  transition: transform .4s var(--ease), background-color .3s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab .icon { width: 22px; height: 22px; }
.chat-fab[aria-expanded="true"] { transform: scale(.9); opacity: 0; pointer-events: none; }

.chat {
  position: fixed; right: var(--s3); bottom: var(--s3); z-index: 85;
  width: min(380px, calc(100vw - var(--s4))); height: min(560px, calc(100dvh - var(--s12)));
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.4);
  transform-origin: 100% 100%;
  opacity: 0; transform: translateY(12px) scale(.96); visibility: hidden;
  transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}
.chat.open { opacity: 1; transform: none; visibility: visible; transition: opacity .3s var(--ease), transform .4s var(--ease); }
.chat-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.chat-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--cream); font-family: var(--serif); font-size: .9375rem; flex: none; }
.chat-title { flex: 1; line-height: 1.3; }
.chat-title strong { display: block; font-size: .9375rem; }
.chat-title span { font-size: .75rem; color: var(--ink-2); }
.chat-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.chat-close:hover { background: var(--sand); }

.chat-log { flex: 1; overflow-y: auto; padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .9375rem; line-height: 1.55; animation: rise 300ms var(--ease) both; }
.msg-bot { align-self: flex-start; background: var(--sand); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--accent); color: var(--cream); border-bottom-right-radius: 4px; }
.msg p + p, .msg p + ul, .msg ul + p { margin-top: var(--s1); }
.msg ul { padding-left: var(--s2); list-style: disc; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s1); }
.msg-actions a, .msg-actions button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font: 600 .8125rem/1.2 var(--sans); cursor: pointer; }
.msg-actions a:hover, .msg-actions button:hover { border-color: var(--ink); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--s2) var(--s2); scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick button { flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 500 .8125rem/1 var(--sans); cursor: pointer; transition: background-color .25s, border-color .25s; }
.chat-quick button:hover { background: var(--sand); border-color: var(--ink-2); }
.chat-form { display: flex; gap: var(--s1); padding: var(--s2); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 44px; padding: 0 var(--s2); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--cream); color: var(--ink); font: inherit; font-size: .9375rem; }
.chat-form input::placeholder { color: var(--placeholder); }
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: var(--cream); cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .chat-fab { right: var(--s2); bottom: var(--s2); width: 56px; padding: 0; justify-content: center; }
  .chat-fab .fab-label { display: none; }
  .chat { right: var(--s1); left: var(--s1); bottom: var(--s1); width: auto; height: min(78dvh, 600px); }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .load, .reveal, .char, .msg, .loader-eyebrow, .loader-role, .loader-word > span { opacity: 1 !important; transform: none !important; }
  .loader.leaving { opacity: 0; }
  .browser { transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-text { grid-column: 1 / span 7; }
  .hero-media { grid-column: 8 / span 5; }
  .badge-float { left: calc(-1 * var(--s3)); }
  .skills { grid-template-columns: 1fr 1fr; }
  .skill:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .services { grid-template-columns: 1fr 1fr; }
  .service:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .service:nth-child(even) { padding-left: var(--s4); border-left: 1px solid var(--line); }
}

@media (max-width: 880px) {
  /* Hero: photo stacks above text */
  .hero-grid { grid-template-columns: 1fr; row-gap: var(--s6); }
  .hero-media { grid-column: 1; order: -1; width: min(78%, 360px); margin: 0 auto; }
  .hero-media::before { inset: var(--s2) calc(-1 * var(--s2)) calc(-1 * var(--s2)) var(--s2); }
  .badge-float { left: 50%; bottom: calc(-1 * var(--s2)); transform: translateX(-50%); animation: none; white-space: nowrap; }
  .hero-text { grid-column: 1; padding-bottom: 0; }
  .hero-title { font-size: clamp(3.25rem, 15vw, 5rem); }

  .split, .beyond, .contact, .log, .about { grid-template-columns: 1fr; }
  .about { gap: var(--s5); }
  .about-art, .about-media { width: min(100%, 400px); margin-inline: auto; }
  .about-stamp { right: var(--s2); bottom: var(--s3); }
  .journey-banner { aspect-ratio: 16 / 10; margin-bottom: var(--s6); }
  .hero::before { width: 100%; height: 70%; opacity: .4; }
  .split { gap: var(--s4); }
  .split .section-head { position: static; }
  .beyond-media { width: min(80%, 400px); margin-inline: auto; }
  .tech, .projects, .edu { grid-template-columns: 1fr; }
  .projects { gap: var(--s8); }
  .edu { gap: var(--s6); }
  .edu-wrap { grid-template-columns: 1fr; gap: var(--s6); }
  .edu-portrait { width: min(70%, 340px); margin-inline: auto; }
  .contact { gap: var(--s8); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero-actions .btn, .dm .btn { flex: 1 1 100%; }
  .facts, .skills, .services, .traits { grid-template-columns: 1fr; }
  .skill, .skill + .skill, .skill:nth-child(3) { padding: var(--s4) 0; border-left: 0; }
  .skill + .skill { border-top: 1px solid var(--line); }
  .service, .service:nth-child(even) { padding: var(--s4) 0; border-left: 0; }
  .service-photo { height: auto; aspect-ratio: 12 / 7; }
  .tl-item { grid-template-columns: 1fr; gap: var(--s2); padding-block: var(--s4); }
  .tl-when { flex-direction: row; align-items: center; }
  .tech-card { padding: var(--s4) var(--s3); }
  .tech-card .icon-lg { margin-bottom: var(--s5); }
  .log { padding: var(--s3); }
  .log-list li { grid-template-columns: 1fr auto; }
  .log-when { grid-column: 1 / -1; }
  .services-cta { padding: var(--s3); }
  .contact-links a { grid-template-columns: 1fr auto; }
  .contact-links span { grid-column: 1 / -1; }
  .form { padding: var(--s3); }
  .dialog-body { padding: var(--s3); }
}

/* ============ Visual upgrades: phone showcase, real screenshots, portrait band ============ */
/* Phone showcase (Projects) */
.showcase { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; margin-top: var(--s12); padding: var(--s8) var(--s8) 0; border-radius: var(--radius-lg); background: var(--sand); }
.showcase::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("images/leaf-shadow.jpg?v=2") right top / 60% auto no-repeat; mix-blend-mode: multiply; opacity: .35; -webkit-mask-image: linear-gradient(to right, transparent 40%, #000 75%); mask-image: linear-gradient(to right, transparent 40%, #000 75%); }
:root[data-theme="dark"] .showcase::before { display: none; }
.showcase-text { position: relative; padding-bottom: var(--s8); }
.showcase-text .eyebrow { margin-bottom: var(--s2); }
.showcase-text h3 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); font-weight: 350; line-height: 1.08; letter-spacing: -.01em; }
.showcase-text h3 em { color: var(--accent); }
.showcase-text > p:not(.eyebrow) { margin-top: var(--s2); color: var(--ink-2); max-width: 42ch; }
.showcase-list { display: grid; gap: 10px; margin-top: var(--s3); }
.showcase-list li { display: flex; align-items: center; gap: 10px; font-size: .9375rem; }
.showcase-list li::before { content: "✓"; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: .75rem; font-weight: 700; }
.showcase-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 2vw, 24px); padding-top: var(--s4); }
.phone { margin: 0; flex: 0 1 200px; aspect-ratio: 520 / 1125; padding: 2.6%; border-radius: 15% / 7%; background: #121210; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 40px 60px -30px rgba(28, 26, 23, .55); transform: translateY(12%); transition: transform .6s var(--ease); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 12.5% / 5.8%; background: var(--paper); }
.phone:nth-child(2) { flex-basis: 230px; transform: translateY(4%); z-index: 1; }
.showcase:hover .phone { transform: translateY(9%); }
.showcase:hover .phone:nth-child(2) { transform: translateY(1%); }

/* Real screenshots in the Tech section */
.tech-shot { margin: 0 0 var(--s4); }
.tech-shot img { width: 100%; aspect-ratio: 400 / 220; object-fit: cover; object-position: 50% 45%; border-radius: var(--radius); border: 1px solid var(--line-dark); background: rgba(246, 241, 233, .05); transition: transform .6s var(--ease); }
.tech-shot-chat img { object-position: 100% 30%; }
.tech-shot figcaption { margin-top: 10px; font-size: .8125rem; color: var(--on-dark-2); }
.tech-card:hover .tech-shot img { transform: translateY(-4px); }

/* Portrait band before Contact */
.note-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s10); align-items: center; }
.note-photo { margin: 0; aspect-ratio: 4 / 5; max-width: 440px; overflow: hidden; border-radius: 999px 999px var(--radius-lg) var(--radius-lg); background: #2a2a28; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.note-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.note-text .eyebrow { margin-bottom: var(--s3); }
.note-text blockquote { margin: 0; }
.note-text blockquote p { font-family: var(--serif); font-weight: 300; font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.2; letter-spacing: -.01em; color: var(--on-dark); max-width: 24ch; }
.note-sign { margin-top: var(--s4); font-size: .9375rem; color: var(--on-dark); }
.note-sign span { color: var(--on-dark-2); }
.note-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s5); }
.note-band .btn-solid { background: var(--on-dark); color: #1C1A17; }
.note-band .btn-solid:hover { background: #fff; }
.note-band .btn-outline { border-color: var(--line-dark); color: var(--on-dark); }
.note-band .btn-outline:hover { background: var(--on-dark); color: #1C1A17; border-color: var(--on-dark); }

@media (max-width: 880px) {
  .showcase { grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: var(--s5) var(--s4) 0; }
  .showcase-text { padding-bottom: 0; }
  .note-wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .note-photo { max-width: 340px; }
}
@media (max-width: 640px) {
  .showcase { margin-top: var(--s8); padding: var(--s4) var(--s3) 0; }
  .showcase::before { background-size: 100% auto; }
  .phone { flex-basis: 30%; }
  .phone:nth-child(2) { flex-basis: 34%; }
  .note-photo { max-width: 280px; }
}

/* CV Builder feature (Services) */
.cvb { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s6); align-items: center; margin-top: var(--s8); padding: var(--s6); border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.cvb-badge { display: inline-flex; align-items: center; gap: 10px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.cvb-badge span { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--cream); letter-spacing: .08em; }
.cvb h3 { margin-top: var(--s2); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 350; line-height: 1.08; letter-spacing: -.01em; }
.cvb h3 em { color: var(--accent); }
.cvb-text > p:not(.cvb-badge):not(.cvb-note) { margin-top: var(--s2); color: var(--ink-2); max-width: 46ch; }
.cvb-prices { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s3) 0; }
.cvb-prices li { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .875rem; color: var(--ink-2); }
.cvb-prices b { font-family: var(--serif); font-weight: 400; font-size: 1.125rem; color: var(--ink); }
.cvb .btn .icon { width: 18px; height: 18px; }
.cvb-note { margin-top: 12px; font-size: .8125rem; color: var(--ink-2); }
.cvb-free { display: flex; align-items: flex-start; gap: 10px; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--line); font-size: .9375rem; }
.cvb-free span { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.cvb-free a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cvb-free a:hover { color: var(--accent); }

/* Hero mission line */
.hero-mission { font-family: var(--serif); font-weight: 350; font-size: clamp(1.375rem, 2.4vw, 1.875rem); line-height: 1.2; letter-spacing: -.01em; color: var(--ink); margin-bottom: var(--s2); max-width: 22ch; }
.hero-mission em { color: var(--accent); }

/* How can I help (3 paths) */
.paths { padding: var(--s8) 0 var(--s4); }
.paths-title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: var(--s4); max-width: none; }
.paths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.path { display: flex; flex-direction: column; gap: 8px; padding: var(--s4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); transition: transform .4s var(--ease), border-color .3s, box-shadow .3s; }
.path:hover, .path:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 24px 40px -28px rgba(28, 26, 23, .4); }
.path-who { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.path h3 { font-size: clamp(1.375rem, 2vw, 1.625rem); font-weight: 400; line-height: 1.15; }
.path p { color: var(--ink-2); font-size: .9375rem; }
.path-go { margin-top: auto; padding-top: var(--s2); font-weight: 600; color: var(--accent); }

/* Rotating word in the hero intro */
.rot { display: inline-grid; vertical-align: bottom; overflow: hidden; color: var(--accent); font-weight: 600; }
.rot-word { display: inline-block; transition: transform .45s var(--ease), opacity .45s var(--ease); }
.rot-word.out { transform: translateY(-100%); opacity: 0; }
.rot-word.pre { transform: translateY(100%); opacity: 0; transition: none; }

/* Bento grid (How can I help) */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); gap: var(--s2); }
.bt { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: var(--s4); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); transition: transform .5s var(--ease), border-color .3s, box-shadow .4s var(--ease); }
a.bt:hover, a.bt:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 30px 50px -36px rgba(28, 26, 23, .45); }
.bt h3 { font-size: clamp(1.375rem, 2.1vw, 1.75rem); font-weight: 400; line-height: 1.12; max-width: 20ch; }
.bt h3 em { color: var(--accent); }
.bt p { color: var(--ink-2); font-size: .9375rem; max-width: 46ch; }
.bt .path-go { margin-top: auto; padding-top: var(--s1); }

.bt-biz { grid-column: 1 / span 3; grid-row: span 2; padding-bottom: 0; background: linear-gradient(160deg, var(--paper) 0%, var(--sand) 100%); }
.bt-biz h3 { font-size: clamp(1.875rem, 3.2vw, 2.75rem); max-width: 16ch; }
.bt-biz .path-go { margin-top: var(--s1); }
.bt-shot { margin: var(--s3) calc(-1 * var(--s4)) 0 auto; width: min(78%, 560px); border-radius: 14px 0 0 0; overflow: hidden; box-shadow: 0 -10px 40px -20px rgba(28, 26, 23, .35); transform: translateY(12px); transition: transform .6s var(--ease); }
.bt-shot img { display: block; width: 100%; height: auto; }
.bt-biz:hover .bt-shot { transform: translateY(0); }

.bt-speed { grid-column: 4; align-items: center; justify-content: center; text-align: center; background: var(--accent); border-color: var(--accent); }
.bt-speed p { color: var(--cream); opacity: .85; font-size: .8125rem; max-width: 20ch; }
.ring { width: 104px; height: 104px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: rgba(246, 241, 233, .18); }
.ring-fg { stroke: #B9C4A0; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.bt-speed.in .ring-fg { stroke-dashoffset: 5; }
.ring-wrap { position: relative; width: 104px; height: 104px; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 400; font-size: 1.75rem; color: var(--cream); }
:root[data-theme="dark"] .bt-speed { background: #2A3123; border-color: #2A3123; }
:root[data-theme="dark"] .bt-speed .ring-num, :root[data-theme="dark"] .bt-speed p { color: #F6F1E9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bt-speed { background: #2A3123; border-color: #2A3123; }
  :root:not([data-theme="light"]) .bt-speed .ring-num, :root:not([data-theme="light"]) .bt-speed p { color: #F6F1E9; }
}

.bt-world { grid-column: 4; }
.bt-clock { font-size: .875rem !important; color: var(--ink) !important; }
.bt-clock b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }

.bt-cv { grid-column: 1 / span 2; }
.mini-cvs { display: flex; gap: 10px; margin: var(--s1) 0 0; height: 82px; align-items: flex-end; }
.mini-cvs i { position: relative; width: 52px; height: 72px; border-radius: 4px; background: #fff; box-shadow: 0 8px 18px -10px rgba(28, 26, 23, .45), 0 0 0 1px rgba(28, 26, 23, .08); transition: transform .45s var(--ease); }
.mini-cvs i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 34%; border-radius: 4px 0 0 4px; background: var(--c); }
.mini-cvs i::after { content: ""; position: absolute; left: 42%; right: 10%; top: 12%; height: 4px; border-radius: 2px; background: var(--c); opacity: .9; box-shadow: 0 9px 0 -1px rgba(28,26,23,.18), 0 17px 0 -1px rgba(28,26,23,.14), 0 25px 0 -1px rgba(28,26,23,.14), 0 33px 0 -1px rgba(28,26,23,.1); }
.bt-cv:hover .mini-cvs i:nth-child(1) { transform: translateY(-8px) rotate(-6deg); }
.bt-cv:hover .mini-cvs i:nth-child(2) { transform: translateY(-12px) rotate(-3deg); }
.bt-cv:hover .mini-cvs i:nth-child(3) { transform: translateY(-14px); }
.bt-cv:hover .mini-cvs i:nth-child(4) { transform: translateY(-12px) rotate(3deg); }
.bt-cv:hover .mini-cvs i:nth-child(5) { transform: translateY(-8px) rotate(6deg); }

.bt-hire { grid-column: 3 / span 2; flex-direction: row; align-items: center; gap: var(--s3); }
.bt-hire > div { display: flex; flex-direction: column; gap: 6px; }
.bt-avatar { flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--cream), 0 0 0 5px var(--line-strong); }
.bt-hire p b { color: var(--ink); }

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-biz { grid-column: 1 / -1; grid-row: auto; }
  .bt-speed, .bt-world { grid-column: auto; }
  .bt-cv, .bt-hire { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bt { padding: var(--s3); }
  .bt-shot { margin-right: calc(-1 * var(--s3)); width: 92%; }
  .bt-hire { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ring-fg { transition: none; }
  .rot-word { transition: none; }
}

/* Proof strip */
.proof { padding: 0 0 var(--s10); }
.proof-title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: var(--s4); max-width: none; }
.proof-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: var(--s2); }
.proof-card { display: flex; flex-direction: column; gap: 6px; padding: var(--s3); border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.proof-card b { font-family: var(--serif); font-weight: 400; font-size: 2.25rem; line-height: 1; color: var(--accent); }
.proof-card p { font-size: .9375rem; color: var(--ink-2); }
.proof-card h3 { font-size: 1.25rem; font-weight: 400; }
.proof-icon { font-size: 1.75rem; line-height: 1; }
.proof-review { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.proof-review p b { font-family: inherit; font-size: inherit; font-weight: 700; color: var(--ink); }
.proof-review a, .proof-link { margin-top: auto; font-weight: 600; color: var(--accent); }
.proof-grid { grid-template-columns: 1fr 1fr 1fr 1.3fr; }

/* Email signup band */
.signup-band { background: var(--accent-tint); }
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: center; }
.signup-text h2 { margin: var(--s2) 0; }
.signup-text > p:not(.eyebrow) { color: var(--ink-2); max-width: 46ch; }
.signup-tips { margin-top: var(--s2); font-size: .9375rem; }
.signup-tips a { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; color: var(--ink); }
.signup-form { padding: var(--s4); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 30px 60px -40px rgba(28, 26, 23, .45); }
.signup-form > label:first-child { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
.signup-row { display: flex; gap: 8px; }
.signup-row input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--cream); color: var(--ink); font: inherit; }
.signup-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup-row .btn { white-space: nowrap; }
.signup-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--s2); font-size: .8125rem; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.signup-consent input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.signup-consent a { text-decoration: underline; }
.signup-status { min-height: 1.4em; margin-top: 10px; font-size: .875rem; color: var(--accent); }
.signup-status.bad { color: var(--error, #9B3D2C); }
.signup-done { display: grid; gap: var(--s2); outline: none; }
.signup-done .btn { justify-self: start; }
.signup-small { font-size: .8125rem; color: var(--ink-2); }

@media (max-width: 880px) {
  .paths-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signup { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
@media (max-width: 560px) {
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
  .signup-row { flex-direction: column; }
  .signup-form { padding: var(--s3); }
}
.cvb-shot { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgba(28, 26, 23, .45); transform: rotate(1.2deg); transition: transform .6s var(--ease); }
.cvb-shot img { width: 100%; height: auto; display: block; }
.cvb:hover .cvb-shot { transform: rotate(0deg) translateY(-4px); }
@media (max-width: 880px) {
  .cvb { grid-template-columns: minmax(0, 1fr); padding: var(--s4); }
  .cvb-shot { transform: none; }
}
@media (max-width: 640px) {
  .cvb { padding: var(--s3); margin-top: var(--s6); }
}

/* ---------- Homepage refocus (business clients) ---------- */
.hero-title { max-width: 12ch; font-size: clamp(2.75rem, 6.2vw, 5.5rem); line-height: .98; }
.hero-sub { margin-top: var(--s2); font-size: .875rem; color: var(--ink-2); }
.price-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px var(--s3); margin-top: var(--s2); }
.price-bar .promo-badge { margin: 0; }
.currency { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); }
.currency button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 600 .8125rem/1 var(--sans); cursor: pointer; }
.currency button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.currency button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.services-plain .service { padding-top: var(--s3); }
.proof-inline { margin-top: var(--s5); }
.about .section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); max-width: 20ch; }
.about-quote { margin: var(--s3) 0; padding-left: var(--s2); border-left: 2px solid var(--accent); }
.about-quote p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.45; font-style: italic; color: var(--ink); }
.paths-title { max-width: 22ch; }
/* ---------- Free preview: try it on the homepage ---------- */
.try { background: var(--sand); }
.try-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: var(--s8); align-items: center; }
.try h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); max-width: 17ch; margin-top: var(--s2); }
.try-lead { color: var(--ink-2); max-width: 50ch; margin: var(--s3) 0 var(--s4); }
.try-form { display: grid; gap: 10px; padding: var(--s4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 30px 60px -40px rgba(28, 26, 23, .35); }
.try-form label { display: grid; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--ink); }
.try-form label span { font-weight: 500; color: var(--ink-2); }
.try-form input, .try-form select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--cream); color: var(--ink); font: 500 1rem var(--sans); }
.try-form input:focus, .try-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.try-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.try-form .btn { margin-top: 8px; width: 100%; justify-content: center; }
.try-note { font-size: .8125rem; color: var(--ink-2); }
.try-samples { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.try-card { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); box-shadow: 0 24px 50px -30px rgba(28, 26, 23, .45); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.try-card:first-child { grid-column: 1 / -1; }
.try-card img { width: 100%; height: auto; aspect-ratio: 720 / 420; object-fit: cover; object-position: top; display: block; }
.try-card span { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(21, 22, 19, .82); color: #EDE7DB; font-size: .75rem; font-weight: 600; }
.try-card:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -30px rgba(28, 26, 23, .55); }
.try-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 880px) {
  .try-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
}
@media (max-width: 520px) { .try-row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .try-card { transition: none; } }