/* Shared by index.html and project.html */
/* ── SAND (light) ── */
:root {
  --bg: #f6f2ec; --panel: #fffdf9; --line: rgba(70,45,28,.10); --line2: rgba(70,45,28,.18);
  --text: #2a1f17; --mute: #7d6e62; --soft: #5a4b40;
  --a: #8b5e3c; --a2: #6f4529; --b: #c49a6c; --c: #8a9a78;
  --grid: rgba(70,45,28,.07); --spot: rgba(110,70,40,.45); --glass: rgba(255,253,249,.7); --hover: rgba(70,45,28,.06);
  --code-bg: #241b15; --code-line: rgba(234,220,200,.1); --code-text: #eadfd2; --code-mute: #8d7b6c;
  --aurora: .42; --on-a: #fffaf3;
  --r: 16px; --max: 1120px; --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
/* ── ESPRESSO (dark) ── */
:root[data-theme="dark"] {
  --bg: #14100d; --panel: #1c1612; --line: rgba(234,220,200,.08); --line2: rgba(234,220,200,.15);
  --text: #f1e8dc; --mute: #a39383; --soft: #cbbcaa;
  --a: #c08a5a; --a2: #a06e44; --b: #e0c09a; --c: #8fa37c;
  --grid: rgba(234,220,200,.06); --spot: rgba(240,220,195,.45); --glass: rgba(28,22,18,.65); --hover: rgba(234,220,200,.07);
  --code-bg: #0f0c0a; --aurora: .32; --on-a: #14100d;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: "Geist", Inter, system-ui, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background .4s, color .4s; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--a); color: var(--on-a); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.bg-grid { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 20%, transparent 75%); }
.bg-spot { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(var(--spot) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), #000, transparent);
          mask-image: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), #000, transparent); }
.hero, .phero { overflow-x: clip; isolation: isolate; }  /* isolate: lets the glow show above the page background */  /* keep the blurred blobs from widening the page on phones */
.aurora { position: absolute; left: -10%; right: -10%; top: -200px; height: 900px; z-index: -1; opacity: var(--aurora); pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, var(--blob), transparent); will-change: transform; }
.aurora i:nth-child(1) { width: 760px; height: 760px; --blob: var(--b); margin: -120px; left: 8%; top: 40px; animation: f1 18s ease-in-out infinite; }
.aurora i:nth-child(2) { width: 700px; height: 700px; --blob: var(--a); margin: -120px; right: 8%; top: 120px; animation: f2 22s ease-in-out infinite; }
.aurora i:nth-child(3) { width: 560px; height: 560px; --blob: var(--c); margin: -110px; left: 42%; top: 300px; opacity: .6; animation: f3 16s ease-in-out infinite; }
@keyframes f1 { 50% { transform: translate(140px, 80px) scale(1.15); } }
@keyframes f2 { 50% { transform: translate(-120px, 60px) scale(.9); } }
@keyframes f3 { 50% { transform: translate(60px, -90px) scale(1.2); } }

.nav { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 4px; padding: 6px;
  border: 1px solid var(--line2); border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 10px 30px -15px rgba(40,25,15,.25); }
.nav a, .nav button { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--mute); transition: color .2s, background .2s; white-space: nowrap; }
.nav a:hover, .nav button:hover { color: var(--text); background: var(--hover); }
.nav .logo { font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.nav .cta { background: var(--text); color: var(--bg); font-weight: 600; }
.nav .cta:hover { background: var(--a); color: var(--on-a); }
.nav button { all: unset; cursor: pointer; padding: 8px 11px; border-radius: 999px; color: var(--mute); font-size: 15px; line-height: 1; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 550; font-size: 15px; border: 1px solid var(--line2); background: var(--panel); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s; cursor: pointer; color: var(--text); font-family: inherit; }
.btn:hover { transform: translateY(-2px); border-color: var(--a); }
.btn.primary { background: linear-gradient(180deg, var(--a), var(--a2)); color: var(--on-a); border-color: transparent; box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--a) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.2); }
.btn.primary:hover { box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--a) 90%, transparent), inset 0 1px 0 rgba(255,255,255,.2); }
.eyebrow { font-size: 12px; color: var(--a); letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.035em; line-height: 1.05; font-weight: 620; margin: 14px 0 16px; }
.sub { color: var(--mute); max-width: 56ch; font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line); color: var(--soft); }
.socials { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: 14px; color: var(--mute); }
.socials a { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.socials a:hover { color: var(--a); }
.socials svg, .btn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
footer .socials { margin-top: 0; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--mute); font-size: 14px; margin-top: 120px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .rv { opacity: 1; transform: none; filter: none; } }

/* ── Page-to-page morph (View Transitions API; browsers without it just navigate) ──
   Only the screenshot morphs; everything else does a quick, blur-free crossfade. */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.22,1,.36,1); }
::view-transition-old(root) { animation: .2s ease-out both vt-out; }
::view-transition-new(root) { animation: .35s cubic-bezier(.22,1,.36,1) both vt-in; }
:active-view-transition .aurora i, :active-view-transition .strip-in, :active-view-transition .badge i { animation-play-state: paused; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-group(cover) { animation-duration: .55s; border-radius: 14px; overflow: hidden; z-index: 10; }
::view-transition-old(cover), ::view-transition-new(cover) { width: 100%; height: 100%; object-fit: cover; object-position: top; animation-duration: .55s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
