/* Sizes and spacing follow the happyrain.studio reference. */
:root {
  --bg: #ffffff;
  --ink: #15161a;
  --soft: #9a9aa0;
  --line: #e7e7ea;
  --line2: #cfcfd4;
  --wp: #ffffff;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; min-height: 100dvh; overflow: hidden; }
html { background-repeat: repeat; background-attachment: fixed; }
body { color: var(--ink); font-family: var(--sans); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

/* small mono labels */
.mono-sm { font-family: var(--mono); font-size: 10px; letter-spacing: 3px; text-transform: capitalize; color: var(--soft); }

/* ---- wallpaper switcher ---- */
.wallpaper { position: fixed; right: 24px; top: 20px; z-index: 9; transition: opacity .3s; }
body.panel-open .wallpaper { opacity: 0; pointer-events: none; }
#wp-btn {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; margin-left: auto;
  border-radius: 30px; border: 1px solid var(--line2); background: #fff;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: capitalize; color: var(--ink);
  box-shadow: 0 8px 22px -14px rgba(20,20,25,.4); transition: border-color .2s;
}
#wp-btn:hover { border-color: var(--ink); }
#wp-btn span { font-size: 9px; color: var(--soft); transition: transform .2s; }
#wp-btn[aria-expanded="true"] span { transform: rotate(180deg); }
#wp-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.14); background-color: #fff; }
#wp-menu {
  position: absolute; right: 0; top: 44px; width: 214px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  box-shadow: 0 24px 60px -28px rgba(20,20,25,.5);
}
#wp-menu[hidden] { display: none; }
#wp-menu .mono-sm { font-size: 9px; letter-spacing: 2px; }
#wp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 11px; }
#wp-grid button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); transition: transform .15s; }
#wp-grid button:hover { transform: scale(1.09); }
#wp-grid button.on { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- stage ---- */
#stage { position: fixed; inset: 0; }

/* scrapbook pieces: little stickers scattered behind everything */
#scrap { position: absolute; inset: 0; z-index: 0; pointer-events: none; transition: opacity .8s; }
#scrap .scrap {
  position: absolute; height: auto; left: var(--x); top: var(--y); width: var(--w); transform: rotate(var(--r));
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 6px 8px rgba(20,20,25,.2));
  animation: scrap-in .7s cubic-bezier(.2,1.5,.4,1) var(--d) both;
  pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none;
  transition: filter .2s;
}
#scrap .scrap.lift {
  cursor: grabbing; z-index: 6; transform: rotate(var(--r)) scale(1.1);
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 16px 18px rgba(20,20,25,.28));
}
@keyframes scrap-in { from { opacity: 0; transform: rotate(var(--r)) scale(.4); } }
#stage:not(.is-closed) #scrap { opacity: .3; }
#stage:not(.is-closed) #scrap .scrap { pointer-events: none; }
@media (max-width: 700px) { #scrap .scrap { left: var(--mx); top: var(--my); width: var(--mw); } }
@media (max-width: 700px) { #stage:not(.is-closed) #scrap { opacity: 0; } } /* on phones the stickers step aside once the topics open */

#intro {
  position: absolute; left: 50%; bottom: calc(56% + 119px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  white-space: nowrap; pointer-events: none; transition: opacity .5s;
}
#intro h1 { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -.1px; }
#intro .mono-sm { font-family: var(--sans); font-weight: 500; font-size: 9px; letter-spacing: 2px; margin-top: 4px; }
#intro .arrow { width: 40px; height: 76px; color: #3c3d44; margin-top: 4px; }
#stage:not(.is-closed) #intro { opacity: 0; }

#head {
  position: absolute; left: 50%; top: 50%;
  width: 190px; aspect-ratio: .9;
  transform: translate(-50%, -50%);
  z-index: 4; cursor: pointer;
  transition: top .9s cubic-bezier(.2,.85,.25,1);
}
#stage.is-closed #head { top: 44%; }
#head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }
#head:active img { transform: scale(.97); }

#bio {
  position: absolute; left: 50%; top: calc(44% + 105px + 26px); transform: translateX(-50%);
  width: min(380px, 92vw); text-align: center; transition: opacity .5s;
}
#bio p { font-size: 14.5px; color: #3c3d44; line-height: 1.55; }
#bio nav { display: flex; gap: 20px; justify-content: center; margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: capitalize; color: var(--soft); }
#bio p, #bio nav, #bio #bio-contact { text-shadow: 0 0 3px var(--wp), 0 0 6px var(--wp), 0 0 10px var(--wp), 0 0 14px var(--wp); }
#bio nav, #bio #bio-contact { color: #6f7077; }
#bio #bio-contact { margin: 34px 0 0; line-height: 1.55; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: lowercase; color: #6f7077; }
#bio #bio-contact a { color: inherit; text-decoration: none; }
#bio #bio-contact a:hover { color: var(--ink); }
#bio a { text-decoration: none; }
#bio a:hover, #bio .todo:hover { color: var(--ink); }
#stage:not(.is-closed) #bio { opacity: 0; pointer-events: none; }

#home {
  position: fixed; left: 24px; top: 26px; z-index: 9; font-size: 11px; letter-spacing: 2px;
  opacity: 0; pointer-events: none; transition: opacity .3s, color .2s;
}
#home:hover { color: var(--ink); }
#stage:not(.is-closed) #home { opacity: 1; pointer-events: auto; transition-delay: .9s, 0s; }
body.panel-open #home { opacity: 0; pointer-events: none; transition-delay: 0s; }

#hint {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(8px); z-index: 7;
  font-family: var(--mono); font-size: 11px; letter-spacing: 2.5px; text-transform: capitalize; color: var(--soft);
  opacity: 0; transition: opacity .6s .9s, transform .6s .9s; pointer-events: none; text-align: center;
}
#hint b { color: var(--ink); font-weight: 500; }
#stage:not(.is-closed) #hint { opacity: 1; transform: translateX(-50%); }

/* ---- blooms pop out of the head ---- */
#map { position: absolute; inset: 0; z-index: 3; pointer-events: none; } /* only the blooms catch clicks, so the stickers underneath can be grabbed */
.bloom {
  position: absolute; left: 0; top: 0;
  width: 170px; height: 170px; margin: -85px 0 0 -85px;
  cursor: pointer; touch-action: none; pointer-events: none;
}
#stage:not(.is-closed) .bloom { pointer-events: auto; }
.bloom .pop {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform: scale(0); opacity: 0;
  transition: transform .9s cubic-bezier(.2,1.6,.4,1) var(--d), opacity .3s var(--d);
}
#stage:not(.is-closed) .bloom .pop { transform: scale(1); opacity: 1; }
.bloom .pop::before {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, transparent 70%);
  filter: blur(8px); opacity: .85; mix-blend-mode: multiply;
  transform: scale(var(--s)); transition: transform .4s, opacity .4s;
}
.bloom:hover .pop::before { transform: scale(calc(var(--s) * 1.18)); opacity: 1; }
.bloom span { position: relative; font-family: var(--serif); font-size: 16.5px; text-align: center; line-height: 1.2; max-width: 130px; }

/* ---- full-screen detail view ---- */
#panel {
  position: fixed; inset: 0; z-index: 8; background: #fff; overflow-y: auto;
  opacity: 0; pointer-events: none; transition: opacity .32s ease;
}
#panel.open { opacity: 1; pointer-events: auto; }
#panel .sheet {
  max-width: 640px; margin: 0 auto; padding: 12vh 44px 100px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1);
}
#panel .sheet.wide { max-width: 820px; }
#panel.open .sheet { opacity: 1; transform: none; }
#panel h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.2vw, 54px); line-height: 1.06; letter-spacing: -.5px; margin: 16px 0 24px; }
#panel-intro { font-size: 15px; line-height: 1.75; margin-bottom: 30px; }
#panel-close { position: fixed; top: 26px; right: max(36px, calc(50% - 348px)); color: var(--soft); font-size: 20px; line-height: 1; z-index: 2; }
#panel-prev, #panel-next {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  font-size: 36px; line-height: 1; color: var(--soft); padding: 18px 12px; user-select: none; transition: color .2s;
}
#panel-prev { left: 8px; }
#panel-next { right: 8px; }
#panel button:hover { color: var(--ink); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 22px; margin-top: 10px; }
.card .art { aspect-ratio: 16/10; border-radius: 8px; background: #f3f3f6; margin-bottom: 14px; overflow: hidden; }
.card iframe { width: 100%; height: 100%; border: 0; }
.card iframe.mx { display: block; width: 100%; height: 120px; border: 0; border-radius: 10px; margin: 10px 0 6px; }
.card iframe.sp { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }
.card .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.clickable { cursor: pointer; }
.card.clickable:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.go.all { display: inline-block; margin-bottom: 36px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: capitalize; text-decoration: none; border-bottom: 1px solid var(--line2); }
.card .k { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: capitalize; color: var(--soft); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.15; margin: 6px 0 2px; }
.card .sub { font-size: 12.5px; color: var(--soft); margin-bottom: 6px; }
.card.wide { grid-column: 1 / -1; }
.card.wide .art { box-shadow: 0 0 0 1px var(--line); margin-bottom: 22px; }
.facts { margin: 14px 0 6px; }
.facts dt { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: capitalize; color: var(--soft); margin-top: 16px; }
.facts dd { font-size: 15px; line-height: 1.7; margin: 4px 0 0; max-width: 620px; }
.card .go + .go { margin-left: 16px; }
.card .go { display: inline-block; margin-top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: capitalize; text-decoration: none; border-bottom: 1px solid var(--line2); }
.card a.go:hover { border-color: var(--ink); }
.card .go.todo { color: var(--soft); cursor: default; }
.after { margin-top: 44px; font-size: 15px; line-height: 1.75; }
.after a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.after a:hover { text-decoration-color: var(--ink); }
.text p { font-size: 15px; line-height: 1.75; margin-bottom: 16px; }
.text h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin: 40px 0 14px; }
.text a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.text a:hover { text-decoration-color: var(--ink); }

/* favourites (On repeat): the Apple Music players sit one under another */
.fv-list { margin-top: 10px; }
.fv-embed { margin-bottom: 34px; }
.fv-embed iframe { display: block; width: 100%; height: 450px; border: 0; border-radius: 12px; background: #f3f3f6; }
.fv-n { font-family: var(--serif); font-size: 20px; }
.fv-foot { margin-top: 10px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.2px; text-transform: capitalize; color: var(--soft); }

/* playlists: a shelf of covers with one player under it */
.pl-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin: 4px 0 34px; }
.pl-grid button { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #f3f3f6; opacity: .72; transform: rotate(var(--t, 0deg)); transition: opacity .2s, transform .2s; box-shadow: 0 2px 8px rgba(20,20,25,.12); }
.pl-grid button:nth-child(odd) { --t: -1.5deg; }
.pl-grid button:nth-child(even) { --t: 1.2deg; }
.pl-grid button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-grid button:hover { opacity: 1; transform: rotate(0) scale(1.05); }
.pl-grid button.on { opacity: 1; outline: 2px solid var(--ink); outline-offset: 3px; transform: rotate(0); }
.pl-player iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; }
@media (max-width: 640px) { .pl-grid { grid-template-columns: repeat(4, 1fr); } }

/* DVD stack */
.dvds { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 8px; }
.dvd {
  width: var(--w); height: var(--h); padding: 0 14px; border-radius: 2px;
  background: var(--c); color: var(--t, #fff); text-align: left;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 0 rgba(0,0,0,.15); transition: transform .25s;
}
.dvd:hover, .dvd.on { transform: translateX(26px); }
.dvd-note { text-align: center; min-height: 52px; margin-top: 14px; }
.dvd-note strong { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.dvd-note p { color: var(--soft); font-size: 12.5px; }

/* shelf */
.filters { display: flex; gap: 6px; margin-bottom: 22px; font-family: var(--mono); font-size: 11px; flex-wrap: wrap; }
.filters button { padding: 6px 12px; border-radius: 30px; border: 1px solid var(--line2); color: #3c3d44; transition: .25s; }
.filters button:hover, .filters button.on { border-color: var(--ink); color: var(--ink); }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 22px; align-items: end; }
.cover .art { display: grid; place-items: center; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--c); padding: 8px; text-align: center; font-family: var(--serif); font-size: 14px; line-height: 1.2; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.cover img.art { display: block; height: auto; padding: 0; }
.cover.cassette img.art { aspect-ratio: 1; }
.cover.cassette .art { aspect-ratio: 1.6; border-radius: 4px; }
.cover.cd .art { border-radius: 2px; }
.cv-t { font-family: var(--serif); font-size: 15px; line-height: 1.2; margin-top: 10px; }
.cover small { display: block; margin-top: 3px; font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: capitalize; color: var(--soft); }

/* ---- mobile ---- */
@media (max-width: 640px) {
  #head { width: 140px; }
  #intro { bottom: calc(56% + 92px); }
  #bio { top: calc(44% + 78px + 26px); }
  #bio p { font-size: 13.5px; }
  #intro h1 { font-size: 17px; }
  #hint { bottom: 26px; font-size: 9.5px; }
  .bloom { width: 130px; height: 130px; margin: -65px 0 0 -65px; }
  .bloom span { font-size: 13px; max-width: 100px; }
  #panel .sheet { padding: 10vh 24px 80px; }
  #panel h2 { font-size: clamp(30px, 9vw, 40px); }
  #panel-close { top: 20px; right: 22px; }
  #panel-prev, #panel-next { font-size: 30px; padding: 14px 8px; }
  #panel-prev { left: 2px; }
  #panel-next { right: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  #panel, #panel .sheet, #head, .bloom .pop { transition: none !important; }
}

/* a post, read on the site */
.back { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: capitalize; color: var(--soft); margin: -6px 0 28px; display: block; }
.back:hover { color: var(--ink); }
.post-body { font-size: 15px; line-height: 1.75; }
.post-body > * { margin-bottom: 16px; }
.post-body h2, .post-body h3, .post-body h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 34px 0 12px; }
.post-body h2 { font-size: 30px; }
.post-body h3 { font-size: 24px; }
.post-body h4 { font-size: 20px; }
.post-body a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--ink); }
.post-body img { display: block; max-width: 100%; height: auto; border-radius: 6px; margin: 0 auto; }
.post-body figure { margin: 26px 0; }
.post-body figcaption { font-size: 12.5px; color: var(--soft); margin-top: 8px; line-height: 1.5; }
.post-body iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; background: #f3f3f6; margin: 22px 0; }
.post-body ul, .post-body ol { padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body blockquote { font-family: var(--serif); font-size: 19px; line-height: 1.5; border-left: 2px solid var(--line2); padding-left: 18px; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.post-foot { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-foot .go { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: capitalize; text-decoration: none; border-bottom: 1px solid var(--line2); }
