/* =========================================================
   Tokens. Everything here can also be changed from the editor (?edit):
   colours, glass per group, typography per role, band, icons, signature.
   The editor writes its values into <style id="theme-css"> (app.js themeCss),
   which overrides these defaults.
   ========================================================= */
:root {
  --accent: #0b6b3a;
  --accent-ink: color-mix(in srgb, var(--accent) 90%, black);
  --accent-soft: color-mix(in srgb, var(--accent) 50%, white);
  --on-accent: #fff;
  --ink: #0b1a11;
  --ink-2: #33483b;
  --bg: #e4f3ea;
  --paper: #fbf6ea;
  --shadow-rgb: 10, 50, 28;
  --tint-rgb: 255, 255, 255;
  --glass-alpha: .34;
  --glass-blur: 18px;
  --glass-sat: 1.7;
  --rim: 1;
  --shade: 1;
  --radius: 30px;
  --maxw: 1260px;
  --space-section: 120px;
  --spring: cubic-bezier(.25, 1.15, .4, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* typography roles: family, size factor, weight, slant (deg), tracking (em) */
  --f-body: 'Nervo Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-body-k: 1; --f-body-w: 400; --f-body-sl: 0; --f-body-ls: 0em; --f-body-lh: 1.65;
  --f-head: 'Nervo Sans', system-ui, sans-serif; --f-head-k: 1; --f-head-w: 800; --f-head-sl: 0; --f-head-ls: -.035em;
  --f-hero: 'Nervo Bay', 'Nervo Sans', cursive; --f-hero-k: 1; --f-hero-w: 400; --f-hero-sl: 0; --f-hero-ls: -.01em;
  --f-script: 'Nervo Bay', 'Nervo Sans', cursive; --f-script-k: 1; --f-script-w: 400; --f-script-sl: 0; --f-script-ls: 0em;
  --f-band: 'Nervo Sans', system-ui, sans-serif; --f-band-k: 1; --f-band-w: 700; --f-band-sl: 0; --f-band-ls: -.01em;
  --f-ui: 'Nervo Sans', system-ui, sans-serif; --f-ui-k: 1; --f-ui-w: 600; --f-ui-sl: 0; --f-ui-ls: 0em;
  --f-body-style: normal; --f-ui-style: normal;

  /* name band */
  --nb-size: 1.45rem; --nb-pad: 9px; --nb-pane-w: 130px; --nb-speed: 9s; --nb-text-speed: 60s;
  /* project stickers */
  --ic-size: 54px;
  color-scheme: light;
}
[data-theme="dark"] {
  --accent-ink: var(--accent-soft);
  --on-accent: #04150b;
  --ink: #eaf5ee;
  --ink-2: #a9c1b2;
  --bg: #06130d;
  --shadow-rgb: 0, 0, 0;
  --tint-rgb: 150, 190, 165;
  color-scheme: dark;
}

/* ===== base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #cfe8e0; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  font-family: var(--f-body); font-size: calc(17px * var(--f-body-k)); font-weight: var(--f-body-w); font-style: var(--f-body-style);
  letter-spacing: var(--f-body-ls); line-height: var(--f-body-lh);
}
[data-theme="dark"] body { background: #071712; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
h2 {
  font-family: var(--f-head); font-size: calc(clamp(2.3rem, 5vw, 4rem) * var(--f-head-k)); font-weight: var(--f-head-w); letter-spacing: var(--f-head-ls);
  transform: skewX(calc(var(--f-head-sl) * -1deg)); transform-origin: 0 100%;
}
h3 { font-size: 1.1rem; font-weight: 700; }
b { font-weight: 700; }
.script {
  display: inline-block; font-family: var(--f-script); font-weight: var(--f-script-w); letter-spacing: var(--f-script-ls); color: var(--accent-ink);
  font-size: calc(1em * var(--f-script-k)); transform: skewX(calc(var(--f-script-sl) * -1deg));
}
:focus-visible { outline: 2.5px solid var(--accent-ink); outline-offset: 4px; border-radius: 14px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 12px; }
.skip:focus { top: 16px; }
.noscript { text-align: center; padding: 40px; }
.meadow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }

/* ===== liquid glass material =====
   Flat tint, a bright rim drawn with inset shadows, and the backdrop blur.
   Per-group values (--glass-alpha, --glass-blur, --glass-sat, --rim, --shade) come from the editor. */
.glass, .lg {
  position: relative; isolation: isolate;
  background: rgba(var(--tint-rgb), var(--glass-alpha));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow:
    0 24px 60px -24px rgba(var(--shadow-rgb), calc(.42 * var(--shade))), 0 2px 6px -2px rgba(var(--shadow-rgb), calc(.12 * var(--shade))),
    inset 0 1px 0 rgba(255, 255, 255, calc(.9 * var(--rim))), inset 0 0 0 1px rgba(255, 255, 255, calc(.3 * var(--rim))), inset 0 -1px 0 rgba(255, 255, 255, calc(.18 * var(--rim)));
}
[data-theme="dark"] .glass, [data-theme="dark"] .lg {
  background: rgba(var(--tint-rgb), calc(var(--glass-alpha) * .3));
  box-shadow:
    0 24px 60px -22px rgba(0, 0, 0, calc(.8 * var(--shade))), 0 2px 8px -2px rgba(0, 0, 0, calc(.45 * var(--shade))),
    inset 0 1px 0 rgba(255, 255, 255, calc(.32 * var(--rim))), inset 0 0 0 1px rgba(255, 255, 255, calc(.1 * var(--rim)));
}
/* while the refraction filter is live the pane gets clearer, so the bending shows */
.lg.lg-live { background: rgba(var(--tint-rgb), calc(var(--glass-alpha) * .45)); }
[data-theme="dark"] .lg.lg-live { background: rgba(var(--tint-rgb), calc(var(--glass-alpha) * .18)); }
/* light that follows the cursor (turn off per group: "Ánh sáng theo chuột") */
.glass::after, .lg::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(180px 130px at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, .4), transparent 70%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.glass:hover::after, .lg:hover::after { opacity: 1; }
[data-theme="dark"] .glass::after, [data-theme="dark"] .lg::after { background: radial-gradient(180px 130px at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, .12), transparent 70%); }
/* optional rainbow rim on hover (off by default; editor → Kính lỏng) */
@property --iris-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.iris .lg:hover::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: conic-gradient(from var(--iris-a), #ffffff00, #b8f3ffaa, #ffd6f5aa, #fff6b8aa, #c7ffd8aa, #ffffff00 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: iris 4s linear infinite;
}
@keyframes iris { to { --iris-a: 360deg; } }
/* a group with glass turned off: a plain, quiet surface */
.g-off { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: color-mix(in srgb, var(--bg) 88%, transparent) !important; }
@media (prefers-reduced-transparency: reduce) {
  .glass, .lg { background: var(--bg) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* ===== logo: the hand-drawn NERVO wordmark, or any vector file uploaded in ?edit.
   Every drawable part gets class .lp and --i (its order); the animation is chosen in ?edit
   and set as html classes: la-<kind> (how) + ll-<when>. ===== */
.nervo { display: block; height: 100%; width: auto; overflow: visible; color: var(--logo-color, inherit); }
.nervo .lp { transform-box: fill-box; transform-origin: 50% 50%; --la-delay: calc(var(--i, 0) * var(--la-st, .12s)); }
.logo-custom .lp { vector-effect: non-scaling-stroke; }
.logo-mono .lp:not([fill="none"]) { fill: currentColor; }
.logo-mono .lp[stroke]:not([stroke="none"]) { stroke: currentColor; }
.la-draw .nervo .lp { stroke-dasharray: 1; animation: lp-draw var(--la-d, 1.6s) var(--ease) var(--la-delay) both; }
.la-draw .logo-custom .lp { stroke: currentColor; stroke-width: var(--la-sw, 1.4px); animation: lp-draw var(--la-d, 1.6s) var(--ease) var(--la-delay) both, lp-fill calc(var(--la-d, 1.6s) * .6) ease calc(var(--la-delay) + var(--la-d, 1.6s) * .5) both; }
.la-draw .logo-custom .lp[fill="none"] { animation: lp-draw var(--la-d, 1.6s) var(--ease) var(--la-delay) both; }
.la-fade .nervo .lp { animation: lp-fade var(--la-d, 1.6s) ease var(--la-delay) both; }
.la-rise .nervo .lp { animation: lp-rise var(--la-d, 1.6s) var(--spring) var(--la-delay) both; }
.la-pop .nervo .lp { animation: lp-pop var(--la-d, 1.6s) var(--spring) var(--la-delay) both; }
.la-blur .nervo .lp { animation: lp-blur var(--la-d, 1.6s) ease var(--la-delay) both; }
.la-wave .nervo .lp { animation: lp-wave var(--la-d, 1.6s) ease-in-out var(--la-delay) infinite; }
.la-boil .nervo .lp { animation: lp-boil calc(var(--la-d, 1.6s) * .3) steps(1) var(--la-delay) infinite; }
.la-float .nervo { animation: lp-float calc(var(--la-d, 1.6s) * 2.5) ease-in-out infinite; }
.la-breathe .nervo { animation: lp-breathe calc(var(--la-d, 1.6s) * 2) ease-in-out infinite; }
.la-swing .nervo { animation: lp-swing calc(var(--la-d, 1.6s) * 2) ease-in-out infinite; transform-origin: 50% 0; }
.ll-loop .nervo .lp { animation-iteration-count: infinite; animation-direction: alternate; }
/* wait until the logo is on screen (or hovered, in hover mode) before playing */
.nervo:not(.lp-on) .lp, .nervo:not(.lp-on) { animation-play-state: paused !important; }
.ll-hover .nervo:not(.lp-on) .lp, .ll-hover .nervo:not(.lp-on), .la-none .nervo .lp, .la-none .nervo { animation: none !important; }
.ll-hover .nervo:not(.lp-on) .lp, .la-none .nervo .lp { stroke-dashoffset: 0; }
@keyframes lp-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lp-fill { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes lp-fade { from { opacity: 0; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(70%); } }
@keyframes lp-pop { 0% { transform: scale(0); } 65% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes lp-blur { from { opacity: 0; filter: blur(6px); } }
@keyframes lp-wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16%); } }
@keyframes lp-boil { 0% { transform: rotate(-1.4deg) translate(.4px, 0); } 33% { transform: rotate(1deg) translate(-.4px, .4px); } 66% { transform: rotate(-.3deg) translate(0, -.4px); } }
@keyframes lp-float { 50% { transform: translateY(-8%); } }
@keyframes lp-breathe { 50% { transform: scale(1.06); } }
@keyframes lp-swing { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
/* the built-in wordmark keeps its own little hover tricks */
.logo-default .nv-leaf { transform-origin: 207px 21px; transform-box: view-box; }
.la-draw .logo-default .nv-leaf { animation: nv-leaf .7s var(--spring) calc(var(--la-d, 1.6s) * .75) both; stroke-dasharray: none; }
@keyframes nv-leaf { from { transform: scale(0); } }
.brand:hover .logo-default .nv-leaf, .brand:focus-visible .logo-default .nv-leaf { animation: nv-sway 1.4s ease-in-out infinite !important; }
.brand:hover .logo-default .nv-e1 { animation: nv-gust .9s var(--ease) !important; }
.brand:hover .logo-default .nv-e2 { animation: nv-gust .9s var(--ease) .08s !important; }
.brand:hover .logo-default .nv-e3 { animation: nv-gust .9s var(--ease) .16s !important; }
@keyframes nv-sway { 50% { transform: rotate(-14deg); } }
@keyframes nv-gust { 0% { stroke-dashoffset: 0; } 45% { stroke-dashoffset: 1; } 46% { stroke-dashoffset: -1; } 100% { stroke-dashoffset: 0; } }
.brand-img { display: block; height: 100%; width: auto; }
.brand-text { font-family: var(--f-head); font-weight: 800; letter-spacing: .02em; }

/* ===== nav ===== */
.nav-wrap { position: fixed; top: var(--nav-y, 16px); left: 0; right: 0; z-index: 50; display: flex; justify-content: var(--nav-justify, center); padding: 0 var(--nav-x, 12px); pointer-events: none; }
.nav-bottom .nav-wrap { top: auto; bottom: var(--nav-y, 16px); }
.nav-full .nav { flex: 1; justify-content: space-between; }
.nav-static .nav-wrap { position: absolute; }
.nav { zoom: var(--nav-zoom, 1); pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 7px 7px 7px 18px; border-radius: 999px; --lg-scale: 42; --lg-bezel: 20; transition: transform .5s var(--spring); }
.nav.compact { transform: scale(.95); }
.brand { display: block; height: calc(30px * var(--logo-k, 1)); margin-right: 10px; text-decoration: none; color: var(--accent-ink); }
.nav-links { position: relative; display: flex; }
.nav-links a {
  position: relative; z-index: 1; padding: 9px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap; color: var(--ink-2);
  font-family: var(--f-ui); font-size: calc(.95rem * var(--f-ui-k)); font-weight: calc(var(--f-ui-w) - 100); font-style: var(--f-ui-style); letter-spacing: var(--f-ui-ls);
  transition: color .3s, transform .35s var(--spring);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:active { transform: scale(.92); }
.glide {
  position: absolute; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; opacity: 0;
  background: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 #fff, 0 6px 16px -8px rgba(12, 48, 28, .35);
  transition: transform .55s var(--spring), width .55s var(--spring), opacity .3s;
}
[data-theme="dark"] .glide { background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; --lg-scale: 26; --lg-bezel: 13; transition: transform .35s var(--spring);
}
.icon-btn:hover { transform: scale(1.1); }
.icon-btn:active { transform: scale(.86); }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle svg { transition: transform .8s var(--spring); }
.theme-toggle:hover svg { transform: rotate(45deg) scale(1.08); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }

/* ===== buttons: liquid glass pills ===== */
.btn {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 30px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; color: var(--ink);
  font-family: var(--f-ui); font-weight: calc(var(--f-ui-w) + 100); font-size: calc(1rem * var(--f-ui-k)); font-style: var(--f-ui-style); letter-spacing: calc(.01em + var(--f-ui-ls));
  --lg-scale: 34; --lg-bezel: 18;
  transform: translate(var(--mx, 0), var(--my, 0));
  transition: transform .5s var(--spring), box-shadow .4s var(--ease), background-color .3s;
}
.btn:hover { transform: translate(var(--mx, 0), calc(var(--my, 0px) - 3px)) scale(1.03); }
.btn:active { transform: translate(var(--mx, 0), var(--my, 0)) scale(.95, .92); transition-duration: .12s; }
.btn.btn-primary, .btn.btn-primary.lg-live { background: color-mix(in srgb, var(--accent) 90%, transparent); color: #fff; }
[data-theme="dark"] .btn.btn-primary, [data-theme="dark"] .btn.btn-primary.lg-live { background: color-mix(in srgb, var(--accent-soft) 88%, transparent); color: #04150b; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring); }
.btn:hover svg { transform: translateX(4px); }
.hero-cta, .contact-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== media / artwork frames ===== */
.media { position: relative; display: block; overflow: hidden; background: rgba(255, 255, 255, .45); }
[data-theme="dark"] .media { background: rgba(255, 255, 255, .06); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.1s var(--ease); }
.media.art { background: transparent; }
.media.art .main { position: relative; z-index: 1; object-fit: contain; }
.media.art .amb { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(28px) saturate(1.3); opacity: .8; }
.media.is-loading img { opacity: 0; }
.media.is-loading::before { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(255, 255, 255, .35); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.media.is-error, .media.is-empty { display: grid; place-items: center; border: 1.5px dashed color-mix(in srgb, var(--ink-2) 40%, transparent); background: rgba(255, 255, 255, .4); }
.ph-label { padding: 16px; text-align: center; font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.ph-label small { opacity: .7; word-break: break-all; }
.edit-only { display: none; }
.editing .edit-only { display: inline; }

/* ===== hero ===== */
.hero {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 4vw;
  max-width: var(--maxw); margin: 0 auto; padding: 120px 28px 120px;
}
.eyebrow { margin: 0 0 14px; font-family: var(--f-ui); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
/* "hand" eyebrows: a short note written in the margin, the default */
.eb-hand .eyebrow { font-family: var(--f-script); font-weight: var(--f-script-w); text-transform: none; letter-spacing: 0; font-size: calc(1.3rem * var(--f-script-k)); line-height: 1.2; transform: rotate(-1.5deg) skewX(calc(var(--f-script-sl) * -1deg)); transform-origin: 0 100%; }
.eb-hand .sec-head .eyebrow, .eb-hand .contact-card .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.eb-hand .sec-head .eyebrow::before, .eb-hand .contact-card .eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-7deg); opacity: .7; }
.eb-plain .pill { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
.pill { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; margin-bottom: 20px; --lg-scale: 22; --lg-bezel: 11; }
.eb-hand .pill { background: none; box-shadow: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 0; }
.eb-hand .pill::after { content: none; }
.hero .eyebrow { margin-bottom: 20px; }
.eb-hand .hero .eyebrow { font-size: calc(1.2rem * var(--f-script-k)); }
.hero-title { position: relative; display: inline-block; padding: .05em .12em .12em 0; margin: 6px 0 0 -.04em; }
.ht-name {
  display: block; white-space: nowrap; color: var(--ink); padding-right: .1em; margin-top: .1em;
  font-family: var(--f-hero); font-weight: var(--f-hero-w); letter-spacing: var(--f-hero-ls);
  font-size: calc(clamp(4rem, 9.6vw, 9rem) * var(--f-hero-k)); line-height: 1.18;
  transform: skewX(calc(var(--f-hero-sl) * -1deg)); transform-origin: 0 100%;
}
.sweep {
  position: absolute; top: -8%; left: -12%; width: clamp(130px, 30%, 300px); height: 116%; border-radius: 46px; z-index: 2;
  --lg-scale: 80; --lg-bezel: 26;
  cursor: grab; touch-action: none; left: 0;
  /* moved with translate (no layout per frame); --tw is the title width, set by app.js */
  animation: sweep var(--sweep-dur, 14s) ease-in-out infinite alternate;
}
@keyframes sweep {
  0% { translate: calc(var(--tw, 600px) * -.12) 0; rotate: -3deg; }
  50% { translate: calc(var(--tw, 600px) * .34) -4%; rotate: 2deg; }
  100% { translate: calc(var(--tw, 600px) * .8) 0; rotate: -2deg; }
}
.sweep.held { animation: none; translate: none; rotate: none; cursor: grabbing; transition: transform .25s var(--ease); }
.hero-full { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; font-size: 1.25rem; font-weight: 600; }
.dot-sep { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); opacity: .6; }
.brand-inline { display: inline-block; height: calc(26px * var(--logo-k, 1)); color: var(--accent-ink); }
.hero-lead { max-width: 32em; font-size: 1.14em; color: var(--ink-2); margin: 18px 0 40px; }
.hero-lead b { color: var(--ink); }
.hero-portrait { position: relative; margin: 0; justify-self: center; width: min(400px, 100%); min-width: 240px; }
.portrait-frame { border-radius: 48% 48% 34px 34px / 38% 38% 34px 34px; padding: 10px; transform: rotate(-2deg); transition: transform .8s var(--spring); }
.hero-portrait:hover .portrait-frame { transform: rotate(0deg) scale(1.02); }
.portrait-frame .media { aspect-ratio: 4 / 5; border-radius: inherit; }
.portrait-frame img { object-position: 50% 30%; }
/* tool labels stuck around the portrait, each at its own angle */
.chip { position: absolute; display: grid; place-items: center; min-width: 58px; height: 52px; padding: 0 15px; border-radius: 16px; font-family: var(--f-ui); font-weight: 700; color: var(--accent-ink); --lg-scale: 30; --lg-bezel: 15; transition: transform .5s var(--spring); }
.c1 { left: -26px; top: 14%; transform: rotate(-7deg); } .c2 { right: -16px; top: 44%; transform: rotate(5deg); } .c3 { left: 8%; bottom: -16px; transform: rotate(-3deg); }
.chip:hover { transform: rotate(0) scale(1.08); }
[data-theme="dark"] .chip { color: #eafff2; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.chips-float .chip { animation: bob 6s ease-in-out infinite; }
.chips-float .c2 { animation-delay: -2s; } .chips-float .c3 { animation-delay: -4s; }
@keyframes bob { 50% { translate: 0 -10px; } }
.drop { position: absolute; border-radius: 50%; pointer-events: none; --lg-scale: 44; --lg-bezel: 22; animation: drift 16s ease-in-out infinite alternate; }
.d1 { width: 70px; height: 70px; left: 46%; top: 18%; }
.d2 { width: 38px; height: 38px; left: 8%; bottom: 16%; animation-duration: 12s; animation-delay: -4s; }
.d3 { width: 52px; height: 52px; right: 4%; bottom: 12%; animation-duration: 19s; animation-delay: -8s; }
@keyframes drift { 33% { transform: translate(18px, -26px); } 66% { transform: translate(-14px, -10px); } 100% { transform: translate(10px, 20px); } }
.no-drops .drop { display: none; }
.scroll-hint { position: absolute; left: 50%; bottom: 30px; width: 28px; height: 44px; border-radius: 16px; translate: -50% 0; border: 1.5px solid color-mix(in srgb, var(--ink-2) 60%, transparent); background: rgba(255, 255, 255, .25); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: var(--ink-2); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 60% { transform: translateY(13px); opacity: 0; } 100% { opacity: 0; } }

/* ===== ribbon of skills: calm frosted pills ===== */
.ribbon { position: relative; display: grid; gap: 14px; padding: 10px 0 30px; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rib-row { overflow: hidden; }
.rib-track { display: flex; gap: 12px; width: max-content; animation: marquee var(--marquee-dur, 48s) linear infinite; padding: 6px 0; }
.rev .rib-track { animation-direction: reverse; animation-duration: calc(var(--marquee-dur, 48s) * 1.15); }
.ribbon:hover .rib-track, .ribbon.idle .rib-track, .name-band.idle .nb-text, .name-band.idle .nb-pane, .hero.idle .sweep, .hero.idle .drop { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.rib-chip {
  padding: 10px 20px; border-radius: 999px; font-family: var(--f-ui); font-weight: var(--f-ui-w); font-size: .95rem; white-space: nowrap; color: var(--ink);
  background: rgba(255, 255, 255, .62); box-shadow: 0 4px 14px -8px rgba(10, 50, 28, .35), inset 0 0 0 1px rgba(255, 255, 255, .7);
  transition: transform .4s var(--spring);
}
.rib-chip.glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .74); }
[data-theme="dark"] .rib-chip, [data-theme="dark"] .rib-chip.glass { background: rgba(20, 40, 32, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.rib-chip:nth-child(3n) { color: var(--accent-ink); font-family: var(--f-script); font-weight: var(--f-script-w); }
.rib-chip:hover { transform: translateY(-4px) rotate(-1.5deg); }

/* ===== name band between sections: one line of the name, a pane of liquid glass travelling across ===== */
.name-band {
  position: relative; overflow: hidden; margin: var(--nb-margin, 6px) 0; padding: var(--nb-pad) 0;
  border-block: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, var(--nb-bg, .22));
}
[data-theme="dark"] .name-band { background: rgba(255, 255, 255, calc(var(--nb-bg, .22) * .2)); border-color: rgba(255, 255, 255, .1); }
.nb-plain .name-band { border-color: transparent; background: none; }
.nb-still .nb-text { animation: none; margin-inline: auto; }
.nb-rev .nb-text { animation-direction: reverse; }
.nb-pane-still .nb-pane { animation: none; left: var(--nb-pane-pos, 40%); }
/* calmer dividers in place of the band */
.sec-divider { height: 1px; margin: 8px auto; width: min(1200px, calc(100% - 48px)); background: color-mix(in srgb, var(--ink) 18%, transparent); position: relative; }
.sec-divider.d-space { background: none; height: 40px; }
.sec-divider.d-leaf span { position: absolute; left: 50%; top: 50%; width: 18px; height: 11px; translate: -50% -50%; rotate: -20deg; border-radius: 0 100% 0 100%; background: var(--accent-ink); }
.nb-text {
  display: flex; gap: var(--nb-gap, 2.4em); align-items: center; white-space: nowrap; width: max-content; color: var(--ink);
  font-family: var(--f-band); font-weight: var(--f-band-w); letter-spacing: var(--f-band-ls); line-height: 1.25;
  font-size: calc(var(--nb-size) * var(--f-band-k)); animation: nb-drift var(--nb-text-speed) linear infinite;
}
.nb-text > span { display: inline-block; transform: skewX(calc(var(--f-band-sl) * -1deg)); }
.nb-text .nb-sep { width: .32em; height: .32em; border-radius: 50%; background: var(--accent-ink); opacity: .55; }
.nb-text .nb-sep.leaf { width: .5em; height: .3em; border-radius: 0 100% 0 100%; background: var(--accent-ink); }
.nb-text .nb-sep.line { width: 1.6em; height: 1.5px; border-radius: 2px; }
.nb-text i { font-style: normal; font-family: var(--f-script); font-weight: var(--f-script-w); color: var(--accent-ink); }
@keyframes nb-drift { to { transform: translateX(-50%); } }
.nb-pane {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--nb-pane-w); border-radius: 999px; z-index: 2;
  --lg-scale: 18; --lg-bezel: 9;
  animation: nb-pass var(--nb-speed) linear infinite;
}
@keyframes nb-pass { from { transform: translateX(-110%); } to { transform: translateX(100vw); } }
.no-bands .name-band, .no-ribbon .ribbon, .no-pane .nb-pane { display: none; }

/* ===== sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: var(--space-section) 28px; }
.sec-head { margin-bottom: 48px; }
.sec-head h2 { text-wrap: balance; }
.w { display: inline-block; }
.h-rise .reveal .w { opacity: 0; transform: translateY(.45em); transition: opacity .7s var(--ease), transform .9s var(--spring); transition-delay: calc(var(--i) * 60ms + 100ms); }
.h-fade .reveal .w { opacity: 0; transition: opacity .9s var(--ease); transition-delay: calc(var(--i) * 40ms + 100ms); }
.reveal.in .w, .editing:not(.rv-preview) .w, .no-js .w { opacity: 1 !important; transform: none !important; }
h2.arrive { animation: arrive 1.2s var(--ease); }
@keyframes arrive { 30% { color: var(--accent-ink); translate: 6px 0; } }
.card { border-radius: var(--radius); padding: 30px; }
.count { flex: none; font-family: var(--f-ui); font-size: .8rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* cards tilt toward the pointer and sink on press */
.tile, .feat-card { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--ps, 1)); }
.tile.pressed, .feat-card.pressed { --ps: .975; }
.tile-stage::after, .feat-stage::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(460px circle at var(--glx, 50%) var(--gly, 0%), rgba(255, 255, 255, .26), transparent 45%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.is-tilting .tile-stage::after, .is-tilting .feat-stage::after { opacity: 1; }
.is-tilting { transition: transform .12s linear, opacity .6s var(--ease) !important; }
.no-tilt .tile, .no-tilt .feat-card { --rx: 0deg !important; --ry: 0deg !important; }

/* project sticker, top-right corner of every project card.
   The drawing is three tones of one colour (--c) plus white; --c is the project's colour
   unless the mode says otherwise. Every value here can be overridden per project in ?edit. */
.p-icon {
  --c: var(--ic-c, var(--accent));
  --c1: var(--c); --c2: color-mix(in srgb, var(--c) 42%, #fff); --c3: color-mix(in srgb, var(--c) 60%, #0b0f0d); --cw: #fff;
  --ic-bgc: color-mix(in srgb, var(--c) 9%, var(--paper));
  position: absolute; top: calc(var(--ic-size) * -.22 + var(--ic-y, 0px)); right: calc(var(--ic-size) * -.18 - var(--ic-x, 0px)); z-index: 6;
  width: var(--ic-size); height: var(--ic-size);
  display: grid; place-items: center; border-radius: var(--ic-radius, 50%); pointer-events: none;
  transform: rotate(var(--ic-rot, 0deg)); transition: transform .6s var(--spring);
}
.icm-brand .p-icon:not(.m-own), .p-icon.m-brand { --c: var(--ic-brand, #1f7a4c); --ic-bgc: #fff; }
.icm-inverse .p-icon:not(.m-own), .p-icon.m-inverse {
  --c1: #fff; --c2: color-mix(in srgb, var(--c) 28%, #fff); --c3: color-mix(in srgb, var(--c) 55%, #000); --cw: color-mix(in srgb, var(--c) 35%, #fff); --ic-bgc: var(--c);
}
.p-icon svg, .p-icon img { width: var(--ic-art, 74%); height: var(--ic-art, 74%); object-fit: contain; overflow: visible; }
.p-icon .f1 { fill: var(--c1); } .p-icon .f2 { fill: var(--c2); } .p-icon .f3 { fill: var(--c3); } .p-icon .fw { fill: var(--cw); }
.p-icon [class^="s"] { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.p-icon .s1 { stroke: var(--c1); } .p-icon .s2 { stroke: var(--c2); } .p-icon .s3 { stroke: var(--c3); } .p-icon .sw { stroke: var(--cw); }
.ic-sticker .p-icon { background: var(--ic-bg, var(--ic-bgc)); box-shadow: 0 0 0 var(--ic-ring-w, 3px) var(--ic-ring, #fff), 0 8px 16px -8px rgba(30, 30, 20, .55); }
[data-theme="dark"] .ic-sticker .p-icon { box-shadow: 0 0 0 var(--ic-ring-w, 3px) var(--ic-ring, #e9e3d4), 0 8px 16px -8px rgba(0, 0, 0, .8); }
.ic-flat .p-icon { box-shadow: 0 0 0 var(--ic-ring-w, 3px) var(--ic-ring, #fff) !important; }
.ic-bare .p-icon svg, .ic-bare .p-icon img { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.ic-straight .p-icon { --ic-rot: 0deg !important; }
/* 3D set: full-colour pictures, so the colour modes don't tint them; a soft contact shadow sits them on the sticker */
.p-icon.ic-3d img { width: min(100%, calc(var(--ic-art, 74%) + 8%)); height: min(100%, calc(var(--ic-art, 74%) + 8%)); filter: drop-shadow(0 2px 2px rgba(40, 30, 20, .22)); }
.icm-inverse .p-icon.ic-3d:not(.m-own), .p-icon.ic-3d.m-inverse, .icm-brand .p-icon.ic-3d:not(.m-own), .p-icon.ic-3d.m-brand { --ic-bgc: #fff; }
.ic-bare .p-icon.ic-3d img { width: 100%; height: 100%; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .28)); }
.tile:hover .p-icon, .feat-card:hover .p-icon, .tile:focus-visible .p-icon { transform: rotate(calc(var(--ic-rot, 0deg) * -1)) scale(1.1); }
.ic-still .tile:hover .p-icon, .ic-still .feat-card:hover .p-icon { transform: rotate(var(--ic-rot, 0deg)); }
.no-icons .p-icon, .p-icon.hide { display: none; }
.v-icon { position: static; flex: none; display: inline-grid; margin-right: 12px; vertical-align: middle; --ic-size: 46px; }

/* featured: artwork shown whole inside a glass frame, caption under it */
.featured { padding-bottom: 50px; }
.feat-list { display: flex; flex-wrap: wrap; gap: 26px; }
.feat-wrap .feat-card { width: 100%; }
.feat-card {
  position: relative; display: flex; flex-direction: column; padding: 12px; border: 0; border-radius: calc(var(--radius) + 8px); cursor: pointer; text-align: left; color: var(--ink);
  --lg-scale: 40; --lg-bezel: 24;
  transition: transform .7s var(--spring), opacity .7s var(--ease);
}
.feat-stage { position: relative; display: block; border-radius: calc(var(--radius) - 2px); overflow: hidden; }
.feat-card:hover .feat-stage { transform: scale(1.02); }
.feat-stage, .tile-stage { transition: transform .6s var(--spring), height .6s var(--ease); }
.feat-info { display: grid; gap: 6px; padding: 18px 14px 8px; }
.feat-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.feat-top .eyebrow { margin: 0; font-size: .72rem; }
.eb-hand .feat-top .eyebrow { font-size: 1.1rem; }
.feat-title { font-family: var(--f-head); font-size: calc(clamp(1.5rem, 2.3vw, 2.1rem) * var(--f-head-k)); font-weight: var(--f-head-w); letter-spacing: var(--f-head-ls); line-height: 1.1; }
.feat-desc { color: var(--ink-2); font-size: .97em; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-ui); font-weight: var(--f-ui-w); font-size: .9rem; color: var(--accent-ink); margin-top: 4px; }
.feat-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--spring); }
.feat-card:hover .feat-more svg { transform: translateX(6px); }

/* about */
.about-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.about-text { --lg-scale: 40; --lg-bezel: 26; }
.about-text p { margin: 0 0 14px; font-size: 1.06em; }
.about-text p:first-child {
  font-family: var(--f-script); font-weight: var(--f-script-w); letter-spacing: var(--f-script-ls); font-size: calc(1.55rem * var(--f-script-k)); line-height: 1.55;
  transform: skewX(calc(var(--f-script-sl) * -1deg)); transform-origin: 0 100%;
}
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.facts li { padding: 22px; display: flex; flex-direction: column; gap: 2px; --lg-scale: 30; --lg-bezel: 18; transition: transform .5s var(--spring); }
.facts li:nth-child(odd):hover { transform: translateY(-4px) rotate(-.8deg); }
.facts li:nth-child(even):hover { transform: translateY(-4px) rotate(.6deg); }
.facts span { font-family: var(--f-ui); font-size: .78rem; color: var(--accent-ink); font-weight: 600; }
.facts b { font-size: 1.08rem; line-height: 1.3; margin-top: 4px; }
.facts small { color: var(--ink-2); font-size: .88rem; }

/* signature (drawn, uploaded or typed in the editor) */
.sig { display: block; margin: 10px 0 0; color: var(--sig-color, var(--ink)); width: var(--sig-w, 190px); max-width: 100%; }
.sig svg, .sig img { display: block; width: 100%; height: auto; overflow: visible; }
.sig svg path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.sig-text { font-family: var(--sig-font, var(--f-script)); font-size: calc(var(--sig-w, 190px) / 5.2); line-height: 1.2; white-space: nowrap; }
.sig.anim { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s var(--ease) .3s; }
.reveal.in .sig.anim, .sig.anim.in, .editing:not(.rv-preview) .sig.anim { clip-path: inset(0 -10% 0 0); }
.sig-contact { margin: 26px auto 0; }
.sig-hero { margin: 30px 0 0 6px; transform: rotate(-2deg); transform-origin: 0 50%; }
.sig-footer { width: min(var(--sig-w, 190px), 120px); margin: 0; }
.footer .sig-footer .sig-text { font-size: 1.3rem; }

/* work: justified rows; every thumbnail shows the whole piece */
.filter-wrap { overflow-x: auto; margin: 0 -28px 34px; padding: 22px 28px 14px; scrollbar-width: none; }
.filter-wrap::-webkit-scrollbar { display: none; }
.segmented { position: relative; display: inline-flex; padding: 6px; border-radius: 999px; --lg-scale: 32; --lg-bezel: 17; }
.segmented button { position: relative; z-index: 1; border: 0; background: none; padding: 10px 19px; border-radius: 999px; font-family: var(--f-ui); font-size: calc(.95rem * var(--f-ui-k)); font-weight: calc(var(--f-ui-w) - 100); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: color .3s, transform .35s var(--spring); }
.segmented button:hover { color: var(--ink); transform: translateY(-1px); }
.segmented button:active { transform: scale(.9); }
.segmented button[aria-selected="true"] { color: var(--ink); font-weight: var(--f-ui-w); }
.segmented .thumb { position: absolute; top: 6px; bottom: 6px; left: 0; width: 0; border-radius: 999px; background: rgba(255, 255, 255, .82); box-shadow: inset 0 1px 0 #fff, 0 8px 20px -10px rgba(12, 48, 28, .45); transition: transform .6s var(--spring), width .6s var(--spring); }
[data-theme="dark"] .segmented .thumb { background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.jgrid { display: flex; flex-wrap: wrap; column-gap: 22px; row-gap: 26px; align-items: flex-start; }
.jitem { flex: none; min-width: 0; transition: width .6s var(--ease); }
.jitem .tile-stage, .jitem .feat-stage { transition: height .6s var(--ease); }
.tile-stage .media, .feat-stage .media { position: absolute; inset: 0; }
.tile {
  position: relative; display: block; width: 100%; padding: 10px; border: 0; border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--ink);
  --lg-scale: 30; --lg-bezel: 18;
  transition: transform .65s var(--spring), opacity .7s var(--ease);
}
.tile-stage { position: relative; display: block; border-radius: calc(var(--radius) - 8px); overflow: hidden; }
.tile:hover .tile-stage { transform: scale(1.03); }
.tile.is-logo .tile-stage .media { background: rgba(255, 255, 255, .78); }
.tile.is-logo .tile-stage .media .main { padding: 12%; }
.tile.is-logo .amb { display: none; }
[data-theme="dark"] .tile.is-logo .tile-stage .media { background: rgba(255, 255, 255, .12); }
.tile-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 8px 4px; }
.t-title { display: block; font-size: 1.06rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tile-cap small { display: block; color: var(--ink-2); font-size: .86rem; margin-top: 2px; }
.play { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center; z-index: 4; --lg-scale: 36; --lg-bezel: 20; transition: transform .5s var(--spring); }
.tile:hover .play, .feat-card:hover .play { transform: scale(1.15); }
.play svg { width: 24px; height: 24px; margin-left: 4px; fill: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); }
.empty { color: var(--ink-2); text-align: center; padding: 40px 0; }

/* experience */
.exp-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 30px 28px 6px 60px; position: relative; border-radius: var(--radius); --lg-scale: 40; --lg-bezel: 24; }
.timeline li { position: relative; padding: 0 0 26px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: -23px; top: 26px; bottom: 2px; width: 2px; background: var(--accent-ink); opacity: .3; transform-origin: top; transform: scaleY(0); transition: transform 1.2s var(--ease); }
.timeline.in li::after, .editing:not(.rv-preview) .timeline li::after { transform: scaleY(1); }
.timeline .dot { position: absolute; left: -30px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent-ink); transition: transform .4s var(--spring), background .3s; }
.timeline li:hover .dot { transform: scale(1.4); background: var(--accent-ink); }
.timeline b { font-size: 1.15rem; }
.timeline p { margin: 4px 0 0; color: var(--ink-2); }
.exp-side { display: grid; gap: 20px; }
.exp-side .card { --lg-scale: 36; --lg-bezel: 22; }
.exp-side h3 { margin-bottom: 14px; }
.exp-side h3:not(:first-child) { margin-top: 26px; }
.job + .job { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(127, 127, 127, .2); }
.job small { display: block; color: var(--accent-ink); font-weight: 600; font-size: .82rem; }
.job p { margin: 6px 0 0; color: var(--ink-2); font-size: .97em; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 7px 14px; border-radius: 999px; font-size: .9rem; background: rgba(255, 255, 255, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 10px -6px rgba(10, 50, 28, .3); transition: transform .4s var(--spring), background .3s; }
.tags li:hover { transform: translateY(-3px) rotate(-2deg); background: rgba(255, 255, 255, .85); }
[data-theme="dark"] .tags li { background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
[data-theme="dark"] .tags li:hover { background: rgba(255, 255, 255, .14); }
.tools li { color: var(--accent-ink); font-weight: 600; }

/* process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.steps li { display: grid; gap: 6px; align-content: start; }
.step-n { font-family: var(--f-script); font-size: 2rem; color: var(--accent-ink); line-height: 1; }
.steps p { margin: 0; color: var(--ink-2); }

/* custom sections added in the editor */
.custom-body { max-width: 46em; }
.custom-body p { margin: 0 0 14px; font-size: 1.06em; }
.custom-quote { margin: 0; max-width: 34em; font-family: var(--f-script); font-size: calc(2rem * var(--f-script-k)); line-height: 1.35; color: var(--ink); }
.custom-quote cite { display: block; margin-top: 14px; font-family: var(--f-ui); font-style: normal; font-size: 1rem; color: var(--ink-2); }
.custom-gallery { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.custom-gallery .media { height: 260px; max-width: 100%; border-radius: var(--pj-r, 10px); flex: 0 0 auto; }
.custom-gallery .media img { width: 100%; height: 100%; object-fit: contain; }
.custom-card { border-radius: var(--radius); padding: clamp(26px, 4vw, 46px); }

/* contact */
.contact-card { border-radius: calc(var(--radius) + 22px); padding: clamp(44px, 6vw, 90px); text-align: center; --lg-scale: 70; --lg-bezel: 46; }
.contact-card h2 { max-width: 14em; margin: 0 auto; transform-origin: 50% 100%; }
.contact-card .script { white-space: nowrap; margin-top: .14em; line-height: 1.05; }
/* glass inside glass has no backdrop to bend (nested backdrop roots read as grey), so it turns frosted-solid */
.contact-card .btn:not(.btn-primary), .viewer .btn:not(.btn-primary) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(var(--tint-rgb), .78); }
[data-theme="dark"] .contact-card .btn:not(.btn-primary) { background: rgba(255, 255, 255, .1); }
.contact-lead { color: var(--ink-2); margin: 18px auto 40px; max-width: 30em; }
.contact-actions { justify-content: center; }
.footer { max-width: calc(var(--maxw) - 56px); margin: 0 auto 28px; padding: 16px 26px; border-radius: 999px; display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--ink-2); font-size: .92rem; --lg-scale: 30; --lg-bezel: 18; }
.foot-right { display: flex; align-items: center; gap: 18px; }
.foot-brand { height: calc(24px * var(--logo-k, 1)); margin: 0; color: var(--accent-ink); }

/* ===== viewer ===== */
/* viewer: a window in the macOS manner. Title bar with the three lights, the picture large on
   the left with the strip of pictures under it, the project's details on the right. */
.viewer { width: min(var(--v-w, 1240px), 100vw - 24px); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: var(--v-r, 22px); background: transparent; color: var(--ink); overflow: visible; }
.viewer.v-max { width: calc(100vw - 24px); }
.viewer::backdrop { background: rgba(6, 20, 12, .42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: bd-in .5s var(--ease); }
@keyframes bd-in { from { opacity: 0; } }
.v-sheet {
  display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100dvh - 24px); border-radius: var(--v-r, 22px); overflow: hidden;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .55), 0 0 0 .5px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .75);
  will-change: transform;
}
[data-theme="dark"] .v-sheet { box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .85), 0 0 0 .5px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .12); }
.v-titlebar { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); background: color-mix(in srgb, var(--bg) 70%, transparent); user-select: none; }
.v-lights { display: flex; gap: 8px; }
.v-light { width: 13px; height: 13px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.v-light svg { width: 9px; height: 9px; fill: none; stroke: rgba(0, 0, 0, .55); stroke-width: 1.4; stroke-linecap: round; opacity: 0; transition: opacity .15s; }
.v-zoom svg path { fill: rgba(0, 0, 0, .55); stroke: none; }
.v-lights:hover svg, .v-light:focus-visible svg { opacity: 1; }
.v-close { background: #ff5f57; } .v-min { background: #febc2e; } .v-zoom { background: #28c840; }
.v-light:active { filter: brightness(.82); }
.v-wtitle { text-align: center; font-family: var(--f-ui); font-weight: 600; font-size: .86rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-count { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.v-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); min-height: 0; }
.v-main { min-width: 0; padding: 22px 22px 14px; display: grid; justify-items: center; align-content: start; overflow: hidden; }
.v-frame { position: relative; max-width: 100%; }
.v-stage { position: relative; max-width: 100%; display: grid; border-radius: var(--v-img-r, 10px); overflow: hidden; background: rgba(127, 127, 127, .08); perspective: 1200px; transition: width .55s var(--spring), height .55s var(--spring); }
.v-stage.v-snap { transition: none; }
.v-slide { grid-area: 1 / 1; display: grid; place-items: center; min-height: 0; }
.v-media { background: transparent; display: grid; place-items: center; width: 100%; height: 100%; }
.v-media img { width: 100%; height: 100%; object-fit: contain; }
.v-stage video { width: 100%; height: 100%; background: #000; }
.v-arrow { position: absolute; top: 50%; translate: 0 -50%; z-index: 3; opacity: 0; transition: opacity .25s, transform .4s var(--spring); }
.v-prev { left: 12px; } .v-next { right: 12px; }
.v-arrow { color: #17221c; } .v-arrow svg { stroke-width: 2.2; } /* the arrows sit on the picture, so they keep dark ink in both themes */
.v-frame:hover .v-arrow, .v-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .v-arrow { opacity: .9; } }
.v-thumbs { position: relative; display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 14px 6px 4px; scrollbar-width: thin; }
.v-ind { position: absolute; top: 10px; left: 0; width: 0; height: 64px; border-radius: 14px; margin-left: -4px; padding: 0 4px; box-sizing: content-box; transition: transform .55s var(--spring), width .55s var(--spring); --lg-scale: 20; z-index: 0; }
.v-thumbs button { position: relative; z-index: 1; flex: none; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; opacity: .55; outline-offset: 2px; transition: opacity .3s, transform .35s var(--spring); background: rgba(127, 127, 127, .12); }
.v-thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.v-thumbs button[aria-current="true"] { opacity: 1; transform: scale(.94); }
.v-thumbs button:hover { opacity: 1; transform: translateY(-3px); }
.v-thumbs button:active { transform: scale(.88); }
.v-side { padding: 26px 24px 22px; border-left: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.v-side .v-icon { --ic-size: 52px; margin: 0 0 6px; }
.v-side .eyebrow { margin: 0; font-size: .78rem; }
.eb-hand .v-side .eyebrow { font-size: 1.1rem; }
.v-side h2 { margin: 0; font-size: calc(clamp(1.5rem, 2.2vw, 2rem) * var(--f-head-k)); line-height: 1.12; }
.v-desc { margin: 4px 0 0; color: var(--ink-2); font-size: .97em; line-height: 1.6; }
.v-hint { margin-top: auto; padding-top: 18px; font-size: .78rem; color: var(--ink-2); opacity: .75; }
.v-single .v-thumbs, .v-single .v-arrow, .v-single .v-count { display: none; }
/* details above the picture instead of beside it */
.v-stack .v-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.v-stack .v-side { order: -1; border-left: 0; padding: 20px 26px 0; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.v-stack .v-side .v-icon { margin: 0; }
.v-stack .v-side > #v-icon { grid-row: 1 / span 2; grid-column: 1; }
.v-stack .v-side > .eyebrow, .v-stack .v-side > h2 { grid-column: 2; }
.v-stack .v-side { row-gap: 4px; }
.v-stack .v-desc, .v-stack .v-hint { grid-column: 1 / -1; }
.v-stack .v-hint { display: none; }
.v-source .tile-stage, .v-source .feat-stage { opacity: .35; transition: opacity .3s; }
@media (max-width: 760px) {
  .v-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; overflow-y: auto; }
  .v-side { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); padding: 18px 18px 22px; }
  .v-main { padding: 14px 12px 8px; }
  .v-hint { display: none; }
}

/* ===== interaction layer (fx.js) ===== */
.cursor-glass {
  position: fixed; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; z-index: 95; pointer-events: none;
  --lg-scale: 26; --lg-bezel: 16;
  box-shadow: 0 8px 24px -10px rgba(10, 50, 28, .35), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .5);
  transition: opacity .3s;
}
.cursor-glass.off { opacity: 0; }
.ripple {
  position: fixed; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none; z-index: 94;
  border: 1.5px solid rgba(255, 255, 255, .95); box-shadow: 0 0 0 1px rgba(11, 107, 58, .16);
  animation: ripple 1s var(--ease) forwards;
}
.ripple::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6); animation: ripple2 1s var(--ease) .12s forwards; opacity: 0; }
@keyframes ripple { to { transform: scale(9); opacity: 0; border-width: .4px; } }
@keyframes ripple2 { 0% { opacity: .8; } to { transform: scale(1.4); opacity: 0; } }
.petal {
  position: fixed; width: 9px; height: 6px; margin: -3px 0 0 -4px; border-radius: 60% 40% 60% 40%; pointer-events: none; z-index: 96;
  background: var(--c, #fff); box-shadow: 0 2px 3px rgba(0, 0, 0, .12);
  animation: petal 1.3s cubic-bezier(.15, .7, .3, 1) forwards;
}
.petal.leaf { width: 12px; height: 5px; background: #5f9e4a; border-radius: 0 100% 0 100%; }
@keyframes petal {
  0% { transform: translate(0, 0) rotate(0) scale(.5); opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 60px)) rotate(var(--rot)) scale(1); opacity: 0; }
}
.sparks { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 99; pointer-events: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-fade, .theme-fade * { transition: background-color .6s, color .6s !important; }
.scroll-cap { position: fixed; right: 18px; top: 50%; width: 10px; height: 140px; margin-top: -70px; border-radius: 999px; z-index: 45; padding: 2px; opacity: 0; transform: translateX(20px); transition: opacity .5s, transform .6s var(--spring); --lg-scale: 10; --lg-bezel: 5; }
.scroll-cap.show { opacity: 1; transform: none; }
.scroll-cap .fill { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: top; transform: scaleY(0); }
.no-scrollcap .scroll-cap { display: none; }

/* ===== toast + draft bar ===== */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 97; display: flex; align-items: center; gap: 10px; padding: 12px 22px 12px 14px; border-radius: 999px; font-weight: 600; font-size: .95rem; translate: -50% calc(100% + 60px); visibility: hidden; transition: translate .6s var(--spring), visibility 0s .6s; }
.toast.show { translate: -50% 0; visibility: visible; transition: translate .6s var(--spring); }
.tick { width: 24px; height: 24px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke-dasharray: 64; stroke-dashoffset: 64; }
.tick path { stroke-dasharray: 16; stroke-dashoffset: 16; }
.toast.show .tick circle { animation: tick .5s var(--ease) .15s forwards; }
.toast.show .tick path { animation: tick .35s var(--ease) .5s forwards; }
@keyframes tick { to { stroke-dashoffset: 0; } }
.draft-bar { position: fixed; left: 16px; bottom: 16px; z-index: 55; display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-radius: 16px; font-size: .88rem; }
.draft-bar a { font-weight: 700; color: var(--accent-ink); }


/* ===================== refined layout (theme.look) =====================
   Mix of three gallery styles: a studio site's numbered sections and thin rules,
   an artist's bare, uncaptioned work, and an illustrator's loose hanging (sizes vary,
   pieces sit slightly off the line). The glass, meadow, lake and effects are unchanged.
   html.lay-classic brings back the framed glass cards. */
main { counter-reset: sec; }
.lay-refined .sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(16px, 2.4vw, 34px); align-items: end; padding-bottom: 20px; margin-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.lay-refined .sec-head > * { grid-column: 2; }
.lay-refined .sec-head h2 { margin: 0; }
.lay-refined .sec-head .eyebrow { margin-bottom: 6px; }
.sec-num .section:not([data-off]) > .sec-head::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: .2em;
  font-family: var(--f-ui); font-weight: 600; font-size: 1rem; letter-spacing: .08em; color: var(--accent-ink); font-variant-numeric: tabular-nums; padding-right: 14px; border-right: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); line-height: 1.2;
}
.lay-refined:not(.sec-num) .sec-head { grid-template-columns: minmax(0, 1fr); }
.lay-refined:not(.sec-num) .sec-head > * { grid-column: 1; }

/* bare work: no glass card around projects, no card padding */
.lay-refined .tile, .lay-refined .feat-card {
  background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  padding: 0; border-radius: var(--pj-r);
}
.lay-refined .tile::after, .lay-refined .feat-card::after, .lay-refined .tile::before, .lay-refined .feat-card::before { content: none; }
.lay-refined .tile-stage, .lay-refined .feat-stage { border-radius: var(--pj-r); box-shadow: 0 18px 40px -28px rgba(12, 40, 24, .55); }
[data-theme="dark"] .lay-refined .tile-stage, [data-theme="dark"] .lay-refined .feat-stage { box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .9); }
.lay-refined .tile-stage .media, .lay-refined .feat-stage .media { background: transparent; }
.lay-refined .tile.is-logo .tile-stage .media { background: rgba(255, 255, 255, .86); }
[data-theme="dark"] .lay-refined .tile.is-logo .tile-stage .media { background: rgba(255, 255, 255, .1); }

/* loose hanging: each piece keeps its own small offset and lean */
.lay-refined .jgrid#grid { column-gap: var(--pj-gap); row-gap: calc(var(--pj-gap) + var(--cap-room, 74px)); }
.lay-refined #grid .tile-wrap:hover, .lay-refined #grid .tile-wrap:focus-within { z-index: 7; }
.lay-refined .tile-cap { z-index: 2; }
.lay-refined #grid .tile-wrap {
  translate: calc(var(--j1, 0) * 10px * var(--abs-k)) calc(var(--j2, 0) * 16px * var(--abs-k));
  rotate: calc(var(--j3, 0) * var(--j3, 0) * var(--j3, 0) * 1.6deg * var(--abs-k));
}

/* captions: only the title, shown on hover (or always under the piece, or never) */
.lay-refined .tile-cap { position: absolute; left: 0; right: 0; top: 100%; padding: 12px 2px 0; transition: opacity .35s var(--ease), translate .5s var(--spring); }
.lay-refined .tile-cap .count { display: none; }
.lay-refined .t-title { font-size: .98rem; font-weight: 600; }
.lay-refined .tile-cap small { font-size: .8rem; }
.cap-hover .tile-cap { opacity: 0; translate: 0 -6px; pointer-events: none; }
.cap-hover .tile:hover .tile-cap, .cap-hover .tile:focus-visible .tile-cap { opacity: 1; translate: 0 0; }
.cap-none .tile-cap { display: none; }
.cap-below .tile-cap { position: static; }
.cap-below .jgrid#grid { row-gap: calc(var(--pj-gap) * .9); }
.cap-none .jgrid#grid { row-gap: calc(var(--pj-gap) * 1.2); }
@media (hover: none) {
  .cap-hover .tile-cap { position: static; opacity: 1; translate: none; }
  .cap-hover .tile-cap small { display: none; }
}

/* featured as editorial spreads: one large piece per row, sides alternate, a small caption beside it */
.feat-stagger .feat-list { display: flex; flex-direction: column; gap: clamp(72px, 10vw, 150px); }
.feat-stagger .feat-wrap { width: 100% !important; }
.feat-stagger .feat-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3.4fr); column-gap: clamp(26px, 4.5vw, 72px); align-items: end; }
.feat-stagger .feat-wrap:nth-child(even) .feat-card { grid-template-columns: minmax(0, 3.4fr) minmax(0, 7fr); }
.feat-stagger .feat-wrap:nth-child(even) .feat-stage { order: 2; justify-self: end; }
.feat-stagger .feat-wrap:nth-child(3n+2) .feat-card { margin-top: calc(-30px * var(--abs-k)); }
.feat-fig { display: contents; }
.feat-stagger .feat-fig { display: block; position: relative; justify-self: start; width: min(100%, calc(62vh * var(--ar, 1.3))); }
.feat-stagger .feat-wrap:nth-child(even) .feat-fig { order: 2; justify-self: end; }
.feat-stagger .feat-fig .feat-stage { width: 100%; }
.feat-stagger .feat-no small { font-size: .32em; margin-left: .35em; color: var(--ink-2); letter-spacing: .04em; }
.feat-stagger .feat-stage { height: auto !important; width: min(100%, calc(62vh * var(--ar, 1.3))); aspect-ratio: var(--ar, 1.3); }
.feat-stagger .feat-info { padding: 0 0 6px; gap: 10px; }
.feat-stagger .feat-wrap:nth-child(even) .feat-info { text-align: right; justify-items: end; }
.feat-stagger .feat-top { justify-content: flex-start; gap: 14px; }
.feat-stagger .feat-wrap:nth-child(even) .feat-top { justify-content: flex-end; }
.feat-stagger .feat-desc { display: none; }
.feat-no { display: none; }
.feat-stagger .feat-no { display: block; font-family: var(--f-script); font-weight: var(--f-script-w); font-size: calc(clamp(2.6rem, 4.6vw, 4.2rem) * var(--f-script-k)); line-height: .9; color: var(--accent-ink); opacity: .85; }
.feat-stagger .feat-title { font-size: calc(clamp(1.7rem, 2.8vw, 2.6rem) * var(--f-head-k)); }
.lay-refined .featured { padding-bottom: var(--space-section); }

/* text blocks without their glass panels (optional) */
.text-bare .about-text, .text-bare .facts li, .text-bare .timeline, .text-bare .exp-side .card, .text-bare .custom-card {
  background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding-left: 0; padding-right: 0;
}
.text-bare .about-text::after, .text-bare .facts li::after, .text-bare .timeline::after, .text-bare .exp-side .card::after, .text-bare .custom-card::after { content: none; }
.text-bare .facts li { border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 0; padding-top: 16px; }
.text-bare .timeline { padding-left: 34px; }

@media (max-width: 760px) {
  .feat-stagger .feat-card, .feat-stagger .feat-wrap:nth-child(even) .feat-card { grid-template-columns: minmax(0, 1fr); row-gap: 16px; margin-top: 0; }
  .feat-stagger .feat-wrap:nth-child(even) .feat-fig { order: 0; justify-self: start; }
  .feat-stagger .feat-fig { width: 100%; }
  .feat-stagger .feat-wrap:nth-child(even) .feat-info { text-align: left; justify-items: start; }
  .feat-stagger .feat-wrap:nth-child(even) .feat-top { justify-content: flex-start; }
  .feat-stagger .feat-stage { width: 100%; }
  .lay-refined .jgrid#grid { column-gap: 14px; row-gap: 30px; }
  .lay-refined #grid .tile-wrap { translate: none; rotate: none; }
}

/* ===== reveal ===== */
.reveal { --rd: 1; --sd: 1; --rv-t: 1; --rv-k: 1; --rv-ease: var(--spring);
  opacity: 0; transform: translateY(calc(28px * var(--rv-k) * var(--rd)));
  transition: opacity calc(.8s * var(--rv-t)) var(--ease), transform calc(1s * var(--rv-t)) var(--rv-ease), filter calc(.9s * var(--rv-t)) var(--ease), clip-path calc(1s * var(--rv-t)) var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* scroll-in styles (theme.scroll): --rd = which edge it enters from (1 below, -1 above), --sd = left/right */
.reveal[data-rv="fade"]:not(.in) { transform: none; }
.reveal[data-rv="slide"]:not(.in) { transform: translateX(calc(80px * var(--rv-k) * var(--sd))); }
.reveal[data-rv="zoom"]:not(.in) { transform: translateY(calc(14px * var(--rv-k) * var(--rd))) scale(max(.55, calc(1 - .12 * var(--rv-k)))); }
.reveal[data-rv="blur"]:not(.in) { transform: translateY(calc(14px * var(--rv-k) * var(--rd))); filter: blur(calc(14px * var(--rv-k))); }
.reveal[data-rv="frost"]:not(.in) { opacity: .15; transform: scale(calc(1 + .04 * var(--rv-k))); filter: blur(calc(20px * var(--rv-k))) saturate(1.7) brightness(1.18); }
.reveal[data-rv="tilt"]:not(.in) { transform-origin: 50% calc(50% + 50% * var(--rd)); transform: perspective(900px) translateY(calc(24px * var(--rv-k) * var(--rd))) rotateX(calc(24deg * var(--rv-k) * var(--rd))); }
.reveal[data-rv="flip"]:not(.in) { transform: perspective(1100px) rotateY(calc(32deg * var(--rv-k) * var(--sd))) translateX(calc(24px * var(--rv-k) * var(--sd))); }
.reveal[data-rv="swing"]:not(.in) { transform-origin: calc(50% - 50% * var(--sd)) 0; transform: translateY(calc(30px * var(--rv-k) * var(--rd))) rotate(calc(4deg * var(--rv-k) * var(--sd))); }
.reveal[data-rv="drop"] { --rv-ease: cubic-bezier(.3, 1.55, .55, 1); }
.reveal[data-rv="drop"]:not(.in) { transform: translateY(calc(-46px * var(--rv-k) * var(--rd))) scale(.97); }
.reveal[data-rv="wipe"]:not(.in) { opacity: 1; transform: translateY(calc(10px * var(--rv-k) * var(--rd))); clip-path: inset(calc(50% + 50% * var(--rd) + 40px) -40px calc(50% - 50% * var(--rd) - 40px) -40px round 26px); }
.reveal[data-rv="wipe"].in { clip-path: inset(-40px -40px -40px -40px round 26px); }
.reveal[data-rv="curtain"]:not(.in) { opacity: 1; clip-path: inset(-40px calc(50% + 40px) -40px calc(50% + 40px) round 26px); transform: scale(.98); }
.reveal[data-rv="curtain"].in { clip-path: inset(-40px -40px -40px -40px round 26px); }
.reveal[data-rv="none"] { opacity: 1; transform: none; transition: none; }
.reveal[data-rv="none"] .w { opacity: 1 !important; transform: none !important; }
.reveal.rv-out { transition-delay: 0ms !important; }
/* side-entering styles start off-screen: keep them from widening the page on phones */
#main { overflow-x: clip; }
/* parallax while scrolling: section titles drift, cover photos move inside their frames (Chrome/Edge/Safari 18+) */
@supports (animation-timeline: view()) {
  .px-on .section .sec-head { animation: px-head linear both; animation-timeline: view(); }
  .px-on .feat-stagger .feat-fig { animation: px-img linear both; animation-timeline: view(); }
}
@keyframes px-head { from { translate: 0 calc(34px * var(--px-k, 1)); } to { translate: 0 calc(-34px * var(--px-k, 1)); } }
@keyframes px-img { from { translate: 0 calc(26px * var(--px-k, 1)); } to { translate: 0 calc(-26px * var(--px-k, 1)); } }
.tile.reveal.in, .feat-card.reveal.in { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--ps, 1)); }
.no-js .reveal, .editing:not(.rv-preview) .reveal, .no-js .reveal[data-rv]:not(.in), .editing:not(.rv-preview) .reveal[data-rv]:not(.in) { opacity: 1; transform: none; filter: none; clip-path: none; }
.hero .reveal { opacity: 1; transform: none; animation: rise 1s var(--spring) both; }
.hero-copy .reveal:nth-child(2) { animation-delay: .1s; }
.hero-copy .reveal:nth-child(3) { animation-delay: .2s; }
.hero-copy .reveal:nth-child(4) { animation-delay: .28s; }
.hero-copy .reveal:nth-child(5) { animation-delay: .36s; }
.hero-portrait.reveal { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; translate: 0 34px; } }

/* ===== responsive ===== */
@media (max-width: 1000px) {
  .about-grid, .exp-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding-top: 130px; gap: 56px; }
  .hero-portrait { width: min(340px, 80%); }
}
@media (max-width: 760px) {
  body { font-size: calc(16px * var(--f-body-k)); }
  :root { --space-section: 84px; --ic-size: 46px; }
  .nav { padding-left: 12px; }
  .nav-links a { padding: 9px 11px; font-size: .88rem; }
  .brand { height: calc(24px * var(--logo-k, 1)); margin-right: 4px; }
  .hero { padding-top: 110px; }
  .ht-name { font-size: calc(clamp(3.4rem, 17vw, 5.6rem) * var(--f-hero-k)); }
  .hero-full { font-size: 1.05rem; flex-wrap: wrap; }
  .section { padding-left: 18px; padding-right: 18px; }
  .filter-wrap { margin: 0 -18px 28px; padding: 22px 18px 14px; }
  .facts li { padding: 18px; }
  .card { padding: 24px; }
  .timeline { padding: 24px 18px 4px 50px; }
  .footer { margin: 0 14px 20px; border-radius: 24px; flex-wrap: wrap; }
  .draft-bar { right: 16px; }
  .d1 { display: none; }
  .scroll-cap { display: none; }
  .name-band { --nb-size: 1.15rem; }
}
@media (max-width: 520px) { .scroll-hint { display: none; } .eb-hand .hero .eyebrow { font-size: calc(1.02rem * var(--f-script-k)); margin-bottom: 26px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .hero .reveal, .reveal[data-rv]:not(.in) { opacity: 1; transform: none; filter: none; clip-path: none; animation: none; }
  .px-on .section .sec-head, .px-on .feat-stagger .feat-fig { animation: none; translate: none; }
  .reveal .w { opacity: 1; transform: none; }
  .nervo .nv { stroke-dashoffset: 0; } .nervo .nv-leaf { transform: none; }
  .sweep { animation: none; left: 55%; }
  .rib-track, .nb-pane, .nb-text { animation: none; }
  .nb-pane { left: 40%; }
  .sig.anim { clip-path: none; }
}

/* Browsers without refraction (Safari, Firefox, phones): the cursor bubble is just a ring */
html:not(.lg-refract) .cursor-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9), 0 0 0 1px rgba(11, 107, 58, .25); }

/* contact: frame on/off, extra info rows, optional icons */
.ct-plain .contact-card { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.ct-plain .contact-card::after, .ct-plain .contact-card::before { content: none !important; }
.ct-ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn .ct-ic { margin-right: 8px; }
.contact-info { list-style: none; padding: 0; margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; color: var(--ink-2); }
.contact-info li { display: inline-flex; align-items: center; gap: 8px; }
.ct-label { font-family: var(--f-ui); font-weight: 600; color: var(--ink); }
.ct-label:not(:empty)::after { content: ":"; }
.ct-value a { color: var(--accent-ink); text-underline-offset: 3px; }
/* nav at the bottom: keep the page end, toast and draft bar clear of it */
.nav-bottom:not(.nav-static) body { padding-bottom: calc(var(--nav-y, 16px) + 76px * var(--nav-zoom, 1)); }
.nav-bottom:not(.nav-static) .toast { bottom: calc(var(--nav-y, 16px) + 90px); }
.nav-bottom:not(.nav-static) .draft-bar { bottom: calc(var(--nav-y, 16px) + 84px); }

/* section switched off in the editor's layout list */
[data-off] { display: none !important; }

/* cursor effects (assets/cursor.js) */
.cursor-fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 78; pointer-events: none; }
.cur-dot, .cur-ring { position: fixed; left: 0; top: 0; z-index: 96; pointer-events: none; border-radius: 50%; }
.cur-dot { width: 8px; height: 8px; background: var(--accent); transition: width .2s, height .2s; }
.cur-dot.down { width: 5px; height: 5px; }
.cur-ring { width: 34px; height: 34px; border: 1.5px solid color-mix(in srgb, var(--accent) 65%, transparent); transition: background-color .25s, border-color .25s; }
.cur-ring.on-ui { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
[data-theme="dark"] .cur-dot { background: #d9f2e6; }
[data-theme="dark"] .cur-ring { border-color: rgba(217, 242, 230, .6); }
[data-theme="dark"] .cur-ring.on-ui { background: rgba(217, 242, 230, .1); border-color: #d9f2e6; }
html.cur-dot-on:not(.cur-sys), html.cur-dot-on:not(.cur-sys) body, html.cur-dot-on:not(.cur-sys) body *:not(.editor):not(.editor *) { cursor: none !important; }
html.cur-sys .cur-dot, html.cur-sys .cur-ring { opacity: 0; }

/* ---------- heart button (assets/hearts.js): floats bottom-right, liquid glass, turns red once hearted ---------- */
.btn.heart-btn {
  position: fixed; right: calc(22px + var(--heart-x, 0px)); bottom: calc(22px + var(--heart-y, 0px)); z-index: 56;
  min-height: calc(52px * var(--heart-k, 1)); padding: 0 calc(20px * var(--heart-k, 1)) 0 calc(16px * var(--heart-k, 1)); gap: 8px;
  font-size: calc(1rem * var(--heart-k, 1)); font-variant-numeric: tabular-nums; overflow: visible; --lg-scale: 26; --lg-bezel: 14;
}
.btn.heart-btn[hidden] { display: none; }
.heart-btn svg { width: calc(22px * var(--heart-k, 1)); height: calc(22px * var(--heart-k, 1)); flex: none; fill: transparent; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; transition: fill .3s, stroke .3s, transform .45s var(--spring); }
.heart-btn:hover svg { transform: scale(1.12); }
.heart-btn.on svg { fill: var(--heart, #ff3b5c); stroke: var(--heart, #ff3b5c); }
.heart-btn .heart-n { min-width: 1ch; }
.heart-btn.heart-nonum { padding: 0; width: calc(52px * var(--heart-k, 1)); }
.heart-btn.heart-nonum .heart-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.heart-fly {
  position: fixed; z-index: 57; width: 16px; height: 16px; pointer-events: none; background: var(--heart, #ff3b5c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.6-4.6-9.2-9.4C1.6 7.9 3.9 4.6 7.3 4.6c2 0 3.6 1.1 4.7 2.8 1.1-1.7 2.7-2.8 4.7-2.8 3.4 0 5.7 3.3 4.5 7C19.6 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.6-4.6-9.2-9.4C1.6 7.9 3.9 4.6 7.3 4.6c2 0 3.6 1.1 4.7 2.8 1.1-1.7 2.7-2.8 4.7-2.8 3.4 0 5.7 3.3 4.5 7C19.6 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 760px) { .btn.heart-btn { right: calc(14px + var(--heart-x, 0px)); bottom: calc(14px + var(--heart-y, 0px)); } }
@media print { .heart-btn { display: none; } }
