/*
  Design notes
  - One bold move: the oversized glitching name in the hero. Everything else stays quiet.
  - Magenta is the lead accent (name, CTAs, active states). Cyan only means "live"
    (status pulse, now playing, clock). Acid yellow only for ratings.
  - Rajdhani for display, Inter for reading, JetBrains Mono only for timestamps and data.
  - Clipped corners mark the main surfaces (portrait, tiles, form); small controls stay square.
*/
:root {
  color-scheme: dark;
  --void: #0a0a12;
  --deep: #0d0221;
  --panel: #14142b;
  --panel-hi: #1c1c3a;
  --line: #26264a;
  --text: #d6d6e7;
  --muted: #9d9dc0;
  --white: #f4f3ff;
  --mag: #ff2a6d;
  --cyan: #05d9e8;
  --acid: #f9f002;
  --violet: #7b2cbf;

  --display: "Rajdhani", "Orbitron", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --glow: 0 0 10px rgb(255 42 109 / .55), 0 0 32px rgb(255 42 109 / .25);
  --gutter: max(16px, 5vw);
  --max: 1200px;
  --cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  --cut-s: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(70rem 40rem at 85% -5%, rgb(123 44 191 / .28), transparent 60%),
    radial-gradient(50rem 30rem at -10% 40%, rgb(255 42 109 / .08), transparent 60%),
    var(--void);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  font-feature-settings: "ss01", "cv11";
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 8px 14px; background: var(--panel); }

.crt {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgb(0 0 0 / .14) 3px 4px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 10px 20px; border: 1px solid var(--line); background: transparent;
  font: 600 1rem/1 var(--display); letter-spacing: .04em; text-decoration: none;
  clip-path: var(--cut-s); transition: background .2s, color .2s, box-shadow .2s;
}
.btn-hot { background: var(--mag); border-color: var(--mag); color: var(--void); }
.btn-hot:hover { box-shadow: var(--glow); background: #ff4d86; }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
main > section { padding-top: clamp(64px, 10vw, 120px); }
.head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  margin-bottom: 28px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
h2 {
  margin: 0; font: 700 clamp(2.2rem, 5vw, 3.4rem)/1 var(--display); letter-spacing: -.01em;
  color: var(--white); text-shadow: 0 0 18px rgb(255 42 109 / .25);
}
.aside { margin: 0; color: var(--muted); font-size: .95rem; }
.label { font: 500 .8rem var(--mono); color: var(--muted); }

/* ---------- placeholder art (shown until a real image is set) ---------- */
.ph {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(to bottom, rgb(255 255 255 / .035) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 25% 20%, hsl(var(--h) 95% 62% / .55), transparent 55%),
    radial-gradient(circle at 85% 85%, hsl(calc(var(--h) + 55) 95% 55% / .45), transparent 50%),
    linear-gradient(155deg, hsl(var(--h) 55% 16%), hsl(calc(var(--h) + 40) 60% 6%));
}
.media { overflow: hidden; background: var(--panel); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 5vw, 72px);
  align-items: end; padding-top: clamp(48px, 9vw, 112px) !important;
}
.hero-floor {
  position: absolute; z-index: -1; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); bottom: -40px; height: 70%;
  background:
    linear-gradient(to right, rgb(5 217 232 / .12) 1px, transparent 1px) 50% 0 / 56px 100%,
    linear-gradient(to bottom, rgb(5 217 232 / .12) 1px, transparent 1px) 0 0 / 100% 40px;
  transform: perspective(380px) rotateX(58deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%);
}
.status-line { margin: 0 0 18px; }
/* The whole status is a button: tap it, edit, approve with your Nostr signer. */
.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 0; margin-left: 0;
  font: inherit; color: var(--muted); background: none; border: 0; border-bottom: 1px dashed transparent; cursor: pointer;
  transition: color .2s, border-color .2s;
}
.status:hover, .status:focus-visible { color: var(--white); border-bottom-color: rgb(5 217 232 / .5); }
.status-edit { font-size: .9em; color: var(--cyan); opacity: 0; transition: opacity .2s; }
.status:hover .status-edit, .status:focus-visible .status-edit { opacity: 1; }
@media (hover: none) { .status-edit { opacity: .6; } } /* touch screens have no hover, so keep the pencil visible */
.pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: pulse 2.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.name {
  position: relative; margin: 0 0 0 -.04em;
  font: 700 clamp(5.5rem, 19vw, 15rem)/.82 var(--display); letter-spacing: -.035em;
  color: var(--mag); text-shadow: var(--glow);
}
.name::before, .name::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; text-shadow: none; }
.name::before { color: var(--cyan); animation: glitch-a 5s infinite steps(1); clip-path: inset(100% 0 0 0); }
.name::after { color: var(--acid); opacity: .7; animation: glitch-b 7s infinite steps(1); clip-path: inset(100% 0 0 0); }
@keyframes glitch-a {
  0%, 93%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  94% { clip-path: inset(12% 0 62% 0); transform: translate(-6px, 0); }
  96% { clip-path: inset(58% 0 18% 0); transform: translate(5px, 0); }
  98% { clip-path: inset(34% 0 44% 0); transform: translate(-3px, 0); }
}
@keyframes glitch-b {
  0%, 95%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  96% { clip-path: inset(72% 0 6% 0); transform: translate(4px, 0); }
  98% { clip-path: inset(4% 0 80% 0); transform: translate(-4px, 0); }
}
.lede { max-width: 34ch; margin: 28px 0 28px; font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--text); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; text-decoration: none; font-size: .92rem;
  border: 1px solid var(--line); background: rgb(20 20 43 / .6); transition: border-color .2s, color .2s;
}
.socials a:hover { border-color: var(--mag); color: var(--white); }
.socials .king { width: 15px; height: 15px; fill: currentColor; flex: none; }
.socials .chess-link:hover .king { fill: var(--mag); filter: drop-shadow(0 0 4px rgb(255 42 109 / .6)); }

.portrait { margin: 0; justify-self: end; width: 100%; max-width: 380px; }
.portrait-frame {
  aspect-ratio: 4 / 5; clip-path: var(--cut); position: relative;
  border: 1px solid var(--mag); box-shadow: inset 0 0 0 1px var(--mag);
}
.portrait-frame > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(255 42 109 / .25), transparent 40%);
  mix-blend-mode: screen;
}
.portrait figcaption { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: .9rem; }
.portrait time { font-family: var(--mono); color: var(--cyan); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { justify-self: start; max-width: 260px; order: -1; }
}

/* ---------- right now bento ---------- */
.bento {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "play  play  photo photo"
    "watch fit   photo photo"
    "read  note  note  place"
    "btc   btc   btc   btc";
}
.tile {
  position: relative; min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); border: 1px solid var(--line);
  clip-path: var(--cut); text-decoration: none; transition: border-color .25s;
}
a.tile:hover, .tile:has(a:hover) { border-color: rgb(255 42 109 / .6); }
.tile .label { display: flex; align-items: center; gap: 8px; }
.tile h3 { margin: 0; font: 700 1.6rem/1.05 var(--display); color: var(--white); overflow-wrap: anywhere; }
.tile p { margin: 0; }
.tile .sub { color: var(--muted); font-size: .95rem; }

.t-play { grid-area: play; flex-direction: row; align-items: center; gap: 20px; }
.t-play .art { flex: 0 0 auto; width: clamp(88px, 11vw, 132px); aspect-ratio: 1; clip-path: var(--cut-s); }
.t-play .label { color: var(--cyan); }
.t-play h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.t-play .info { display: grid; gap: 6px; min-width: 0; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; height: 100%; background: var(--cyan); transform-origin: bottom; animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: -.4s; animation-duration: .8s; }
.eq i:nth-child(3) { animation-delay: -.2s; animation-duration: 1.2s; }
.eq i:nth-child(4) { animation-delay: -.6s; animation-duration: .9s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
/* Not playing right now: bars rest, label goes quiet. */
.t-play .label.idle { color: var(--muted); }
.eq.idle i { animation: none; background: var(--muted); transform: scaleY(.3); }
.eq.idle i:nth-child(2) { transform: scaleY(.55); }
.eq.idle i:nth-child(3) { transform: scaleY(.4); }
.music.solo { grid-template-columns: minmax(0, 760px); }

.t-photo { grid-area: photo; padding: 0; min-height: 380px; justify-content: flex-end; }
.t-photo .media { position: absolute; inset: 0; }
.t-photo .media img, .t-photo .ph { transition: transform .8s var(--ease); }
.t-photo:hover .media img, .t-photo:hover .ph { transform: scale(1.04); }
.t-photo .cap {
  position: relative; padding: 60px 20px 20px; display: grid; gap: 4px;
  background: linear-gradient(to top, rgb(10 10 18 / .92), transparent);
}

.t-watch { grid-area: watch; }
.t-fit { grid-area: fit; }
.t-read { grid-area: read; }
.t-note { grid-area: note; }
.t-note p:not(.label) { max-width: 52ch; }
.t-place { grid-area: place; justify-content: space-between; }
.t-place .clock { font: 500 clamp(2rem, 3.4vw, 2.6rem)/1 var(--mono); color: var(--cyan); text-shadow: 0 0 14px rgb(5 217 232 / .45); letter-spacing: -.02em; }
.t-thumb { display: flex; gap: 14px; align-items: center; }
.t-thumb .media { flex: 0 0 auto; width: 64px; aspect-ratio: 2 / 3; }
.t-fit .t-thumb .media { aspect-ratio: 3 / 4; }
.t-thumb h3 { font-size: 1.3rem; }

@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "play play" "photo photo" "watch fit" "read place" "note note" "btc btc";
  }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: "play" "photo" "watch" "fit" "read" "note" "place" "btc"; }
  .t-photo { min-height: 320px; }
  .t-play .art { width: 80px; }
}

/* Bitcoin strip: acid yellow is the "money" color (also used for zaps and ratings). */
.t-btc {
  grid-area: btc; display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 20px 32px; align-items: center;
  background:
    linear-gradient(rgb(249 240 2 / .035) 1px, transparent 1px) 0 0 / 100% 12px,
    linear-gradient(180deg, var(--panel-hi), var(--panel));
}
a.t-btc:hover { border-color: rgb(249 240 2 / .55); }
.t-btc .label { color: var(--muted); }
.t-btc .height {
  font: 500 clamp(2.4rem, 4.6vw, 3.4rem)/1 var(--mono); letter-spacing: -.03em;
  color: var(--acid); text-shadow: 0 0 16px rgb(249 240 2 / .45); font-variant-numeric: tabular-nums;
}
.t-btc .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.t-btc .price > span:first-child { font: 700 clamp(1.8rem, 3vw, 2.3rem)/1 var(--display); color: var(--white); font-variant-numeric: tabular-nums; }
.t-btc .chg { font: 500 .85rem var(--mono); }
.t-btc .chg.up { color: var(--cyan); }
.t-btc .chg.down { color: #ff6b95; }
.spark { display: block; width: 100%; height: 48px; margin-top: 8px; overflow: visible; }
.spark .line { fill: none; stroke: var(--acid); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgb(249 240 2 / .6)); }
.spark .area { fill: rgb(249 240 2 / .08); }
.btc-stats { display: grid; gap: 10px; margin: 0; }
.btc-stats div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.btc-stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.btc-stats dt { font: .8rem var(--mono); color: var(--muted); }
.btc-stats dd { margin: 0; color: var(--white); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.btc-stats dd small { display: block; font: .78rem var(--mono); color: var(--muted); }
@media (max-width: 860px) {
  .t-btc { grid-template-columns: 1fr 1fr; }
  .btc-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .btc-stats div { flex-direction: column; border-bottom: 0; padding: 0; }
  .btc-stats dd { text-align: left; }
}
@media (max-width: 560px) {
  .t-btc { grid-template-columns: 1fr; }
  .btc-stats { grid-template-columns: 1fr; }
  .btc-stats div { flex-direction: row; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .btc-stats dd { text-align: right; }
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 16px 48px; align-items: start; }
.about h2 { grid-row: span 2; }
.about-body p { margin: 0 0 16px; max-width: 62ch; font-size: 1.1rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 0; padding: 1px 0 0 1px; }
@media (max-width: 640px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Overlapping borders instead of a gap-colored background, so a short last row leaves no filled hole. */
.facts div { padding: 14px 16px; border: 1px solid var(--line); margin: -1px 0 0 -1px; }
.facts dt { font: 500 .8rem var(--mono); color: var(--muted); }
.facts dd { margin: 4px 0 0; color: var(--white); font-weight: 500; }
/* A linked fact: the whole cell is the click target. */
.facts .linked { position: relative; transition: border-color .2s, background .2s; }
.facts .linked a { color: var(--white); text-decoration: none; }
.facts .linked a::after { content: ""; position: absolute; inset: 0; }
.facts .linked:hover { border-color: var(--mag); background: rgb(255 42 109 / .06); z-index: 1; }
.facts .linked:hover a { color: var(--mag); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about h2 { grid-row: auto; } }

/* ---------- photos ---------- */
.masonry { columns: 3 260px; column-gap: 14px; }
.shot {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: zoom-in;
  position: relative; break-inside: avoid; text-align: left;
}
.shot .media { border: 1px solid var(--line); transition: border-color .25s; }
.shot .ph { aspect-ratio: var(--r, 4 / 5); }
.shot .media img { height: auto; transition: transform .8s var(--ease); }
.shot .ph { transition: transform .8s var(--ease); }
.shot:hover .media { border-color: var(--mag); }
.shot:hover img, .shot:hover .ph { transform: scale(1.03); }
.shot .cap {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px 0;
  font-size: .92rem; color: var(--text);
}
.shot .cap span:last-child { color: var(--muted); font: .8rem var(--mono); padding-top: 3px; white-space: nowrap; }

/* ---------- "See all" folding (photos, Letterboxd) ---------- */
.folded > .extra { display: none; }
.more {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 18px;
  padding: 14px 20px; cursor: pointer; background: transparent; color: var(--white);
  border: 1px solid var(--line); clip-path: var(--cut-s);
  font: 600 1.05rem var(--display); letter-spacing: .04em; transition: border-color .2s, color .2s, box-shadow .2s;
}
.more::after { content: "▾"; color: var(--mag); transition: transform .2s; }
.more[aria-expanded="true"]::after { transform: rotate(180deg); }
.more:hover { border-color: var(--mag); color: var(--mag); box-shadow: 0 0 12px rgb(255 42 109 / .25); }

/* ---------- closet rail ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 280px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px;
  scrollbar-color: var(--mag) var(--panel);
  mask-image: linear-gradient(to right, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
}
.rail:focus-visible { outline-offset: 6px; }
.fit { scroll-snap-align: start; display: grid; gap: 10px; align-content: start; }
.fit .media { aspect-ratio: 3 / 4; clip-path: var(--cut); }
.fit .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fit h3 { margin: 0; font: 700 1.35rem/1.1 var(--display); color: var(--white); }
.fit h3 a { text-decoration: none; }
.fit h3 a:hover { color: var(--mag); }
.fit .brand { color: var(--muted); font-size: .92rem; }
.fit p { margin: 0; font-size: .95rem; }
.chip { font: 500 .78rem var(--mono); color: var(--mag); border: 1px solid rgb(255 42 109 / .45); padding: 2px 8px; white-space: nowrap; }

/* ---------- music ---------- */
.music { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .music { grid-template-columns: 1fr; } }
.tracks { list-style: none; margin: 0; padding: 0; }
.tracks li {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center;
  padding: 12px 12px 12px 8px; border-bottom: 1px solid var(--line); transition: background .2s;
}
.tracks li::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; background: var(--mag); opacity: 0; transition: opacity .2s; box-shadow: var(--glow); }
.tracks li:hover { background: rgb(255 42 109 / .05); }
.tracks li:hover::before { opacity: 1; }
.tracks .media { width: 56px; aspect-ratio: 1; }
.tracks .t { font: 700 1.3rem/1.1 var(--display); color: var(--white); }
.tracks .a { color: var(--muted); font-size: .92rem; }
.tracks .n { font-size: .92rem; margin-top: 2px; }
.tracks .play {
  display: grid; place-items: center; width: 38px; height: 38px; text-decoration: none;
  border: 1px solid var(--line); color: var(--mag); transition: border-color .2s, box-shadow .2s;
}
.tracks .play:hover { border-color: var(--mag); box-shadow: var(--glow); }
.player iframe { display: block; width: 100%; height: 452px; border: 0; border-radius: 12px; }
.player .empty {
  padding: 28px; border: 1px dashed var(--line); clip-path: var(--cut); background: rgb(20 20 43 / .5);
}
.player .empty h3 { margin: 0 0 8px; font: 700 1.4rem var(--display); color: var(--white); }
.player .empty p { margin: 0; color: var(--muted); }
.player code { font: .88em var(--mono); color: var(--text); }

/* ---------- watching ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); padding: 3px; gap: 3px; }
.seg button {
  padding: 6px 16px; border: 0; background: none; cursor: pointer; color: var(--muted);
  font: 600 1rem var(--display); letter-spacing: .03em; transition: background .2s, color .2s;
}
.seg button:hover { color: var(--white); }
.seg button[aria-pressed="true"] { background: var(--mag); color: var(--void); }
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 24px 16px; }
.poster { display: grid; gap: 8px; align-content: start; }
.poster .media { position: relative; aspect-ratio: 2 / 3; border: 1px solid var(--line); }
.poster .pill {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px; font: 500 .75rem var(--mono);
  background: rgb(10 10 18 / .85); border: 1px solid var(--line); color: var(--text);
}
.poster .pill.watching { border-color: var(--cyan); color: var(--cyan); }
.poster .pill.next { border-color: var(--violet); color: #c9a6f0; }
.tile .label.live { color: var(--cyan); }
.poster h3 { margin: 0; font: 700 1.2rem/1.15 var(--display); color: var(--white); }
.poster .meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font: .82rem var(--mono); }
.poster p { margin: 0; font-size: .92rem; color: var(--muted); }
.rating { display: inline-flex; gap: 3px; }
.rating i { width: 12px; height: 5px; background: var(--line); transform: skewX(-24deg); }
.rating i.on { background: var(--acid); box-shadow: 0 0 6px rgb(249 240 2 / .5); }

/* ---------- letterboxd connector ---------- */
.lb { margin-top: 56px; }
#screen[hidden] + .lb { margin-top: 0; }
.subhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; }
.subhead h3 { margin: 0; font: 700 1.6rem/1.1 var(--display); color: var(--white); }
.subhead a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.subhead a:hover { color: var(--white); }
#lb-lists-head { margin-top: 48px; }
.poster a.media { display: block; }
.poster a.media img { transition: transform .8s var(--ease); }
.poster a.media:hover { border-color: var(--mag); }
.poster a.media:hover img { transform: scale(1.04); }
.stars { color: var(--acid); letter-spacing: .05em; font-size: .9rem; text-shadow: 0 0 6px rgb(249 240 2 / .4); }
.heart { color: var(--mag); margin-left: 4px; }
.poster .review {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text); font-style: italic;
}
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.list-card {
  display: grid; gap: 10px; align-content: start; padding: 20px; text-decoration: none;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel)); border: 1px solid var(--line);
  clip-path: var(--cut); transition: border-color .25s;
}
.list-card:hover { border-color: rgb(255 42 109 / .6); }
.list-card h4 { margin: 0; font: 700 1.35rem/1.15 var(--display); color: var(--white); }
.list-card p { margin: 0; color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.list-card li { font-size: .85rem; padding: 2px 8px; border: 1px solid var(--line); color: var(--text); }
.list-card li b { color: var(--mag); font: 500 .8rem var(--mono); }
.list-card .count { font: .8rem var(--mono); color: var(--muted); }

/* ---------- reading + notes ---------- */
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.books { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.books li { padding: 16px 18px; background: var(--panel); border-left: 2px solid var(--line); }
.books li.reading { border-left-color: var(--cyan); }
.books .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.books .t { font: 700 1.25rem/1.2 var(--display); color: var(--white); }
.books .a { color: var(--muted); font-size: .92rem; }
.books .state { font: .78rem var(--mono); color: var(--muted); white-space: nowrap; }
.books li.reading .state { color: var(--cyan); }
.books p { margin: 6px 0 0; font-size: .95rem; }
.books li.has-cover { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.books .cover { width: 56px; aspect-ratio: 2 / 3; object-fit: cover; border: 1px solid var(--line); }
.books .t a { text-decoration: none; }
.books .t a:hover { color: var(--mag); }
.books li.has-cover p { font-style: italic; }
.t-read .t-thumb .media { aspect-ratio: 2 / 3; }
.log { display: grid; gap: 28px; }
.entry { display: grid; grid-template-columns: 92px 1fr; gap: 16px; }
.entry time { font: .82rem/1.9 var(--mono); color: var(--muted); }
.entry h3 { margin: 0 0 4px; font: 700 1.35rem/1.2 var(--display); color: var(--white); }
.entry p { margin: 0; max-width: 60ch; }
@media (max-width: 480px) { .entry { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact.solo { grid-template-columns: minmax(0, 640px); }
.big { font-size: clamp(3.6rem, 10vw, 7rem); color: var(--mag); text-shadow: var(--glow); letter-spacing: -.03em; }
.contact-intro > p { max-width: 40ch; font-size: 1.15rem; margin: 18px 0 28px; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 28px; }
.email-row a { font: 600 clamp(1.3rem, 2.6vw, 1.8rem) var(--display); color: var(--white); text-decoration-color: var(--mag); text-underline-offset: 6px; overflow-wrap: anywhere; }
.copy { padding: 6px 12px; background: none; border: 1px solid var(--line); cursor: pointer; font-size: .85rem; color: var(--muted); }
.copy:hover { color: var(--white); border-color: var(--muted); }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list:empty, .email-row:empty { display: none; }
.link-list a {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line); transition: color .2s, padding .25s var(--ease);
}
.link-list a:hover { color: var(--white); padding-left: 12px; }
.link-list .k { font: 700 1.2rem var(--display); }
.link-list .v { color: var(--muted); overflow-wrap: anywhere; text-align: right; }

.form { padding: clamp(20px, 3vw, 32px); background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut); display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; font-weight: 500; color: var(--white); font-size: .95rem; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; background: var(--void); color: var(--text);
  border: 1px solid var(--line); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--mag); box-shadow: 0 0 0 3px rgb(255 42 109 / .18); }
.form .btn { justify-self: start; padding: 14px 26px; font-size: 1.1rem; }
.form-status { margin: 0; min-height: 1.5em; color: var(--cyan); }
.form-status.err { color: #ff6b95; }

/* ---------- nostr ---------- */
.nostr-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 6px 16px; align-items: center;
  padding: 18px; margin-bottom: 28px; background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut);
}
.nostr-card .avatar { grid-row: span 3; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--violet); box-shadow: 0 0 14px rgb(123 44 191 / .5); }
.nostr-card .avatar.ph { display: block; }
.nostr-card .who { font: 700 1.4rem/1.1 var(--display); color: var(--white); overflow-wrap: anywhere; }
.nostr-card .npub { font: .8rem var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.nostr-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nostr-card .btn { padding: 8px 16px; font-size: .95rem; }
.btn-violet { background: var(--violet); border-color: var(--violet); color: var(--white); }
.btn-violet:hover { box-shadow: 0 0 10px rgb(123 44 191 / .7); }

#status-dialog {
  width: min(440px, 92vw); padding: 0; background: var(--panel); color: var(--text);
  border: 1px solid var(--cyan); box-shadow: 0 0 40px rgb(5 217 232 / .25);
}
#status-dialog::backdrop { background: rgb(5 5 10 / .85); backdrop-filter: blur(4px); }
.status-form { display: grid; gap: 14px; padding: 24px; }
.status-form h2 { font-size: 1.8rem; }
.status-form label { display: grid; gap: 8px; font-weight: 500; color: var(--white); }
.status-form input { padding: 12px 14px; font-size: 1rem; background: var(--void); color: var(--text); border: 1px solid var(--line); }
.status-form input:focus { outline: none; border-color: var(--cyan); }
.status-form .hint { margin: 0; color: var(--muted); font-size: .9rem; }
.status-form .row { display: flex; gap: 10px; }

/* ---------- nostr notes ---------- */
.entry .note-text { white-space: pre-line; overflow-wrap: anywhere; }
.entry .note-text a { color: var(--cyan); }
.note-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 10px; }
.note-imgs a { display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); }
.note-imgs a:hover { border-color: var(--mag); }
.note-imgs img { width: 100%; height: 100%; object-fit: cover; }
.entry .permalink { font: .8rem var(--mono); color: var(--muted); text-decoration: none; display: inline-block; margin-top: 8px; }
.entry .permalink:hover { color: var(--white); }
a.aside { text-decoration: none; }
a.aside:hover { color: var(--white); }

/* ---------- zaps (acid yellow = lightning, only used here and for ratings) ---------- */
.btn-zap { background: var(--acid); border-color: var(--acid); color: var(--void); }
.btn-zap:hover { box-shadow: 0 0 12px rgb(249 240 2 / .6); }
#zap-dialog {
  width: min(420px, 92vw); padding: 0; background: var(--panel); color: var(--text);
  border: 1px solid var(--acid); box-shadow: 0 0 40px rgb(249 240 2 / .18);
}
#zap-dialog::backdrop { background: rgb(5 5 10 / .85); backdrop-filter: blur(4px); }
.zap-form, .zap-pay { position: relative; display: grid; gap: 14px; padding: 24px; }
.zap-form h2 { font-size: 1.9rem; }
.zap-form .hint { margin: 0; color: var(--muted); font-size: .92rem; }
.zap-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background: none; border: 1px solid var(--line); color: var(--white); font-size: 1.3rem; cursor: pointer; }
.amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.amounts legend { margin-bottom: 8px; font-weight: 500; color: var(--white); font-size: .95rem; }
.amounts label span {
  display: block; padding: 10px 0; text-align: center; cursor: pointer;
  font: 600 1.1rem var(--display); border: 1px solid var(--line); color: var(--text);
}
.amounts input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.amounts input[type=radio]:checked + span { border-color: var(--acid); color: var(--acid); box-shadow: inset 0 0 0 1px var(--acid); }
.amounts input[type=radio]:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.amounts .custom input, .zap-form > label input {
  width: 100%; padding: 10px 12px; font-size: 1rem; background: var(--void); color: var(--text); border: 1px solid var(--line);
}
.amounts .custom input:focus, .zap-form > label input:focus { outline: none; border-color: var(--acid); }
.zap-form > label { display: grid; gap: 8px; font-weight: 500; color: var(--white); font-size: .95rem; }
.zap-form .btn, .zap-pay .btn { justify-content: center; }
.zap-pay { justify-items: center; text-align: center; }
.qr { width: min(260px, 70vw); padding: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.zap-amount { margin: 0; font: 700 1.6rem var(--display); color: var(--acid); }
.zap-pay .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .9rem; }
.zap-pay.paid .qr { opacity: .25; }

/* ---------- guestbook ---------- */
.gb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .gb { grid-template-columns: 1fr; } }
.gb-form { display: grid; gap: 10px; padding: 22px; background: var(--panel); border: 1px solid var(--line); clip-path: var(--cut); }
.gb-form label { font-weight: 500; color: var(--white); }
.gb-form textarea {
  width: 100%; padding: 12px 14px; font: 1rem/1.5 var(--sans); background: var(--void); color: var(--text);
  border: 1px solid var(--line); resize: vertical;
}
.gb-form textarea:focus { outline: none; border-color: var(--mag); box-shadow: 0 0 0 3px rgb(255 42 109 / .18); }
.gb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gb-count { font: .8rem var(--mono); color: var(--muted); }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gb-entry, .gb-empty { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 18px; background: var(--void); }
.gb-empty { display: block; color: var(--muted); }
.gb-entry.owner { background: linear-gradient(90deg, rgb(255 42 109 / .07), transparent 60%), var(--void); }
.gb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.gb-avatar.ph { display: block; }
.gb-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.gb-meta a { font: 700 1.1rem var(--display); color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.gb-meta a:hover { color: var(--mag); }
.gb-meta time { font: .78rem var(--mono); color: var(--muted); }
.gb-entry p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.foot {
  max-width: var(--max); margin: clamp(80px, 12vw, 140px) auto 0; padding: 24px var(--gutter) 48px;
  display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line);
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--white); }

/* ---------- fact that opens an album ---------- */
.fact-album {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--white); text-align: left;
}
.fact-album::after { content: ""; position: absolute; inset: 0; } /* whole cell is the button */
.fact-album::before { content: "▸ "; color: var(--mag); }
.facts .linked:hover .fact-album { color: var(--mag); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- album dialog ---------- */
#album {
  width: min(880px, 94vw); max-height: 88vh; padding: 0; overflow: auto;
  background: var(--void); color: var(--text); border: 1px solid var(--mag); box-shadow: 0 0 60px rgb(255 42 109 / .3);
}
#album::backdrop { background: rgb(5 5 10 / .88); backdrop-filter: blur(6px); }
#album[open] { animation: lb-in .3s var(--ease); }
.album-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 20px 20px 16px; background: rgb(10 10 18 / .95); border-bottom: 1px solid var(--line);
}
.album-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--mag); text-shadow: var(--glow); }
.album-head .aside { margin-top: 4px; }
.album-close {
  width: 40px; height: 40px; flex: none; font-size: 1.4rem; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--white);
}
.album-close:hover { border-color: var(--mag); }
/* Masonry columns so every photo keeps its own shape (tall crops included). */
.album-grid { columns: 3 200px; column-gap: 10px; padding: 20px; }
.album-shot {
  display: block; width: 100%; margin: 0 0 10px; padding: 0; break-inside: avoid;
  border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; overflow: hidden;
}
.album-shot img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.album-shot .ph { width: 100%; aspect-ratio: 4 / 5; }
.album-shot:hover { border-color: var(--mag); }
.album-shot:hover img { transform: scale(1.04); }
.album-empty { margin: 0; color: var(--muted); }

/* ---------- lightbox ---------- */
#lightbox {
  width: min(1100px, 94vw); max-height: 94vh; padding: 0; overflow: hidden;
  background: var(--void); color: var(--text); border: 1px solid var(--mag); box-shadow: 0 0 60px rgb(255 42 109 / .3);
}
#lightbox::backdrop { background: rgb(5 5 10 / .9); backdrop-filter: blur(6px); }
#lightbox[open] { animation: lb-in .3s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } }
.lb-stage { display: grid; place-items: center; background: #000; max-height: calc(94vh - 64px); }
.lb-stage img { max-height: calc(94vh - 64px); width: auto; }
.lb-stage .ph { aspect-ratio: var(--r, 4 / 3); max-height: calc(94vh - 64px); width: auto; height: 70vh; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px 10px 18px; }
.lb-bar p { margin: 0; }
.lb-bar p a { color: var(--cyan); white-space: nowrap; }
.lb-nav { display: flex; gap: 6px; }
.lb-nav button {
  width: 40px; height: 40px; font-size: 1.4rem; line-height: 1; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--white);
}
.lb-nav button:hover { border-color: var(--mag); }

/* ---------- page-load sequence (the one orchestrated motion moment) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .portrait, .tile { animation: rise .8s var(--ease) both; }
  .status-line { animation-delay: .05s !important; }
  .name { animation-delay: .12s !important; }
  .lede { animation-delay: .24s !important; }
  .socials { animation-delay: .32s !important; }
  .portrait { animation-delay: .2s; }
  .tile { animation-delay: calc(.45s + var(--i, 0) * .07s); }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  .name { animation-name: rise, flicker-in; animation-duration: .8s, 1.2s; }
  @keyframes flicker-in { 0% { opacity: 0; } 10% { opacity: .8; } 14% { opacity: .1; } 22% { opacity: 1; } 26% { opacity: .4; } 34%, 100% { opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
