/* ============================================================================
   baubra.com/next3 · "Pixel Potion"
   next1's aurora and frosted glass, plus next2's particles: they spell the
   name, drift behind the glass, and swarm around whatever you hover.
   ========================================================================== */
:root {
  --bg: #07060d;
  --ink: #f4f2fb;
  --muted: rgba(236, 232, 250, .62);
  --faint: rgba(236, 232, 250, .38);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --c1: #8b6bff;              /* the aurora's colours; app.js moves them with the page */
  --c2: #2fd6c3;
  --c3: #ff5fae;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: color-mix(in srgb, var(--c1) 55%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--c2) 80%, white); outline-offset: 3px; border-radius: 10px; }

/* ---------------------------------------------------------------- background */
#aurora, .aurora-css { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; }
#particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* the opening: a soft coloured bloom where the orb was */
.boom { position: fixed; z-index: -1; width: 0; height: 0; pointer-events: none; }
.boom::before { content: ""; position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(220,212,255,.26), rgba(139,107,255,.14) 40%, rgba(47,214,195,.05) 62%, transparent 72%);
  mix-blend-mode: screen; animation: boom-bloom 2.6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes boom-bloom { 0% { transform: scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(7); opacity: 0; } }
/* the particles draw the name; the real text keeps its space (and is the fallback without WebGL) */
.particles-on .title .ch { visibility: hidden; }
.js .title { visibility: hidden; }   /* the particles draw the name; don't flash the plain one first */
.particles-on .title { font-size: clamp(4.8rem, 19vw, 16rem); }   /* the particle name, a little bigger than the plain title */
@media (max-width: 600px) { .particles-on .title { font-size: 23vw; } }   /* bigger still on phones, so the particle letters read */
.aurora-css { display: none; overflow: hidden; background: var(--bg); }
.no-gl #aurora { display: none; }
.no-gl .aurora-css { display: block; }
.aurora-css i {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: .45;
  animation: drift 38s ease-in-out infinite alternate;
}
.aurora-css i:nth-child(1) { background: var(--c1); left: -20vmax; top: -25vmax; }
.aurora-css i:nth-child(2) { background: var(--c2); right: -25vmax; top: 10vmax; animation-duration: 46s; animation-delay: -12s; }
.aurora-css i:nth-child(3) { background: var(--c3); left: 10vmax; bottom: -35vmax; animation-duration: 52s; animation-delay: -24s; opacity: .3; }
@keyframes drift { to { transform: translate(12vmax, 8vmax) scale(1.15); } }
/* film grain keeps the gradients from banding and gives the glass texture */
.grain {
  position: fixed; inset: -50%; z-index: -2; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- glass */
.glass {
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 24px 60px -30px rgba(0, 0, 0, .7);
}

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; z-index: 20; top: 14px; left: 50%; translate: -50% 0;
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  transition: background .4s, border-color .4s, translate .5s var(--ease);
}
.nav.scrolled { background: rgba(14, 12, 24, .55); border-color: var(--line-strong); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -.01em; font-size: 1.05rem; }
.mark {
  width: 22px; height: 22px; border-radius: 7px; position: relative; overflow: hidden;
  background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c1));
  animation: spin 9s linear infinite;
}
.mark::after { content: ""; position: absolute; inset: 5px; border-radius: 3px; background: var(--bg); }
@keyframes spin { to { rotate: 360deg; } }
/* GPU particles draw the logo themselves (same shape and colours); resting particles live here */
.gpu-on .mark { background: none; animation: none; overflow: visible; }
.gpu-on .mark::after { display: none; }
.orb { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; translate: -50% -50%; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%); mask-image: radial-gradient(circle, #000 20%, transparent 68%); }
.nav nav { display: flex; align-items: center; gap: 4px; }
.nav nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .93rem; transition: color .25s, background .25s; }
.nav nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.nav nav .nav-cta { color: var(--bg); background: var(--ink); font-weight: 550; }
.nav nav .nav-cta:hover { background: #fff; color: var(--bg); }
@media (max-width: 640px) { .nav nav .opt { display: none; } }
/* pause animations (for motion sensitivity): a small button in the nav */
.still-btn { all: unset; box-sizing: border-box; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--muted); transition: color .2s, background .2s; }
.still-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.still-btn:focus-visible { outline: 2px solid var(--c2); outline-offset: 2px; }
.still-btn svg { width: 17px; height: 17px; fill: currentColor; }
.still-btn .i-play, .still .still-btn .i-pause { display: none; }
.still .still-btn .i-play { display: block; }
.still .still-btn { color: var(--ink); background: rgba(255, 255, 255, .1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* paused: no particles (the plain name shows instead), no looping or entrance animations */
.still #particles { display: none; }
.still .title, .still.js .title, .still .particles-on .title .ch { visibility: visible !important; }
.still *, .still *::before, .still *::after { animation: none !important; }
/* the logo is normally drawn by the particles: while paused, show the plain one (still) */
.still .gpu-on .mark { background: conic-gradient(from 0deg, var(--c1), var(--c2), var(--c3), var(--c1)); overflow: hidden; }
.still .gpu-on .mark::after { display: block; }
.still .orb { display: none; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 550; font-size: .98rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .35s var(--ease), background .3s, box-shadow .35s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary {
  color: #0b0914; background: linear-gradient(120deg, #fff, color-mix(in srgb, var(--c2) 35%, #fff));
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--c2) 70%, transparent);
}
.btn.primary:hover { box-shadow: 0 16px 40px -12px color-mix(in srgb, var(--c2) 90%, transparent); }
.btn.ghost { color: var(--ink); }
.btn.ghost:hover { border-color: var(--line-strong); }

/* ---------------------------------------------------------------- intro */
.intro {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px var(--gutter) 90px; position: relative;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: .88rem; color: var(--muted); cursor: pointer; margin-bottom: 30px;
  transition: border-color .3s, color .3s, transform .35s var(--ease);
  animation: rise 1s var(--ease) .1s both;
}
.pill:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
/* the ping ring is a pseudo-element scaled + faded (compositor-only: no repaint every frame) */
.pill .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--c2); }
.pill .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c2); opacity: .7; animation: ping 2.4s ease-out infinite; }
.pill-k { color: var(--ink); font-weight: 550; }
.pill .arrow { transition: translate .3s var(--ease); }
.pill:hover .arrow { translate: 3px 0; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.25); opacity: 0; } }

.title {
  margin: 0; font-weight: 700; letter-spacing: -.055em; line-height: .9;
  font-size: clamp(4.2rem, 17vw, 13.5rem);
  will-change: transform;
}
/* One gradient flows across the whole word: each letter paints its own slice of
   it (app.js measures --x, each letter's offset, and --w, the word's width). */
@property --sh { syntax: "<number>"; inherits: true; initial-value: 0; }
.title { animation: sheen 14s ease-in-out infinite alternate; }
.particles-on .title { animation: none; }   /* the particles draw the name; the hidden heading needn't restyle every frame */
@keyframes sheen { to { --sh: 1; } }
.title .ch {
  display: inline-block;
  background: linear-gradient(100deg, #fff 8%, color-mix(in srgb, var(--c1) 70%, #fff) 30%, color-mix(in srgb, var(--c2) 70%, #fff) 50%, color-mix(in srgb, var(--c3) 60%, #fff) 70%, #fff 92%);
  background-size: calc(var(--w, 800) * 2px) 100%;
  background-position: calc((var(--x, 0) + var(--sh) * var(--w, 800)) * -1px) 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: letter 1.2s var(--ease) both;
  padding-bottom: .08em;
}
@keyframes letter { from { opacity: 0; transform: translateY(.35em) rotate(4deg); filter: blur(14px); } }
.sub { max-width: 34ch; margin: 26px auto 0; font-size: clamp(1.08rem, 2.2vw, 1.35rem); line-height: 1.5; color: var(--muted); animation: rise 1s var(--ease) .55s both; }
.sub b { color: var(--ink); font-weight: 550; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 36px; animation: rise 1s var(--ease) .7s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); animation: rise 1s var(--ease) 1s both;
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--ink); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------------- sections */
.section { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 70px 0; }
/* sections glide up and grow into place as they scroll in (app.js sets --rp 0..1) */
.flow { transform: translateY(calc((1 - var(--rp, 1)) * 70px)) scale(calc(.94 + var(--rp, 1) * .06)); transform-origin: 50% 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
h2 { margin: 0; font-weight: 650; letter-spacing: -.035em; line-height: 1.05; font-size: clamp(2rem, 4.6vw, 3.3rem); }
.count { margin: 0; color: var(--faint); font-size: .95rem; }

/* ---------------------------------------------------------------- toolbar */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px; border-radius: 999px; margin-bottom: 26px;
}
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  border: 0; background: transparent; color: var(--muted); padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font-size: .92rem; display: inline-flex; gap: 7px; align-items: center; transition: color .25s, background .3s;
}
.chip i { font-style: normal; font-family: var(--mono); font-size: .75rem; color: var(--faint); }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: #0b0914; background: var(--ink); }
.chip[aria-pressed="true"] i { color: rgba(11, 9, 20, .55); }
.tools { display: flex; gap: 8px; align-items: center; }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 38px; border-radius: 999px;
  background: rgba(0, 0, 0, .22); border: 1px solid var(--line); transition: border-color .25s;
}
.search:focus-within { border-color: var(--line-strong); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; }
.search input { width: 150px; border: 0; background: transparent; outline: none; font-size: .92rem; }
.search input::placeholder { color: var(--faint); }
select {
  height: 38px; border-radius: 999px; padding: 0 34px 0 14px; cursor: pointer; font-size: .92rem;
  background: rgba(0, 0, 0, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  border: 1px solid var(--line); appearance: none; -webkit-appearance: none;
}
select option { background: #15121f; }
@media (max-width: 720px) {
  .toolbar { border-radius: 24px; }
  .tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
}

/* ---------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.card {
  --a: var(--c1); --b: var(--c2); --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; color: var(--ink);
  transition: transform .6s var(--ease), border-color .4s, box-shadow .6s var(--ease), opacity .6s var(--ease);
}
.card.pre { opacity: 0; transform: translateY(40px) scale(.96); }
.card.gone { display: none; }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--a) 45%, var(--line)); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 30px 70px -30px color-mix(in srgb, var(--a) 55%, transparent); }
/* light that follows the pointer across the glass */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .10), transparent 45%);
}
.card:hover::before { opacity: 1; }
.media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin: 8px 8px 0; border-radius: calc(var(--radius) - 8px); background: #0d0b16; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s; }
.media video { opacity: 0; }
.media video.on { opacity: 1; }
.card:hover .media img, .card:hover .media video { transform: scale(1.04); }
.pixel img, .pixel video { image-rendering: pixelated; }
/* projects with no image get generated art in their own colours */
.art { display: grid; place-items: center; background:
  radial-gradient(60% 80% at 20% 20%, color-mix(in srgb, var(--a) 70%, transparent), transparent 70%),
  radial-gradient(60% 80% at 85% 80%, color-mix(in srgb, var(--b) 60%, transparent), transparent 70%), #0d0b16; }
.art span { font-size: clamp(3rem, 9vw, 5rem); font-weight: 700; letter-spacing: -.06em; color: rgba(255,255,255,.9); mix-blend-mode: overlay; }
.art::after { content: ""; position: absolute; inset: 0; background: inherit; filter: blur(30px); opacity: .5; animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.2) rotate(8deg); } }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--ink); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status.live::before { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status.proto::before { background: #fbbf24; }
.meta .year { margin-left: auto; font-family: var(--mono); color: var(--faint); }
.card h3 { margin: 0; font-size: 1.45rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.15; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; padding: 4px 10px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); background: rgba(0,0,0,.18); }
.card .tags { margin-top: auto; padding-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------------------------------------------------------------- timeline */
.tl-wrap { position: relative; padding-left: 38px; }
.tl-line { position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tl-line span { position: absolute; inset: 0; transform-origin: 50% 0; transform: scaleY(var(--tp, 0)); background: linear-gradient(var(--c1), var(--c2), var(--c3)); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tl li { position: relative; }
.tl li::before {
  content: ""; position: absolute; left: -33px; top: 26px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--a, var(--c1)); box-shadow: 0 0 14px var(--a, var(--c1));
}
/* hovering a row makes its dot on the line swell and glow */
.tl li::before { transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .3s; }
.tl li:hover::before { transform: scale(1.6); background: var(--a, var(--c1)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a, var(--c1)) 25%, transparent), 0 0 24px var(--a, var(--c1)); }
.tl button {
  width: 100%; display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 18px; text-align: left;
  padding: 16px 20px; border-radius: 18px; cursor: pointer; transition: transform .45s var(--ease), border-color .3s;
}
.tl button:hover { transform: translateX(6px); border-color: color-mix(in srgb, var(--a) 45%, var(--line)); }
.tl .when { font-family: var(--mono); font-size: .82rem; color: var(--faint); }
.tl .what b { display: block; font-size: 1.1rem; font-weight: 600; letter-spacing: -.015em; }
.tl .what span { color: var(--muted); font-size: .92rem; }
.tl .go { color: var(--faint); transition: translate .3s var(--ease), color .3s; }
.tl button:hover .go { translate: 4px 0; color: var(--ink); }
@media (max-width: 600px) { .tl button { grid-template-columns: 1fr auto; } .tl .when { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- about + contact */
.about { border-radius: 28px; padding: clamp(26px, 5vw, 56px); display: grid; gap: 40px; }
@media (min-width: 900px) { .about { grid-template-columns: 1.1fr 1fr; gap: 64px; } }
.about p { color: var(--muted); font-size: 1.08rem; margin: 18px 0 0; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.skills h3 { margin: 0 0 10px; font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-family: var(--mono); }
.skills ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.skills li { font-size: 1rem; }
/* contact: big words on the left, and the particles form an @ on the right (as on /next2) */
.contact { min-height: 80svh; display: grid; align-items: center; gap: 30px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1.15fr 1fr; gap: 40px; } }
.contact h2 { font-size: clamp(3rem, 8.5vw, 7rem); line-height: .95; letter-spacing: -.05em; }
.contact p { color: var(--muted); font-size: 1.15rem; margin: 22px 0 30px; max-width: 40ch; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-art { width: 100%; aspect-ratio: 1; max-height: 70svh; justify-self: center; }
@media (max-width: 899px) { .contact-art { order: -1; width: min(72vw, 360px); } }

.foot {
  width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: 30px auto 0; padding: 26px 0 40px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line);
  color: var(--faint); font-size: .88rem;
}
.foot a { color: var(--muted); } .foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- project sheet */
.sheet {
  --a: var(--c1); --b: var(--c2);
  border: 0; padding: 0; background: transparent; color: var(--ink); max-width: none; max-height: none;
  width: 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(5, 4, 10, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sheet[open] .sheet-card { animation: sheet-in .6s var(--ease) both; }
.sheet.closing .sheet-card { animation: sheet-out .3s ease-in both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(20px) scale(.98); } }
.sheet-card {
  position: relative; width: min(980px, calc(100% - 2 * var(--gutter))); margin: clamp(16px, 6vh, 70px) auto;
  border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, rgba(30, 26, 46, .72), rgba(16, 14, 26, .78));
}
.close {
  position: absolute; z-index: 3; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(0, 0, 0, .45); border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .3s var(--ease);
}
.close:hover { transform: rotate(90deg); }
.close svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.s-media { position: relative; aspect-ratio: 16 / 9; background: #0d0b16; }
.s-media img, .s-media video { width: 100%; height: 100%; object-fit: cover; }
.s-media.art { aspect-ratio: 16 / 6; }
.s-body { padding: clamp(22px, 4vw, 44px); }
.s-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: .88rem; }
.s-meta .kind { color: var(--ink); }
.s-body h2 { margin: 14px 0 0; }
.s-summary { color: var(--muted); font-size: 1.12rem; max-width: 62ch; margin: 14px 0 0; }
.s-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.s-links .btn.primary { background: linear-gradient(120deg, #fff, color-mix(in srgb, var(--a) 40%, #fff)); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--a) 70%, transparent); }
.s-cols { display: grid; gap: 30px; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .s-cols { grid-template-columns: 1.5fr 1fr; } }
.s-cols h3 { margin: 0 0 14px; font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-family: var(--mono); }
.s-built { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.s-built li { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.5; }
.s-built li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 3px; background: linear-gradient(135deg, var(--a), var(--b)); }
.s-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 30px; }
.s-shots:empty { display: none; }
.s-shots figure { margin: 0; }
.s-shots img { border-radius: 14px; border: 1px solid var(--line); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.s-shots figcaption { color: var(--faint); font-size: .85rem; margin-top: 8px; }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: 28px; translate: -50% 0; padding: 10px 18px; border-radius: 999px;
  font-size: .92rem; animation: toast 2.2s var(--ease) both; pointer-events: none;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(12px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* phones: blurring what's behind every card (over a moving background) is the most
   expensive thing on the page, so the big panels use a solid tint instead */
@media (max-width: 720px), (hover: none) {
  .card.glass, .tl button.glass, .about.glass, .contact.glass, .sheet-card.glass {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: linear-gradient(180deg, rgba(34, 30, 52, .86), rgba(22, 20, 36, .9));
  }
}

/* What I built, day by day (a project's log) */
.s-built-note { margin: -6px 0 14px; color: var(--muted); font-size: .95rem; }
.s-log { gap: 18px; }
.s-log > li.s-day { padding: 0 0 0 20px; border-left: 2px solid color-mix(in srgb, var(--a) 45%, transparent); }
.s-log > li.s-day::before { left: -6px; top: .35em; width: 10px; height: 10px; border-radius: 50%; }
.s-day time { display: block; font: 500 .74rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.s-day > b { display: block; margin-top: 7px; font-size: 1.05rem; }
.s-day > p { margin: 5px 0 0; color: var(--muted); }
.s-day details { margin-top: 8px; }
.s-day summary { cursor: pointer; width: fit-content; font-size: .9rem; font-weight: 600; color: var(--ink); list-style: none; }
.s-day summary::-webkit-details-marker { display: none; }
.s-day summary::before { content: "+"; display: inline-block; width: 1.1em; color: var(--a); font-weight: 700; }
.s-day details[open] summary::before { content: "-"; }
.s-day details ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.s-day details li { position: relative; padding-left: 16px; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.s-day details li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 2px; background: linear-gradient(135deg, var(--a), var(--b)); }
