/* ---------- Theme ---------- */
:root {
  --c1: #ffb199; --c2: #ff7eb3; --c3: #ffd36e; --bg: #2a1a2e;
  --ink: #fff; --mute: rgba(255, 255, 255, .72); --edge: rgba(255, 255, 255, .28);
  --glass: linear-gradient(145deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06));
  --blur: blur(26px) saturate(1.4);
  color-scheme: dark;
}
[data-mood="day"]   { --c1: #3a8dde; --c2: #6a7bff; --c3: #2bc8c0; --bg: #12284a; }
[data-mood="night"] { --c1: #3a2a7a; --c2: #1b3a6b; --c3: #6b2a6b; --bg: #07070f; }

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg); color: var(--ink); transition: background .8s;
  font: 16px/1.6 "SF Pro Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }
.sprite { display: none; }
.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Living wallpaper ---------- */
.sky i { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .55; transition: background .8s; animation: drift 22s ease-in-out infinite alternate; }
.sky i:nth-child(1) { width: 55vmax; height: 55vmax; background: var(--c1); top: -20%; left: -10%; }
.sky i:nth-child(2) { width: 50vmax; height: 50vmax; background: var(--c2); bottom: -25%; right: -10%; animation-duration: 28s; }
.sky i:nth-child(3) { width: 40vmax; height: 40vmax; background: var(--c3); top: 30%; left: 35%; animation-duration: 34s; opacity: .35; }
@keyframes drift { to { transform: translate(8vmax, -6vmax) rotate(25deg); } }

/* ---------- Menu bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 1000; height: 40px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; font-size: 14px;
  background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.bar time { position: absolute; left: 50%; transform: translateX(-50%); color: var(--mute); font-variant-numeric: tabular-nums; cursor: default; user-select: none; }
.bar-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: background .2s; }
.bar-btn:hover { background: rgba(255, 255, 255, .16); }
.bar-btn .i { width: 18px; height: 18px; }

/* ---------- Glass windows ---------- */
#desk { position: fixed; inset: 0; pointer-events: none; }
.win {
  pointer-events: auto; position: absolute; left: var(--x, 20px); top: var(--y, 60px); width: min(540px, calc(100vw - 32px));
  border-radius: 26px; overflow: hidden; background: var(--glass); border: 1px solid var(--edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: opacity .35s, transform .5s cubic-bezier(.2, 1.25, .3, 1), box-shadow .3s;
}
.win.wide { width: min(760px, calc(100vw - 32px)); }
.win.top { box-shadow: 0 40px 100px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5); }
.win[hidden] { display: block; opacity: 0; transform: translateY(26px) scale(.92); visibility: hidden; pointer-events: none; }
.win::before { /* soft light that follows the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .2), transparent 60%);
}
.tb { position: relative; display: flex; align-items: center; padding: 14px 18px; touch-action: none; cursor: grab; user-select: none; }
.tb:active { cursor: grabbing; }
.tb h2 { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--mute); pointer-events: none; }
.x { position: relative; z-index: 1; width: 13px; height: 13px; border-radius: 50%; background: var(--dot, #ff5f57); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); transition: filter .2s; }
.x:hover { filter: brightness(1.2); }
.body { padding: 6px 26px 28px; max-height: calc(100dvh - 190px); overflow: auto; }
.body > * + * { margin-top: 14px; }
.body p { color: var(--mute); }

/* ---------- Content ---------- */
.hero h1 { font-size: clamp(38px, 7vw, 58px); line-height: 1.05; letter-spacing: -.04em; }
.note { font-size: 13px; opacity: .8; }
.hero .row { margin-top: 22px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 99px; font-weight: 600; font-size: 15px; color: #1a1030;
  background: rgba(255, 255, 255, .92); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn.ghost { color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid var(--edge); }
.btn.ghost:hover { background: rgba(255, 255, 255, .24); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cards article, .shots a { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.cards h3, .shots h3 { font-size: 16px; }
.cards p, .shots p { font-size: 14px; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 99px; font-size: 13px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.shots a { display: block; padding: 0 0 14px; overflow: hidden; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.shots a:hover { transform: translateY(-5px); }
.shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; margin-bottom: 10px; }
.shots h3, .shots p { padding: 0 14px; }
.center { text-align: center; display: grid; justify-items: center; gap: 14px; }
.i.big { width: 64px; height: 64px; stroke-width: 1.2; }
blockquote { border-left: 2px solid rgba(255, 255, 255, .5); padding-left: 16px; font: 16px/1.75 Georgia, serif; color: var(--mute); }
blockquote small { display: block; font: 12px ui-monospace, monospace; letter-spacing: .06em; margin-bottom: 10px; }
.chat { display: grid; gap: 10px; justify-items: start; }
.chat > * + * { margin-top: 0; }
.bubble { padding: 10px 16px; border-radius: 20px 20px 20px 6px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .2); color: #fff !important; }
.bubble.me, .bubble.ttb { justify-self: end; border-radius: 20px 20px 6px 20px; background: rgba(255, 255, 255, .92); color: #1a1030 !important; font-weight: 600; }

/* Colour-wave letters in the greeting */
#hi i, #lk-name i { display: inline-block; font-style: normal; animation: wave 3s ease-in-out infinite calc(var(--c) * .12s), hue 6s linear infinite calc(var(--c) * -.35s); }
@keyframes wave { 50% { transform: translateY(-6px); } }
@keyframes hue { 0%, 100% { color: #fff; } 25% { color: #ffd36e; } 50% { color: #8ff0ff; } 75% { color: #ffb0e0; } }

/* ---------- Dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: 14px; z-index: 1000; transform: translateX(-50%);
  display: flex; gap: 10px; padding: 10px 14px; border-radius: 30px;
  background: var(--glass); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.dock > * {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255, 255, 255, .12); transition: transform .18s ease-out, background .2s;
  transform: translateY(calc(var(--s, 0) * -12px)) scale(calc(1 + var(--s, 0) * .3));
}
.dock > *:hover { background: rgba(255, 255, 255, .24); }
.dock > *.open::after { content: ""; position: absolute; bottom: -7px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.dock > *::before {
  content: attr(aria-label); position: absolute; bottom: calc(100% + 12px); padding: 4px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap;
  background: rgba(20, 16, 42, .85); opacity: 0; transform: translateY(4px); transition: .2s; pointer-events: none;
}
.dock > *:hover::before { opacity: 1; transform: none; }

/* ---------- Notification ---------- */
#toast {
  position: fixed; top: 52px; right: 16px; z-index: 2000; max-width: 300px; padding: 12px 16px; border-radius: 18px; font-size: 14px;
  background: var(--glass); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  opacity: 0; transform: translateY(-10px); transition: .4s; pointer-events: none;
}
#toast.on { opacity: 1; transform: none; }

@media (min-width: 761px) { #hello { width: min(660px, calc(100vw - 32px)); } }
.hero > p { font-size: 15px; line-height: 1.55; }
.hero > * + * { margin-top: 12px; }

/* ---------- Phones: a glass sheet that hugs its content, one at a time ---------- */
@media (max-width: 760px) {
  .win, .win.wide { left: 12px; right: 12px; top: auto; bottom: 96px; width: auto; max-height: calc(100dvh - 150px); display: flex; flex-direction: column; }
  .body { flex: 1 1 auto; min-height: 0; max-height: none; padding: 4px 20px 22px; }
  .tb { cursor: default; }
  .dock { gap: 6px; padding: 8px 10px; }
  .dock > * { width: 44px; height: 44px; }
  .dock > *::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition-duration: .01s !important; }
}

/* ---------- Window dots, one colour each ---------- */
#hello .x { --dot: #ff6b9a; } #skills .x { --dot: #ffb547; } #work .x { --dot: #3ed6c8; }
#videos .x { --dot: #ff7a59; } #writing .x { --dot: #a78bfa; } #contact .x { --dot: #5ad67d; }

/* ---------- Time-of-day button ---------- */
.bar-btn { position: relative; transition: background .2s, transform .15s; }
.bar-btn:active { transform: scale(.85); }
.bar-btn .m { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; opacity: 0; transform: rotate(-90deg) scale(.4); transition: opacity .35s, transform .5s cubic-bezier(.3, 1.5, .5, 1); pointer-events: none; }
[data-mood="dawn"] .m-dawn, [data-mood="day"] .m-day, [data-mood="night"] .m-night { opacity: 1; transform: none; }
.m * { transform-box: fill-box; transform-origin: center; }
.go .m-dawn .rays { animation: spin .8s cubic-bezier(.3, 1.4, .5, 1); }
.go .m-day .halo { animation: ring .8s ease-out; }
.go .m-day .core { animation: beat .8s ease-out; }
.go .m-night .moon { animation: rock .9s cubic-bezier(.3, 1.4, .5, 1); }
.go .m-night .star { animation: twinkle .9s ease-out; }
@keyframes spin { to { transform: rotate(180deg) scale(1.15); } }
@keyframes ring { 0% { transform: scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes beat { 40% { transform: scale(1.25); } }
@keyframes rock { 0% { transform: rotate(-40deg); } 60% { transform: rotate(12deg); } }
@keyframes twinkle { 0% { transform: scale(0) rotate(-90deg); } 60% { transform: scale(1.4); } }

/* ---------- Glossy bubbles and stars in the wallpaper (each bubble sets its own hue, highlight, speed and pop) ---------- */
.life { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.life i { position: absolute; left: var(--x); bottom: -140px; width: var(--s); height: var(--s); pointer-events: auto; animation: rise var(--d) linear var(--w) infinite; transition: opacity 1s; }
[data-mood="night"] .life i { opacity: .55; }
@keyframes rise { 50% { transform: translate3d(var(--o), -60vh, 0); } 100% { transform: translate3d(0, -120vh, 0); } }
.bb {
  position: absolute; inset: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle, rgba(255, 255, 255, 0) 52%, hsl(var(--h) 90% 70% / .16) 66%, hsl(calc(var(--h) + 70) 90% 72% / .24) 80%, rgba(255, 255, 255, var(--edge, .42)) 100%);
  box-shadow: inset 0 0 calc(var(--s) * .18) hsl(var(--h) 90% 90% / .35), inset calc(var(--s) * .05) calc(var(--s) * .05) calc(var(--s) * .1) rgba(255, 255, 255, .22), 0 0 14px hsl(var(--h) 90% 80% / .12);
  transform: translate(var(--tx, 0px), var(--ty, 0px)) rotate(var(--rot, 0deg)) scale(var(--sx, 1), var(--sy, 1));
  transition: transform .45s cubic-bezier(.3, 1.9, .5, 1), scale .6s cubic-bezier(.3, 1.9, .5, 1), opacity .5s;
}
.bb.dwell { scale: var(--ig, 1.3); transition: transform .45s cubic-bezier(.3, 1.9, .5, 1), scale var(--dw, 1.8s) ease-in; }
.bb::before { /* thin-film rainbow shimmer around the rim */
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: .55; animation: film var(--film, 9s) linear infinite var(--fd, normal);
  background: conic-gradient(hsl(var(--h) 100% 65% / .4), hsl(calc(var(--h) + 90) 100% 65% / .3), hsl(calc(var(--h) + 180) 100% 65% / .3), hsl(var(--h) 100% 65% / .4));
  -webkit-mask: radial-gradient(farthest-side, transparent 80%, #000 95%); mask: radial-gradient(farthest-side, transparent 80%, #000 95%);
}
.bb::after { /* glossy window reflections */
  content: ""; position: absolute; inset: 0; border-radius: 50%; transform: rotate(var(--hr, 0deg));
  background: radial-gradient(ellipse 22% 14% at var(--hx, 30%) var(--hy, 22%), rgba(255, 255, 255, .95), transparent 70%), radial-gradient(ellipse 12% 8% at calc(100% - var(--hx, 30%)) calc(100% - var(--hy, 22%)), rgba(255, 255, 255, .5), transparent 70%);
}
@keyframes film { to { transform: rotate(360deg); } }
.life u { position: absolute; border-radius: 50%; border: 2px solid; pointer-events: none; }
.life s { position: absolute; border-radius: 50%; pointer-events: none; }
.life s.mini { background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .1) 55%); border: 1px solid rgba(255, 255, 255, .5); }
.life s.star { border-radius: 0; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.life b { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 1.2s; }
[data-mood="night"] .life b { opacity: .9; animation: glimmer var(--t) ease-in-out infinite alternate; }
@keyframes glimmer { from { opacity: .15; } to { opacity: 1; } }

/* ---------- Windows come to life when opened ---------- */
.win.wake::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); animation: sweep .9s ease-out forwards;
}
.win.wake .body > :not(.cards):not(.shots):not(.chips):not(.row):not(.chat-line) { animation: rise-in .55s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--n, 0) * 70ms + 120ms); }
.win.wake .cards > *, .win.wake .shots > *, .win.wake .chips > *, .win.wake .row > * { animation: rise-in .55s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--k, 0) * 60ms + 220ms); }
@keyframes sweep { to { transform: translateX(120%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- Night: liquid glass ---------- */
[data-mood="night"] .win, [data-mood="night"] .dock {
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)), rgba(14, 10, 40, .34); border-color: rgba(255, 255, 255, .22);
  box-shadow: inset 1.5px 1.5px 2px rgba(255, 255, 255, .55), inset -1.5px -1.5px 2px rgba(255, 255, 255, .22), inset 0 0 28px rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .5);
}
/* Browsers that can run SVG backdrop filters bend what is behind the focused glass at its edges */
html.lg[data-mood="night"] .win.top, html.lg[data-mood="night"] .dock {
  -webkit-backdrop-filter: var(--lgf) blur(12px) saturate(1.7) brightness(1.1); backdrop-filter: var(--lgf) blur(12px) saturate(1.7) brightness(1.1);
}

/* ---------- Lock screen ---------- */
#lock {
  position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center;
  padding: calc(env(safe-area-inset-top) + 54px) 24px calc(env(safe-area-inset-bottom) + 26px);
  background: linear-gradient(rgba(10, 6, 30, .3), rgba(10, 6, 30, .1) 40%, rgba(10, 6, 30, .42));
  cursor: grab; touch-action: none; user-select: none; outline: none;
  transform: translateY(calc(var(--pull, 0) * -1px)); opacity: calc(1 - var(--pull, 0) / 650);
  transition: transform .6s cubic-bezier(.2, .9, .2, 1), opacity .6s;
}
#lock.drag { transition: none; cursor: grabbing; }
#lock.gone { transform: translateY(-105%); opacity: 0; pointer-events: none; transition: transform .75s cubic-bezier(.7, 0, .2, 1), opacity .75s; }
.lk-top { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; opacity: .9; }
.lk-top .i { width: 18px; height: 18px; }
.lk-mid h1 { font-size: clamp(64px, 17vw, 160px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.lk-mid p { margin-top: 12px; text-transform: uppercase; letter-spacing: .34em; font-size: clamp(11px, 2.3vw, 15px); color: var(--mute); }
.lk-bot { display: grid; justify-items: center; gap: 10px; font-size: 14px; color: var(--mute); }
.chev { width: 14px; height: 14px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: rotate(45deg); animation: nudge 1.6s ease-in-out infinite; }
.home-bar { width: 140px; height: 5px; margin-top: 8px; border-radius: 99px; background: rgba(255, 255, 255, .8); }
@keyframes nudge { 0%, 100% { transform: translateY(5px) rotate(45deg); opacity: .35; } 50% { transform: translateY(-6px) rotate(45deg); opacity: 1; } }

/* The bar and dock stay out of sight until the lock screen opens */
.bar, .dock { transition: opacity .6s .25s, transform .7s .25s cubic-bezier(.2, .9, .2, 1); }
.locked .bar { opacity: 0; transform: translateY(-100%); }
.locked .dock { opacity: 0; transform: translate(-50%, 60px); }

/* ---------- Contact conversation and icon-only socials ---------- */
.chat-line, .email-line, .socials { opacity: 0; visibility: hidden; transform: translateY(7px); }
.chat-line.shown, .email-line.shown, .socials.shown { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .3s ease; }
.typing-dots { display: inline-flex; align-items: center; gap: 5px; height: 1.5em; vertical-align: middle; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .4; animation: dot-bounce 1.1s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.socials { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.socials a, .socials button {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  transition: transform .2s ease, background .2s ease;
}
.socials a:hover, .socials button:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .25); }
.socials .i { width: 21px; height: 21px; }

/* ---------- Refractive glass pass: optical edges, not a frosted rectangle ---------- */
:root {
  --glass-fill: rgba(242, 247, 255, .075);
  --glass-shadow: 0 28px 90px rgba(4, 8, 24, .34);
}
.win, .dock, .bar, #toast {
  isolation: isolate;
  background: linear-gradient(135deg, rgba(255,255,255,.17), rgba(255,255,255,.035) 42%, rgba(255,255,255,.075)), var(--glass-fill);
  border: 0;
  -webkit-backdrop-filter: blur(24px) saturate(1.85) contrast(1.06);
  backdrop-filter: blur(24px) saturate(1.85) contrast(1.06);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.07);
}
.win::after, .dock::after, #toast::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background:
    conic-gradient(from var(--rim-angle, 205deg),
      rgba(255,255,255,.72), rgba(141,220,255,.42) 12%,
      rgba(255,255,255,.12) 25%, rgba(255,169,220,.4) 39%,
      rgba(255,255,255,.1) 52%, rgba(167,190,255,.48) 69%,
      rgba(255,255,255,.68) 82%, rgba(255,255,255,.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .78;
}
.win::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(180px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.24), transparent 72%),
    linear-gradient(115deg, rgba(255,255,255,.12), transparent 24% 72%, rgba(255,255,255,.08));
  opacity: .8;
}
.win > *, .dock > *, #toast > * { position: relative; z-index: 1; }
.win.top, .dock { box-shadow: 0 34px 100px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.42), inset 0 -1px 0 rgba(255,255,255,.08); }
.dock { overflow: visible; }
.dock > * { background: linear-gradient(145deg, rgba(255,255,255,.19), rgba(255,255,255,.045)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 5px 16px rgba(0,0,0,.12); }
.dock > *:focus-visible, .btn:focus-visible, .x:focus-visible, .bar-btn:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 3px; }
.tb { border-bottom: 1px solid rgba(255,255,255,.09); }
.body { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.body::-webkit-scrollbar { width: 7px; }
.body::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(255,255,255,.25); }
.shots small { display: block; padding: 7px 14px 0; color: rgba(255,255,255,.55); font: 10px/1.4 ui-monospace, SFMono-Regular, monospace; letter-spacing: .08em; text-transform: uppercase; }
.shots a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.desktop-hint { display: inline; }
.mobile-hint { display: none; }

/* The rim catches light as the pointer moves; the colour fringe stays restrained. */
@media (hover: hover) and (pointer: fine) {
  .win, .dock { transition: box-shadow .35s, transform .35s; }
  .win:hover { --rim-angle: 250deg; }
  .win.top::after, .dock::after { animation: rim-drift 12s linear infinite; }
}
@keyframes rim-drift { to { --rim-angle: 565deg; } }
@property --rim-angle { syntax: '<angle>'; inherits: false; initial-value: 205deg; }

/* Bubbles are elastic objects: some divide, some ripple, some stretch like a water lens. */
.bb { will-change: transform, border-radius; touch-action: manipulation; }
.bb::before { opacity: .72; filter: blur(.25px); }
.bb::after { mix-blend-mode: screen; }

@media (max-width: 760px) {
  .dock { left: 10px; right: 10px; width: auto; max-width: calc(100vw - 20px); transform: none; justify-content: space-between; gap: clamp(2px, 1.3vw, 8px); padding: 8px clamp(7px, 2vw, 12px); bottom: calc(10px + env(safe-area-inset-bottom)); }
  .dock > * { flex: 1 1 0; min-width: 0; width: auto; max-width: 52px; height: 44px; border-radius: 14px; }
  .dock .i { width: 21px; height: 21px; }
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  .win, .dock { -webkit-backdrop-filter: blur(22px) saturate(1.75); backdrop-filter: blur(22px) saturate(1.75); }
  .shots { grid-template-columns: 1fr; }
  .shots img { aspect-ratio: 16 / 9; }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); }
}
@media (prefers-reduced-transparency: reduce) {
  .win, .dock, .bar, #toast { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(35,28,58,.94); }
  .win::after, .dock::after, #toast::after { opacity: .35; }
}
/* Enable the actual backdrop displacement on browsers that support SVG filter URLs. */
html.lg .win.top, html.lg .dock {
  -webkit-backdrop-filter: var(--lgf) blur(16px) saturate(1.9) brightness(1.08);
  backdrop-filter: var(--lgf) blur(16px) saturate(1.9) brightness(1.08);
}

/* ---------- Calmer glass: less colour piling up when windows overlap ----------
   Every glass layer re-saturates whatever sits behind it, including the layer below it,
   so stacked windows multiply each other's colour. Keep --glass-sat close to 1 to tame that.
   Dial these three numbers to taste. */
:root {
  --glass-sat: 1.2;       /* was 1.85 / 1.9. 1 = no extra colour boost */
  --glass-bright: 0.99;      /* was 1.08 on the focused window */
  --rim-tint: .25;        /* strength of the pink/blue/cyan edge light. was .4 to .48 */
}
@media (prefers-reduced-transparency: no-preference) {
  .win, .dock, .bar, #toast {
    -webkit-backdrop-filter: blur(24px) saturate(var(--glass-sat));
    backdrop-filter: blur(25px) saturate(var(--glass-sat));
  }
  html.lg .win.top, html.lg .dock,
  html.lg[data-mood="night"] .win.top, html.lg[data-mood="night"] .dock {
    -webkit-backdrop-filter: var(--lgf) blur(16px) saturate(var(--glass-sat)) brightness(var(--glass-bright));
    backdrop-filter: var(--lgf) blur(16px) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  }
}
.win::after, .dock::after, #toast::after {
  background: conic-gradient(from var(--rim-angle, 205deg),
    rgba(255,255,255,.62), rgba(141,220,255,var(--rim-tint)) 12%,
    rgba(255,255,255,.12) 25%, rgba(255,169,220,var(--rim-tint)) 39%,
    rgba(255,255,255,.1) 52%, rgba(167,190,255,var(--rim-tint)) 69%,
    rgba(255,255,255,.58), rgba(255,255,255,.2));
}
