/* =====================================================================
   ADVAY GAHLOT — PORTFOLIO v3 · "Field Journal"
   An environment-themed design: parchment, forest and terracotta by day;
   deep forest and fireflies by night.

   01 Tokens (day + night)        09 Home
   02 Base                        10 Page hero + hills
   03 Type & utilities            11 Experience
   04 Buttons & links             12 Interests
   05 Chrome: veil, vine, toast   13 Projects (specimen cards) + dialog
   06 Header & menu               14 Sustainability (trail, calculator, checklist)
   07 Sections & cards            15 Contact · 16 Post · 17 Footer
   08 Hero (grass field)          18 Motion states · 19 Responsive · 20 Reduced motion · 21 Print
   ===================================================================== */

/* ---------------------------------------------------------------------
   01. TOKENS
   --------------------------------------------------------------------- */
:root {
  --bg: #f3efe4;
  --bg-2: #e9e3d3;
  --surface: #fbf9f3;
  --ink: #1d2a1e;
  --ink-2: #334233;
  --muted: #56624f;
  --line: rgba(29, 42, 30, 0.12);
  --line-2: rgba(29, 42, 30, 0.22);

  --moss: #2f5d3a;
  --leaf: #3f7a43;
  --sage: #a3b18a;
  --clay: #a64b24;
  --sun: #d9953f;
  --on-moss: #f5f1e6;
  --moss-soft: rgba(47, 93, 58, 0.1);
  --clay-soft: rgba(166, 75, 36, 0.1);
  --ph: #8a4a14;

  /* sky + scene colors (read by the Three.js scenes) */
  --sky-top: #cfe0d9;
  --sky-mid: #e8e6d6;
  --horizon: #efe9d8;
  --grass-base: #2b4a2a;
  --grass-tip: #9bbf6a;
  --ground: #2f4a2c;
  --glow: #fff6d6;
  --leaf-a: #6b8f3e;
  --leaf-b: #c27a3a;
  --leaf-c: #a3b18a;

  --shadow: 0 1px 2px rgba(29, 42, 30, 0.05), 0 18px 40px -22px rgba(29, 42, 30, 0.35);
  --shadow-lg: 0 40px 90px -40px rgba(29, 42, 30, 0.5);
  --glass: rgba(251, 249, 243, 0.78);

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --r-lg: 32px;
  --r: 22px;
  --r-sm: 14px;
  --organic: 42% 58% 54% 46% / 48% 44% 56% 52%;
  --nav-h: 80px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  color-scheme: light;
}

[data-theme="night"] {
  --bg: #0c140f;
  --bg-2: #101a13;
  --surface: #142018;
  --ink: #e6eee0;
  --ink-2: #c8d4c2;
  --muted: #9aab96;
  --line: rgba(230, 238, 224, 0.1);
  --line-2: rgba(230, 238, 224, 0.2);

  --moss: #86c78f;
  --leaf: #a4d69c;
  --sage: #7d8f6a;
  --clay: #e2906a;
  --sun: #f0c56e;
  --on-moss: #0c140f;
  --moss-soft: rgba(134, 199, 143, 0.12);
  --clay-soft: rgba(226, 144, 106, 0.12);
  --ph: #f0c56e;

  --sky-top: #070d14;
  --sky-mid: #0d1a1a;
  --horizon: #13211b;
  --grass-base: #0a150d;
  --grass-tip: #3c6a3c;
  --ground: #08110a;
  --glow: #ffd86b;
  --leaf-a: #4f7a3a;
  --leaf-b: #a8662f;
  --leaf-c: #6b7d58;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 40px 100px -35px rgba(0, 0, 0, 0.9);
  --glass: rgba(20, 32, 24, 0.78);
  color-scheme: dark;
}

/* ---------------------------------------------------------------------
   02. BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
body.no-scroll { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
figure, dl, dd { margin: 0; }
::selection { background: var(--moss); color: var(--on-moss); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 8px; }

/* Paper texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="night"] body::before { mix-blend-mode: screen; opacity: 0.2; }

/* ---------------------------------------------------------------------
   03. TYPE & UTILITIES
   --------------------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; font-variation-settings: "SOFT" 60, "WONK" 0; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
h1 em, h2 em, .title em { color: var(--moss); font-variation-settings: "SOFT" 100, "WONK" 1; }
.title { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1; letter-spacing: -0.03em; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow i { color: var(--leaf); }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 2000; padding: 0.75rem 1rem; border-radius: 12px; background: var(--moss); color: var(--on-moss); font-weight: 600; transition: top 0.3s var(--ease-out); }
.skip-link:focus { top: 1rem; }
.ph { color: var(--ph); font-style: normal; text-decoration: underline dashed color-mix(in srgb, var(--ph) 55%, transparent); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--leaf); animation: ping 2.2s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.3); opacity: 0; } }

/* ---------------------------------------------------------------------
   04. BUTTONS & LINKS
   --------------------------------------------------------------------- */
.btn {
  --py: 0.95rem;
  --px: 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: var(--py) var(--px);
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease-out), border-color 0.3s, transform 0.5s var(--ease-out), box-shadow 0.4s;
}
.btn::before {
  content: "";
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 50%);
  z-index: -1;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--clay);
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-out), height 0.6s var(--ease-out);
}
.btn:hover::before { width: 260%; height: 600%; }
.btn i { transition: transform 0.45s var(--ease-out); }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
.btn--primary { background: var(--moss); color: var(--on-moss); box-shadow: var(--shadow); }
.btn--primary:hover { color: #fff; }
[data-theme="night"] .btn--primary:hover { color: #0c140f; }
.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { color: #fff; border-color: var(--clay); }
[data-theme="night"] .btn--ghost:hover { color: #0c140f; }
.btn--sm { --py: 0.62rem; --px: 1.1rem; font-size: 0.87rem; }

.link { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--moss); }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor; transform: scaleX(0.3); transform-origin: left; opacity: 0.5; transition: transform 0.5s var(--ease-out), opacity 0.3s; }
.link:hover::after { transform: scaleX(1); opacity: 1; }
.link i { font-size: 0.8em; transition: transform 0.4s var(--ease-out); }
.link:hover i { transform: translate(2px, -2px); }

.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: transform 0.5s var(--ease-out), border-color 0.3s; }
.icon-btn:hover { transform: rotate(-15deg); border-color: var(--moss); }

/* ---------------------------------------------------------------------
   05. CHROME — page transition "veil", first-visit sprout, scroll vine
   --------------------------------------------------------------------- */
.veil { position: fixed; inset: 0; z-index: 1500; pointer-events: none; }
.veil svg { width: 100%; height: 100%; }
.veil path { fill: var(--moss); }
.veil__sprout { position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 1rem; color: var(--on-moss); }
.first-visit .veil__sprout { display: grid; }
.veil__sprout svg { width: 90px; height: 120px; overflow: visible; }
.veil__sprout path { fill: none; stroke: var(--on-moss); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.veil__sprout .leafy { fill: var(--on-moss); stroke: none; transform-box: fill-box; transform-origin: 0% 100%; transform: scale(0); }
.veil__sprout p { margin: 0; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.no-js .veil, .veil.is-gone { display: none; }
/* Failsafe: never let the veil block the page */
.js .veil { animation: veil-failsafe 0s 5s forwards; }
.js body.is-leaving .veil { animation: none; display: block; }
@keyframes veil-failsafe { to { visibility: hidden; } }

.vine { position: fixed; left: max(12px, (100vw - var(--container)) / 2 - 76px); top: 10vh; bottom: 10vh; z-index: 40; width: 44px; pointer-events: none; display: none; }
@media (min-width: 1380px) { .vine { display: block; } }
.vine svg { width: 100%; height: 100%; overflow: visible; }
.vine__stem { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linecap: round; opacity: 0.75; }
.vine__track { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 6; }
.vine__leaf { fill: var(--leaf); transform-box: fill-box; transform-origin: 0% 50%; transform: scale(0); transition: transform 0.7s var(--ease-out); }
.vine__leaf.is-on { transform: scale(1); }
.vine__bud { fill: var(--clay); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 1700; display: flex; align-items: center; gap: 0.7rem; max-width: calc(100% - 2rem); padding: 0.85rem 1.15rem; border-radius: 16px; background: var(--moss); color: var(--on-moss); font-size: 0.92rem; box-shadow: var(--shadow-lg); transform: translate(-50%, 180%); visibility: hidden; transition: transform 0.6s var(--ease-out), visibility 0s 0.6s; }
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform 0.6s var(--ease-out); }

.to-top { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 150; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--moss); opacity: 0; visibility: hidden; translate: 0 16px; transition: opacity 0.4s, visibility 0.4s, translate 0.5s var(--ease-out); }
.to-top.is-visible { opacity: 1; visibility: visible; translate: 0 0; }
.to-top svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.to-top circle { fill: none; stroke: var(--leaf); stroke-width: 2; stroke-linecap: round; }

/* ---------------------------------------------------------------------
   06. HEADER & MENU
   --------------------------------------------------------------------- */
.header { position: fixed; inset: 0 0 auto; z-index: 200; padding-top: 14px; pointer-events: none; transition: transform 0.6s var(--ease-out); }
.header.is-hidden { transform: translateY(-130%); }
.nav { display: flex; align-items: center; gap: 1rem; height: 62px; padding: 0 0.5rem 0 0.9rem; border-radius: 999px; border: 1px solid transparent; pointer-events: auto; transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s; }
.header.is-scrolled .nav { background: var(--glass); border-color: var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.brand__mark { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50% 50% 50% 12%; background: var(--moss); color: var(--on-moss); font-family: var(--font-serif); font-size: 1rem; font-weight: 600; transition: transform 0.7s var(--ease-out), border-radius 0.7s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-12deg); border-radius: 12% 50% 50% 50%; }
.brand__name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.brand__name small { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.nav__links { display: flex; gap: 0.15rem; list-style: none; }
.nav__links a { position: relative; display: block; padding: 0.5rem 0.85rem; font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 0.3s; }
.nav__links a::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50% 0 50% 0; background: var(--leaf); transform: scale(0) rotate(45deg); transition: transform 0.5s var(--ease-out); }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after, .nav__links a:hover::after { transform: scale(1) rotate(45deg); }
.nav__tools { display: flex; align-items: center; gap: 0.45rem; }
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle i { position: absolute; transition: transform 0.7s var(--ease-out), opacity 0.4s; }
.theme-toggle .fa-moon { transform: translateY(150%) rotate(-40deg); opacity: 0; }
[data-theme="night"] .theme-toggle .fa-sun { transform: translateY(-150%) rotate(60deg); opacity: 0; }
[data-theme="night"] .theme-toggle .fa-moon { transform: none; opacity: 1; }
.nav__menu { display: none; }
.nav__menu span { display: block; width: 16px; height: 1.5px; margin: 2px 0; border-radius: 2px; background: currentColor; transition: transform 0.5s var(--ease-out); }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.mmenu { position: fixed; inset: 0; z-index: 190; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: calc(var(--nav-h) + 1.5rem) var(--gutter) 2rem; background: var(--bg); overflow-y: auto; visibility: hidden; clip-path: circle(0% at calc(100% - 3rem) 3rem); transition: clip-path 0.9s var(--ease-io), visibility 0s 0.9s; }
.mmenu.is-open { visibility: visible; clip-path: circle(150% at calc(100% - 3rem) 3rem); transition: clip-path 0.9s var(--ease-io), visibility 0s; }
.mmenu ul { list-style: none; }
.mmenu li { border-bottom: 1px solid var(--line); overflow: hidden; }
.mmenu__link { display: flex; justify-content: space-between; align-items: baseline; padding: 0.9rem 0; font-family: var(--font-serif); font-size: clamp(2rem, 9vw, 3rem); letter-spacing: -0.02em; transform: translateY(105%); transition: transform 0.8s var(--ease-out), color 0.3s; }
.mmenu__link small { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.mmenu__link.is-active { color: var(--moss); font-style: italic; }
.mmenu.is-open .mmenu__link { transform: none; }
.mmenu.is-open li:nth-child(2) .mmenu__link { transition-delay: 0.05s; }
.mmenu.is-open li:nth-child(3) .mmenu__link { transition-delay: 0.1s; }
.mmenu.is-open li:nth-child(4) .mmenu__link { transition-delay: 0.15s; }
.mmenu.is-open li:nth-child(5) .mmenu__link { transition-delay: 0.2s; }
.mmenu.is-open li:nth-child(6) .mmenu__link { transition-delay: 0.25s; }
.mmenu__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

/* ---------------------------------------------------------------------
   07. SECTIONS & CARDS
   --------------------------------------------------------------------- */
.section { position: relative; padding-block: clamp(5rem, 11vw, 9rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--sand { background: var(--bg-2); }
.section--forest { background: #1d3322; color: #eef2e6; }
.section--forest .muted, .section--forest .lead, .section--forest .eyebrow { color: rgba(238, 242, 230, 0.75); }
.section--forest h2 em, .section--forest .title em { color: #b9d98f; }
.section--forest .card { color: var(--ink); }
[data-theme="night"] .section--forest { background: #0f2016; }

/* Organic section edges */
.wave-top::before { content: ""; position: absolute; left: 0; right: 0; top: -39px; height: 40px; background: inherit; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C180 2 360 0 540 14s360 30 540 16 270-26 360-22v10z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C180 2 360 0 540 14s360 30 540 16 270-26 360-22v10z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }

.sec-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 1.5rem 4rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head .lead { justify-self: end; max-width: 44ch; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.7s var(--ease-out), box-shadow 0.5s, border-color 0.4s, border-radius 0.7s var(--ease-out);
}
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px circle at var(--mx) var(--my), var(--moss-soft), transparent 55%); opacity: 0; transition: opacity 0.4s; }
.card:hover::before { opacity: 1; }
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-2); border-radius: 10px var(--r-lg) var(--r-lg) var(--r-lg); }
.card :where(h3) { font-size: 1.35rem; margin-bottom: 0.5rem; }
.card :where(p) { color: var(--muted); font-size: 0.97rem; }
.card__icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 1.3rem; border-radius: var(--organic); background: var(--moss-soft); color: var(--moss); font-size: 1.1rem; transition: transform 0.7s var(--ease-out), border-radius 0.7s var(--ease-out); }
.card:hover .card__icon { transform: rotate(-12deg) scale(1.08); border-radius: 50%; }
.card__num { position: absolute; top: 1.3rem; right: 1.5rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: var(--moss-soft); color: var(--ink); font-size: 0.86rem; transition: transform 0.4s var(--ease-out), background-color 0.3s; }
.chip:hover { transform: translateY(-2px) rotate(-1deg); background: var(--clay-soft); }
.chip i { color: var(--leaf); font-size: 0.8em; }
.tag { display: inline-flex; align-items: center; padding: 0.28rem 0.65rem; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50% 0 50% 0; background: currentColor; }
.status--live { color: var(--leaf); }
.status--wip { color: var(--clay); }
.status--plan { color: var(--muted); }
.note { display: flex; gap: 0.8rem; padding: 1rem 1.2rem; border-radius: var(--r-sm); border: 1px dashed var(--line-2); background: var(--moss-soft); font-size: 0.92rem; color: var(--ink-2); }
.note i { margin-top: 0.25rem; color: var(--moss); }
.bullets { display: grid; gap: 0.5rem; list-style: none; margin-top: 1rem; }
.bullets li { position: relative; padding-left: 1.4rem; color: var(--muted); font-size: 0.96rem; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-radius: 50% 0 50% 0; background: var(--leaf); }

/* ---------------------------------------------------------------------
   08. HERO — sky, sun/moon, 3D grass field
   --------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--nav-h) + 2rem) 0 clamp(9rem, 27vh, 17rem); overflow: hidden; background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--horizon) 70%, var(--horizon) 100%); transition: background 0.8s var(--ease); }
.hero .webgl { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s var(--ease); }
.hero .webgl.is-ready { opacity: 1; }
.hero__orb { position: absolute; right: 12%; top: 18%; z-index: -2; width: clamp(110px, 14vw, 190px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3cf, #f2c878 60%, #e6a84c); box-shadow: 0 0 120px 40px rgba(242, 200, 120, 0.35); transition: background 0.8s, box-shadow 0.8s; }
[data-theme="night"] .hero__orb { background: radial-gradient(circle at 38% 38%, #fbf7ea, #d9dccd 60%, #aeb3a2); box-shadow: 0 0 90px 20px rgba(220, 230, 210, 0.18); }
.hero__stars { position: absolute; inset: 0 0 45% 0; z-index: -3; opacity: 0; transition: opacity 1s; background-image: radial-gradient(1.5px 1.5px at 12% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 10%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 48% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 66% 14%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 84% 36%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 92% 8%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 44%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 6%, #fff 50%, transparent 51%); }
[data-theme="night"] .hero__stars { opacity: 0.8; }
.hero__content { max-width: 880px; }
.hero__badge { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; padding: 0.45rem 1rem 0.45rem 0.8rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 0.88rem; }
.hero__title { margin-bottom: 1.4rem; font-size: clamp(3.6rem, 11vw, 9.5rem); font-weight: 400; line-height: 0.9; letter-spacing: -0.045em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.hero__title .line { display: block; overflow: hidden; padding: 0 0.1em 0.08em 0; margin-right: -0.1em; }
.hero__title .line--2 { padding-left: clamp(0rem, 7vw, 6rem); }
.hero__title em { color: var(--moss); }
.char { display: inline-block; will-change: transform; }
.hero__tag { margin-bottom: 1rem; font-family: var(--font-serif); font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-style: italic; color: var(--ink-2); }
.rotator { position: relative; display: inline-flex; height: 1.2em; overflow: hidden; vertical-align: bottom; }
.rotator__word { display: inline-block; color: var(--clay); font-style: italic; line-height: 1.15; }
.hero__intro { max-width: 54ch; margin-bottom: 2rem; color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.12rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero__foot { position: absolute; left: 0; right: 0; bottom: 1.5rem; z-index: 2; }
.hero__foot .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245, 241, 230, 0.92); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45); }
.hero__foot span { display: inline-flex; align-items: center; gap: 0.5rem; }
.scroll-leaf { display: inline-flex; align-items: center; gap: 0.6rem; }
.scroll-leaf i { animation: leaf-bob 2.4s var(--ease-io) infinite; }
@keyframes leaf-bob { 0%, 100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(6px) rotate(12deg); } }

/* ---------------------------------------------------------------------
   09. HOME
   --------------------------------------------------------------------- */
.marquee { overflow: hidden; padding-block: 1.4rem; background: var(--moss); color: var(--on-moss); }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; }
.marquee__item { font-family: var(--font-serif); font-size: clamp(1.4rem, 3vw, 2.3rem); white-space: nowrap; }
.marquee__item:nth-child(4n + 3) { font-style: italic; opacity: 0.85; }
.marquee__sep { font-size: 1rem; opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }

.about { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.portrait { position: relative; max-width: 440px; }
.portrait__blob { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 46% 54% 42% 58% / 38% 40% 60% 62%; background: var(--bg-2); box-shadow: var(--shadow-lg); animation: blob 16s var(--ease-io) infinite alternate; }
.portrait__blob img { width: 100%; height: 100%; object-fit: cover; }
@keyframes blob { 50% { border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%; } 100% { border-radius: 40% 60% 48% 52% / 55% 38% 62% 45%; } }
.portrait__tag { position: absolute; z-index: 2; display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1rem; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 0.85rem; line-height: 1.3; }
.portrait__tag strong { display: block; font-size: 0.95rem; }
.portrait__tag small { color: var(--muted); }
.portrait__tag i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--organic); background: var(--moss); color: var(--on-moss); }
.portrait__tag--1 { left: -1.5rem; bottom: 12%; }
.portrait__tag--2 { right: -1.5rem; top: 8%; }
.about__title { margin-bottom: 1.5rem; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -0.025em; }
.about__text p { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2rem; margin: 2rem 0; padding-top: 1.75rem; border-top: 1px dashed var(--line-2); }
.facts dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-weight: 600; }

/* Growth rings stats */
.rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.ring { position: relative; display: grid; justify-items: center; text-align: center; gap: 0.75rem; }
.ring__svg { width: min(100%, 180px); aspect-ratio: 1; }
.ring__svg circle { fill: none; stroke: var(--line-2); stroke-width: 1; }
.ring__svg circle.is-grow { stroke: var(--leaf); stroke-width: 1.5; stroke-dasharray: 4 5; }
.ring__svg .ring__core { fill: var(--moss-soft); stroke: none; }
.ring__center { position: absolute; top: 0; left: 50%; display: grid; place-content: center; width: min(100%, 180px); aspect-ratio: 1; transform: translateX(-50%); }
.ring__num { font-family: var(--font-serif); font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--moss); font-variant-numeric: tabular-nums; }
.ring__label { max-width: 20ch; font-size: 0.92rem; color: var(--muted); }
.ring__svg g { transform-origin: 50% 50%; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.quote { font-family: var(--font-serif); font-size: clamp(1.9rem, 4.4vw, 3.6rem); font-weight: 400; line-height: 1.16; letter-spacing: -0.02em; max-width: 22ch; }
.quote em { color: #b9d98f; }
.scrub-word { opacity: 0.2; transition: opacity 0.25s linear; }

.paths { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.path { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; min-height: 250px; padding: 1.5rem; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; isolation: isolate; transition: color 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.path::before { content: ""; position: absolute; left: 50%; bottom: -30%; z-index: -1; width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--moss); transform: translateX(-50%) scale(0); transition: transform 0.8s var(--ease-out); }
.path:hover::before, .path:focus-visible::before { transform: translateX(-50%) scale(9); }
.path:hover, .path:focus-visible { color: var(--on-moss); transform: translateY(-6px); }
.path:hover .muted, .path:focus-visible .muted { color: var(--on-moss); opacity: 0.85; }
.path__num { font-family: var(--font-mono); font-size: 0.76rem; }
.path__title { display: block; margin-bottom: 0.4rem; font-family: var(--font-serif); font-size: 1.7rem; letter-spacing: -0.02em; }
.path__icon { position: absolute; top: 1.4rem; right: 1.4rem; font-size: 1.1rem; color: var(--leaf); transition: transform 0.6s var(--ease-out), color 0.4s; }
.path:hover .path__icon { transform: rotate(-20deg) scale(1.2); color: var(--on-moss); }

/* ---------------------------------------------------------------------
   10. PAGE HERO + PARALLAX HILLS
   --------------------------------------------------------------------- */
.phero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--nav-h) + clamp(3.5rem, 9vw, 7rem)) 0 clamp(7rem, 14vw, 11rem); background: linear-gradient(180deg, var(--sky-top), var(--sky-mid) 60%, var(--horizon)); }
.phero .webgl { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s var(--ease); pointer-events: none; }
.phero .webgl.is-ready { opacity: 1; }
.crumbs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; list-style: none; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; opacity: 0.5; }
.crumbs a:hover { color: var(--ink); }
.phero__title { max-width: 13ch; margin-bottom: 1.5rem; font-size: clamp(3rem, 8.5vw, 7rem); font-weight: 400; line-height: 0.95; letter-spacing: -0.04em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
.phero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; }
.hills { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; height: clamp(90px, 14vw, 170px); pointer-events: none; }
.hills svg { position: absolute; left: -5%; bottom: 0; width: 110%; max-width: none; height: 100%; }
.hills .h1 { fill: var(--sage); opacity: 0.55; }
.hills .h2 { fill: var(--leaf); opacity: 0.55; }
.hills .h3 { fill: var(--bg); }
[data-theme="night"] .hills .h1 { fill: #1d3322; opacity: 0.9; }
[data-theme="night"] .hills .h2 { fill: #16281b; opacity: 1; }
.phero .container { position: relative; z-index: 1; }

/* Split words (made by JS) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.1em 0.12em 0; margin: 0 -0.1em -0.12em 0; }
.w__inner { display: inline-block; will-change: transform; }

/* ---------------------------------------------------------------------
   11. EXPERIENCE
   --------------------------------------------------------------------- */
.growth { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.trunk { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; }
.trunk svg { width: 100%; height: 100%; overflow: visible; }
.trunk circle { fill: none; stroke: var(--sage); stroke-width: 10; opacity: 0.35; }
.trunk circle.is-done { stroke: var(--leaf); opacity: 0.9; }
.trunk circle.is-now { stroke: var(--clay); opacity: 1; stroke-width: 6; stroke-dasharray: 2 7; stroke-linecap: round; }
.trunk circle.core { fill: var(--moss); stroke: none; opacity: 1; }
.trunk__labels { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--on-moss); pointer-events: none; }
.trunk__labels b { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 500; line-height: 1; }
.trunk__labels small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.ring-legend { display: grid; gap: 0.6rem; list-style: none; margin-top: 1.5rem; }
.ring-legend li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.ring-legend i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--sage); opacity: 0.6; flex: none; }
.ring-legend .done i { border-color: var(--leaf); opacity: 1; }
.ring-legend .now i { border-color: var(--clay); border-style: dashed; opacity: 1; }

.xp { padding-top: clamp(4rem, 8vw, 6.5rem); scroll-margin-top: 110px; }
.xp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 3rem; margin-bottom: 2.25rem; }
.xp-head h2 { font-size: clamp(2rem, 4.5vw, 3.3rem); letter-spacing: -0.03em; }
.xp-head p { max-width: 50ch; margin: 0; color: var(--muted); }

.stem { position: relative; list-style: none; padding-left: 3rem; }
.stem::before, .stem__grow { content: ""; position: absolute; left: 14px; top: 0.5rem; bottom: 0.5rem; width: 3px; border-radius: 3px; background: var(--line-2); }
.stem__grow { background: var(--leaf); transform-origin: top; transform: scaleY(0); }
.stem__item { position: relative; padding-bottom: 1.5rem; }
.stem__item:last-child { padding-bottom: 0; }
.stem__leaf { position: absolute; left: -3rem; top: 1.7rem; width: 31px; height: 20px; }
.stem__leaf svg { width: 100%; height: 100%; overflow: visible; }
.stem__leaf path { fill: var(--leaf); transform-origin: 0 50%; transform: scale(0.2) rotate(-40deg); transition: transform 0.9s var(--ease-out), fill 0.4s; }
.stem__item.is-open .stem__leaf path { transform: scale(1) rotate(0); }
.stem__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--clay); }
.stem__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.3rem; }
.stem__org { margin-bottom: 0.5rem; color: var(--muted); font-weight: 500; }

.table-card { padding: 0; overflow-x: auto; }
.skills-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.skills-table caption { padding: 1.25rem 1.5rem 0; text-align: left; color: var(--muted); font-size: 0.88rem; }
.skills-table th, .skills-table td { padding: 1rem 1.5rem; border-bottom: 1px dashed var(--line); text-align: left; }
.skills-table thead th { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.skills-table tbody tr:last-child > * { border-bottom: 0; }
.skills-table th[scope="row"] { font-weight: 600; }
.skills-table tbody tr { transition: background-color 0.3s; }
.skills-table tbody tr:hover { background: var(--moss-soft); }

.course { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.course__code { padding: 0.3rem 0.55rem; border-radius: 8px; background: var(--moss-soft); font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.course h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }

.ledger { list-style: none; }
.ledger li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1.2rem 0.25rem; border-bottom: 1px dashed var(--line-2); transition: padding 0.5s var(--ease-out); }
.ledger li:hover { padding-inline: 0.9rem; }
.ledger__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--organic); background: var(--moss-soft); color: var(--moss); }
.ledger h3 { font-size: 1.12rem; margin-bottom: 0.1rem; }
.ledger p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.ledger__yr { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }

.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.stage { display: flex; flex-direction: column; }
.stage__art { display: grid; place-items: end center; height: 110px; margin: -0.5rem 0 1rem; }
.stage__art svg { width: 132px; height: 110px; overflow: visible; }
.stage__art .soil { fill: var(--clay); opacity: 0.35; }
.stage__art .plant { fill: var(--leaf); }
.stage__art .stalk { fill: none; stroke: var(--moss); stroke-width: 3; stroke-linecap: round; }
.stage__when { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay); margin-bottom: 0.5rem; }

/* ---------------------------------------------------------------------
   12. INTERESTS
   --------------------------------------------------------------------- */
.pebbles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(220px, auto); gap: clamp(1rem, 2vw, 1.4rem); }
.pebble { display: flex; flex-direction: column; justify-content: flex-end; padding: 1.6rem; border-radius: var(--organic); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; isolation: isolate; transition: border-radius 1s var(--ease-out), transform 0.7s var(--ease-out), box-shadow 0.5s; }
.pebble:nth-child(2n) { border-radius: 58% 42% 46% 54% / 44% 56% 44% 56%; }
.pebble:nth-child(3n) { border-radius: 38% 62% 56% 44% / 58% 42% 58% 42%; }
.pebble:hover { border-radius: 30px; transform: translateY(-6px) rotate(-1deg); box-shadow: var(--shadow-lg); }
.pebble--wide { grid-column: span 2; border-radius: 120px 40px 120px 40px !important; }
.pebble--wide:hover { border-radius: 40px 120px 40px 120px !important; }
.pebble--moss { background: var(--moss); color: var(--on-moss); border-color: transparent; }
.pebble.pebble--moss p { color: var(--on-moss); }
.pebble--moss .ph { color: inherit; }
.pebble__icon { position: absolute; top: 1.4rem; left: 1.6rem; font-size: 1.5rem; color: var(--leaf); transition: transform 0.7s var(--ease-out); }
.pebble--moss .pebble__icon { color: #b9d98f; }
.pebble:hover .pebble__icon { transform: rotate(-15deg) scale(1.15); }
.pebble h3 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.pebble p { margin: 0; font-size: 0.93rem; color: var(--muted); }

.notebook { position: relative; padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4.5rem); border-radius: 10px var(--r-lg) var(--r-lg) 10px; background: var(--surface) repeating-linear-gradient(180deg, transparent 0 39px, var(--line) 39px 40px); box-shadow: var(--shadow); }
.notebook::before { content: ""; position: absolute; left: clamp(1.8rem, 4vw, 3rem); top: 0; bottom: 0; width: 1.5px; background: color-mix(in srgb, var(--clay) 45%, transparent); }
.notebook h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
.notebook dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.notebook dl div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: baseline; gap: 1rem; min-height: 40px; padding-top: 8px; }
.notebook dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.notebook dd { font-family: var(--font-serif); font-style: italic; font-size: 1.12rem; }

.leafcard { display: block; width: 100%; perspective: 1200px; text-align: left; }
.leafcard__inner { position: relative; display: block; min-height: 250px; transform-style: preserve-3d; transition: transform 1s var(--ease-out); }
.leafcard.is-flipped .leafcard__inner { transform: rotateY(180deg); }
@media (hover: hover) and (pointer: fine) { .leafcard:hover .leafcard__inner { transform: rotateY(180deg); } }
.leafcard__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 1.6rem; border-radius: 60px 10px 60px 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.leafcard__face--back { transform: rotateY(180deg); background: var(--moss); color: var(--on-moss); border-color: transparent; }
.leafcard__face--back .ph { color: inherit; }
.leafcard__emoji { font-size: 2.6rem; line-height: 1; }
.leafcard__q { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.15; }
.leafcard__hint { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.leafcard__a { font-size: 1.05rem; font-weight: 500; line-height: 1.45; }

.values { list-style: none; border-top: 1px dashed var(--line-2); }
.value { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: center; padding: clamp(1.4rem, 3vw, 2.1rem) 0; border-bottom: 1px dashed var(--line-2); }
.value__num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.value__word { font-family: var(--font-serif); font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.03em; transition: color 0.5s, font-variation-settings 0.8s var(--ease-out); font-variation-settings: "SOFT" 0, "WONK" 0; }
.value:hover .value__word { color: var(--moss); font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.value p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------------
   13. PROJECTS — specimen cards
   --------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.05rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 0.9rem; font-weight: 500; color: var(--muted); transition: all 0.35s var(--ease-out); }
.filter:hover { color: var(--ink); border-color: var(--moss); }
.filter[aria-pressed="true"] { background: var(--moss); color: var(--on-moss); border-color: var(--moss); }
.filter small { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.75; }
.search { position: relative; display: flex; align-items: center; min-width: min(100%, 280px); }
.search i { position: absolute; left: 1rem; color: var(--muted); font-size: 0.85rem; }
.search input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.4rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 4px var(--moss-soft); }

.specimens { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.specimen { display: flex; flex-direction: column; padding: 0; }
.specimen[hidden] { display: none; }
.specimen__art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--hue) 55%, transparent), transparent 60%), radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--hue) 35%, transparent), transparent 55%), var(--bg-2); }
.specimen__art::before { content: ""; position: absolute; inset: 0; opacity: 0.35; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='100' viewBox='0 0 160 100'%3E%3Cpath d='M0 50 Q40 20 80 50 T160 50' fill='none' stroke='%232f5d3a' stroke-opacity='.35'/%3E%3Cpath d='M40 35 L55 50 M80 50 L95 30 M120 38 L130 52' stroke='%232f5d3a' stroke-opacity='.35' fill='none'/%3E%3C/svg%3E") repeat; transition: transform 1.2s var(--ease-out); }
.specimen:hover .specimen__art::before { transform: scale(1.15) translateX(-4%); }
.specimen__icon { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: var(--organic); background: var(--surface); color: var(--hue); font-size: 2rem; box-shadow: var(--shadow); transition: transform 0.8s var(--ease-out), border-radius 0.8s var(--ease-out); }
.specimen:hover .specimen__icon { transform: rotate(-10deg) scale(1.08); border-radius: 50%; }
.specimen__no { position: absolute; left: 1rem; top: 0.9rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.specimen__body { display: flex; flex-direction: column; flex: 1; gap: 0.8rem; padding: 1.4rem 1.5rem 1.5rem; }
.specimen__meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.specimen h3 { margin: 0; font-size: 1.45rem; }
.specimen__credit { font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; }
.tools li { padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--moss-soft); font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-2); }
.specimen__links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.specimen__details { display: none; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }

.dialog { width: min(780px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; }
.dialog::backdrop { background: rgba(12, 20, 15, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog__close { position: absolute; top: 1rem; right: 1rem; z-index: 2; }
.dialog .specimen__art { aspect-ratio: 21 / 8; }
.dialog__body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.dialog__body h2 { margin: 0.8rem 0 0.8rem; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.dialog__body p { color: var(--muted); }
.pai { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin: 1.5rem 0; }
.pai div { padding: 1rem; border-radius: var(--r-sm); background: var(--moss-soft); }
.pai h3 { margin-bottom: 0.35rem; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--moss); }
.pai p { margin: 0; font-size: 0.9rem; color: var(--ink-2); }

.posts { list-style: none; border-top: 1px dashed var(--line-2); }
.post { position: relative; display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; padding: 1.5rem 0.4rem; border-bottom: 1px dashed var(--line-2); transition: padding 0.5s var(--ease-out); }
.post:hover, .post:focus-within { padding-inline: 1.1rem; }
.post__date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.post h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.25rem; }
.post h3 a::after { content: ""; position: absolute; inset: 0; }
.post p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.post__arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--organic); background: var(--moss-soft); color: var(--moss); transition: transform 0.6s var(--ease-out), border-radius 0.6s; }
.post:hover .post__arrow { transform: rotate(-45deg); border-radius: 50%; }

/* ---------------------------------------------------------------------
   14. SUSTAINABILITY
   --------------------------------------------------------------------- */
.trail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: clamp(1rem, 2vw, 1.3rem); counter-reset: marker; }
.trail .card { display: flex; flex-direction: column; }
.marker { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 1rem; border-radius: 50%; border: 2px dashed var(--leaf); font-family: var(--font-mono); font-size: 0.78rem; color: var(--moss); }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 0; padding: 0; }
.calc__inputs { display: grid; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 2.5rem); }
.calc__out { display: grid; align-content: center; gap: 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--moss); color: var(--on-moss); }
.calc__out p { color: var(--on-moss); opacity: 0.9; margin: 0; }
.slider__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.slider label { font-weight: 600; }
.slider output { font-family: var(--font-mono); color: var(--moss); }
.slider small { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.84rem; }
.slider input[type="range"] { width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--leaf) var(--pct, 0%), var(--line-2) var(--pct, 0%)); -webkit-appearance: none; appearance: none; }
.slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50% 50% 50% 10%; background: var(--moss); border: 3px solid var(--surface); box-shadow: var(--shadow); cursor: grab; transform: rotate(-45deg); }
.slider input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--moss); border: 3px solid var(--surface); cursor: grab; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 1rem; align-items: baseline; }
.result b { font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.result span { font-size: 0.95rem; }
.calc__note { font-size: 0.8rem; opacity: 0.75; }

.pledge { display: grid; gap: 1.25rem; }
.pledge fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pledge__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1.5rem; }
.card .pledge__score { margin: 0; font-size: 1.05rem; color: var(--ink); }
.pledge__score b { font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 500; color: var(--moss); margin-right: 0.25rem; }
.card .pledge__msg { margin: 0; }
.pledge__bar { position: relative; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pledge__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), var(--moss)); transform-origin: left; transform: scaleX(0); transition: transform 0.8s var(--ease-out); }
.pledge__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0.6rem; }
.pledge__item { position: relative; display: flex; align-items: center; gap: 0.8rem; padding: 0.85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 0.94rem; transition: border-color 0.3s, background-color 0.3s; }
.pledge__item:hover { border-color: var(--line-2); }
.pledge__item input { position: absolute; opacity: 0; pointer-events: none; }
.pledge__box { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50% 0 50% 0; border: 1.5px solid var(--line-2); color: transparent; font-size: 0.72rem; transition: all 0.45s var(--ease-out); }
.pledge__item input:checked + .pledge__box { background: var(--leaf); border-color: var(--leaf); color: var(--on-moss); transform: rotate(-12deg) scale(1.08); }
.pledge__item:has(input:checked) { border-color: color-mix(in srgb, var(--leaf) 50%, transparent); background: var(--moss-soft); }
.pledge__item input:focus-visible + .pledge__box { outline: 2px solid var(--clay); outline-offset: 2px; }
.pledge .btn { justify-self: start; }

.resource-list { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }

/* ---------------------------------------------------------------------
   15. CONTACT
   --------------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__aside { display: grid; gap: 1.25rem; }
.packet { position: relative; padding: 1.75rem 1.75rem 1.5rem; border-radius: 18px 18px 6px 6px; background: var(--moss); color: var(--on-moss); box-shadow: var(--shadow-lg); overflow: hidden; isolation: isolate; transform-style: preserve-3d; }
.packet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16px; background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0, 0, 0, 0.12) 10px 12px); }
.packet::after { content: ""; position: absolute; right: -60px; bottom: -60px; z-index: -1; width: 220px; aspect-ratio: 1; border-radius: var(--organic); background: rgba(255, 255, 255, 0.08); }
.packet__label { margin: 0.75rem 0 0.25rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.packet__name { margin: 0 0 0.25rem; font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.3rem); font-style: italic; line-height: 1; }
.packet__variety { margin: 0 0 1.25rem; opacity: 0.85; }
.packet dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1.25rem; padding-top: 1rem; border-top: 1px dashed rgba(245, 241, 230, 0.35); font-size: 0.88rem; }
.packet dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.packet dd { font-weight: 600; }
[data-theme="night"] .packet { background: #1d3322; color: #eef2e6; }
.info { list-style: none; }
.info li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); }
.info li:last-child { border-bottom: 0; }
.info__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--organic); background: var(--moss-soft); color: var(--moss); }
.info__label { margin: 0; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.info__value { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.form-card h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 0.5rem; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1rem; margin-top: 1.75rem; }
.form .full { grid-column: 1 / -1; }
.field label, .field legend { display: block; margin-bottom: 0.45rem; font-size: 0.88rem; font-weight: 600; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.field input[type="text"], .field input[type="email"], .field textarea { width: 100%; padding: 0.9rem 1.05rem; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg); transition: border-color 0.3s, box-shadow 0.3s; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 4px var(--moss-soft); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--clay); }
.field__err { display: block; min-height: 1.1rem; margin-top: 0.3rem; font-size: 0.82rem; color: var(--clay); }
.field__hint { float: right; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.95rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); font-size: 0.88rem; cursor: pointer; transition: all 0.35s var(--ease-out); }
.opt span:hover { border-color: var(--moss); }
.opt input:checked + span { background: var(--moss); border-color: var(--moss); color: var(--on-moss); }
.opt input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.form__foot small { color: var(--muted); }
.sent { display: none; text-align: center; padding: 2.5rem 0.5rem 1rem; }
.form-card.is-sent .form { display: none; }
.form-card.is-sent .sent { display: block; }
.sent__icon { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 1.25rem; border-radius: var(--organic); background: var(--leaf); color: var(--on-moss); font-size: 1.9rem; }
.sent h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.sent p { max-width: 44ch; margin: 0 auto 1.5rem; color: var(--muted); }

.faq { list-style: none; border-top: 1px dashed var(--line-2); }
.faq details { border-bottom: 1px dashed var(--line-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.3rem 0.25rem; font-family: var(--font-serif); font-size: 1.25rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; color: var(--leaf); transition: transform 0.5s var(--ease-out); }
.faq details[open] summary i { transform: rotate(135deg); }
.faq details p { padding: 0 0.25rem 1.4rem; margin: 0; color: var(--muted); max-width: 70ch; }

/* ---------------------------------------------------------------------
   16. POST TEMPLATE
   --------------------------------------------------------------------- */
.cover { display: grid; place-items: center; aspect-ratio: 21 / 9; border-radius: var(--r-lg); background: radial-gradient(circle at 30% 40%, var(--moss-soft), transparent 60%), var(--bg-2); border: 1px dashed var(--line-2); text-align: center; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.cover--img { padding: 0; border: 0; overflow: hidden; }
.cover--img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article figure > img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.cover span { display: grid; gap: 0.75rem; justify-items: center; }
.cover i { font-size: 2rem; color: var(--leaf); }
.article { max-width: 720px; margin-inline: auto; font-size: 1.13rem; line-height: 1.8; }
.article > * + * { margin-top: 1.4rem; }
.article p { margin: 0; color: var(--ink-2); }
.article h2 { margin-top: 3.25rem; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.article blockquote { margin: 2.5rem 0; padding-left: 1.5rem; border-left: 3px solid var(--leaf); font-family: var(--font-serif); font-style: italic; font-size: 1.6rem; line-height: 1.35; }
.article a:not(.btn):not(.card) { color: var(--moss); text-decoration: underline; text-underline-offset: 3px; }
.embed { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r); border: 1px dashed var(--line-2); background: var(--surface); color: var(--muted); text-align: center; padding: 1.5rem; }
.embed i { display: block; margin-bottom: 0.6rem; font-size: 1.8rem; color: var(--leaf); }
.article figcaption { margin-top: 0.7rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
.cites { padding: 1.6rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.cites h2 { margin-top: 0; font-size: 1.3rem; }
.cites ol { margin-top: 0.9rem; padding-left: 1.2rem; display: grid; gap: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.pnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pnav small { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pnav a:last-child { text-align: right; }

/* ---------------------------------------------------------------------
   17. FOOTER — layered parallax hills
   --------------------------------------------------------------------- */
.footer { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(4rem, 8vw, 6rem); padding-top: calc(clamp(160px, 22vw, 280px) + clamp(1.5rem, 4vw, 3rem)); background: #1d3322; color: #eef2e6; }
[data-theme="night"] .footer { background: #0a150d; }
.footer__hills { position: absolute; left: 0; right: 0; top: 0; z-index: -1; height: clamp(160px, 22vw, 280px); overflow: hidden; pointer-events: none; }
.footer__hills svg { position: absolute; left: -5%; top: 0; width: 110%; max-width: none; height: 100%; }
.footer__hills .f1 { fill: var(--bg); }
.footer__hills .f2 { fill: #5e8a4f; }
.footer__hills .f3 { fill: #3d6340; }
.footer__hills .f4 { fill: #1d3322; }
[data-theme="night"] .footer__hills .f4 { fill: #0a150d; }
[data-theme="night"] .footer__hills .f2 { fill: #1d3322; }
[data-theme="night"] .footer__hills .f3 { fill: #132619; }
.footer__cta { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; align-items: end; gap: 2rem; padding-bottom: clamp(3.5rem, 7vw, 5rem); border-bottom: 1px dashed rgba(238, 242, 230, 0.2); }
.footer__title { font-size: clamp(2.8rem, 7.5vw, 6.2rem); font-weight: 400; line-height: 0.95; letter-spacing: -0.04em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.footer__title em { color: #b9d98f; }
.footer .btn--primary { background: #eef2e6; color: #1d3322; }
.footer .btn--primary:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; padding-block: 3.5rem; }
.footer__grid h2 { margin-bottom: 1rem; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(238, 242, 230, 0.72); }
.footer__links { list-style: none; display: grid; gap: 0.55rem; }
.footer__links a { opacity: 0.88; transition: opacity 0.3s, color 0.3s; }
.footer__links a:hover { opacity: 1; color: #b9d98f; }
.footer .brand__mark { background: #eef2e6; color: #1d3322; }
.footer .brand__name small { color: rgba(238, 242, 230, 0.72); }
.footer__blurb { margin-top: 1rem; max-width: 36ch; font-size: 0.94rem; color: rgba(238, 242, 230, 0.78); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; border-top: 1px dashed rgba(238, 242, 230, 0.2); font-family: var(--font-mono); font-size: 0.74rem; color: rgba(238, 242, 230, 0.72); }
.footer__bottom p { margin: 0; }
.footer__bottom a:hover { color: #eef2e6; }

/* ---------------------------------------------------------------------
   18. MOTION STATES
   --------------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; translate: 0 40px; transition: opacity 1s var(--ease-out), translate 1.2s var(--ease-out), scale 1.2s var(--ease-out), rotate 1.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 85ms); }
.js [data-reveal="fade"] { translate: none; }
.js [data-reveal="grow"] { translate: 0 30px; scale: 0.9; rotate: -2deg; }
.js [data-reveal="left"] { translate: -50px 0; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; rotate: none; }
.js [data-intro] { opacity: 0; transform: translateY(26px); }
.js [data-split] .char, .js [data-split] .w__inner { transform: translateY(115%) rotate(4deg); }
.no-anime body.is-loaded [data-intro] { opacity: 1; transform: none; transition: opacity 1s var(--ease-out) 0.5s, transform 1.1s var(--ease-out) 0.5s; }
.no-anime body.is-loaded [data-split] .char, .no-anime body.is-loaded [data-split] .w__inner { transform: none; transition: transform 1.1s var(--ease-out) calc(0.3s + var(--i, 0) * 35ms); }

/* ---------------------------------------------------------------------
   19. RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pebbles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1040px) {
  .nav__links, .nav__cta { display: none; }
  .nav__menu { display: grid; }
}
@media (max-width: 900px) {
  :root { --nav-h: 76px; }
  .about, .growth, .contact, .calc, .sec-head { grid-template-columns: 1fr; }
  .sec-head .lead { justify-self: start; }
  .portrait { margin-inline: auto; width: min(100%, 400px); }
  .portrait__tag--1 { left: -0.5rem; }
  .portrait__tag--2 { right: -0.5rem; }
  .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages { grid-template-columns: 1fr; }
  .notebook dl { grid-template-columns: 1fr; }
  .value { grid-template-columns: 3rem minmax(0, 1fr); }
  .value p { grid-column: 2; }
  .footer__cta { grid-template-columns: 1fr; }
  .hero__orb { right: 6%; top: 12%; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__foot .scroll-leaf { display: none; }
  .hero__foot .container > span:last-child { display: none; }
  .hero__orb { right: -36px; top: 72px; width: 120px; }
  .paths, .pebbles { grid-template-columns: 1fr; }
  .pebble--wide { grid-column: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .form, .pai { grid-template-columns: 1fr; }
  .post { grid-template-columns: minmax(0, 1fr) auto; }
  .post__date { grid-column: 1 / -1; }
  .ledger li { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .ledger__yr { grid-column: 2; }
  .footer__grid { grid-template-columns: 1fr; }
  .pnav { grid-template-columns: 1fr; }
  .pnav a:last-child { text-align: left; }
  .notebook dl div { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------------------------------------------------------------
   20. REDUCED MOTION
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-intro] { opacity: 1 !important; translate: none !important; scale: 1 !important; rotate: none !important; transform: none !important; }
  .js [data-split] .char, .js [data-split] .w__inner { transform: none !important; }
  .veil { display: none !important; }
  .marquee__track { animation: none; }
  .vine__leaf { transform: scale(1); }
}

/* ---------------------------------------------------------------------
   21. PRINT
   --------------------------------------------------------------------- */
/* Skills table: stack each row as a card on phones */
@media (max-width: 640px) {
  .skills-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .skills-table, .skills-table tbody, .skills-table tr, .skills-table th, .skills-table td { display: block; }
  .skills-table caption { display: block; padding: 1.1rem 1.25rem 0.25rem; }
  .skills-table tbody tr { padding: 1rem 1.25rem; border-bottom: 1px dashed var(--line); }
  .skills-table tbody tr:last-child { border-bottom: 0; }
  .skills-table th, .skills-table td { padding: 0; border-bottom: 0; }
  .skills-table td:nth-child(2) { margin-top: 0.3rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
  .skills-table td:nth-child(3) { margin-top: 0.45rem; }
}

@media print {
  @page { margin: 1.6cm; }
  html, body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  body::before { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  [data-reveal], [data-intro], .char, .w__inner, .scrub-word { opacity: 1 !important; translate: none !important; scale: 1 !important; rotate: none !important; transform: none !important; }
  .webgl, canvas, .veil, .vine, .toast, .to-top, .nav__links, .nav__cta, .nav__tools, .nav__menu, .mmenu, .marquee, .hills, .footer__hills, .footer__cta, .hero__orb, .hero__stars, .hero__foot, .hero__actions, .form-card, .dialog, .filters, .toolbar { display: none !important; }
  .header { position: static !important; transform: none !important; }
  .hero, .phero { min-height: 0 !important; padding: 0 0 1.5rem !important; background: none !important; }
  .section { padding-block: 1.5rem !important; }
  .card, .specimen, .pebble { break-inside: avoid; border: 1px solid #ccc !important; background: #fff !important; color: #111 !important; }
  .section--forest, .section--sand, .footer, .calc__out, .pebble--moss, .packet { background: #fff !important; color: #111 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
  .ph { color: #111 !important; }
}
