/* Shared look of all pages: tokens, living-line buttons, header, footer, journal entries, gallery tiles. */
:root {
  --bg: #0a090e;
  --ink: #ecebf2;
  --muted: #a39eb3;
  --faint: #6f6a7e;
  --indigo: #6b70c6;
  --lilac: #d49aee;
  --lilac-deep: #b06ab3;
  --gold: #ffe082;
  --rule: 236, 235, 242;
  --breath: 4200ms;
  --mono: "Source Code Pro", ui-monospace, monospace;
  --sans: "Onest", system-ui, sans-serif;
  --display: "Unbounded", system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip; }
body { font-family: var(--sans); font-weight: 400; -webkit-font-smoothing: antialiased; line-height: 1.55; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
/* a quick double tap on a button must not zoom the page */
button, .btn { touch-action: manipulation; }
img { display: block; max-width: 100%; }
p { margin: 0 0 .85em; }
:focus-visible { outline: 1px solid var(--lilac); outline-offset: 3px; }

/* ---------- world: fog + spores ---------- */
.fog { position: fixed; inset: -20%; pointer-events: none; z-index: 0; }
.fog::before, .fog::after { content: ""; position: absolute; border-radius: 50%; filter: blur(10px); animation: drift 34s ease-in-out infinite alternate; }
.fog::before { width: 70vmax; height: 70vmax; left: -10%; top: -15%; background: radial-gradient(closest-side, rgba(107,112,198,.16), transparent); }
.fog::after { width: 80vmax; height: 80vmax; right: -20%; bottom: -30%; background: radial-gradient(closest-side, rgba(176,106,179,.12), transparent); animation-duration: 46s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); } }
.spores { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.spore { position: absolute; bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: rgba(212,154,238,.55); box-shadow: 0 0 8px rgba(212,154,238,.45); opacity: 0; animation: rise var(--d) linear var(--delay) infinite; }
@keyframes rise { 0% { transform: translate3d(0,0,0); opacity: 0; } 10% { opacity: var(--o); } 85% { opacity: var(--o); } 100% { transform: translate3d(var(--dx), -110vh, 0); opacity: 0; } }
main, .top, .foot { position: relative; z-index: 1; }

/* ---------- living-line buttons (THE DEPTHS): only what can be pressed gets a border ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .78rem 1.35rem; border-radius: 999px; border: 0; background: transparent; color: var(--ink); font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; --lineC: 236,235,242; --hi: .5; --lo: .07; --dim: .8; }
.btn::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: radial-gradient(140% 150% at 50% 115%, rgba(var(--lineC), var(--hi)), rgba(var(--lineC), calc(var(--hi) * .45)) 45%, rgba(var(--lineC), var(--lo)) 80%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; pointer-events: none; animation: lineBreath var(--breath) ease-in-out infinite; }
@media (hover: hover) { .btn:hover::before { animation: none; opacity: 1; } }
.btn:active { background: rgba(var(--lineC), .07); }
.btn--stake { --lineC: 212,154,238; --hi: .85; --dim: .6; background: radial-gradient(120% 140% at 50% 120%, rgba(212,154,238,.10), transparent 70%); }
.btn--quiet { --dim: .9; padding: .6rem 1rem; }
.btn .arr { font-family: var(--sans); letter-spacing: 0; }
@keyframes lineBreath { 0%, 100% { opacity: var(--dim); } 50% { opacity: 1; } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px 22px; padding: 14px var(--pad); background: linear-gradient(rgba(10,9,14,.92), rgba(10,9,14,.72)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--rule), .12) 30%, rgba(var(--rule), .12) 70%, transparent); }
.brand-mark { display: block; width: 104px; aspect-ratio: 2029 / 640; background: url(/assets/wordmark.webp) center / contain no-repeat; }
.nav { display: flex; gap: 22px; justify-content: center; }
.nav a { font: 500 .7rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--faint); padding: 6px 0; transition: color .2s; }
.nav a[aria-current] { color: var(--ink); }
@media (hover: hover) { .nav a:hover { color: var(--ink); } }
.nav a[aria-current] { box-shadow: 0 1px 0 var(--lilac); }
.socials { display: flex; gap: 14px; }
.socials a { color: var(--faint); display: grid; place-items: center; transition: color .2s; }
@media (hover: hover) { .socials a:hover { color: var(--ink); } }
.socials svg { width: 17px; height: 17px; }
.lang { position: relative; display: flex; border-radius: 999px; padding: 3px; }
.lang::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(var(--rule), .14); pointer-events: none; }
.lang button { border: 0; background: transparent; color: var(--faint); font: 500 .66rem/1 var(--mono); letter-spacing: .12em; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--bg); background: var(--ink); }

/* ---------- page opening: pulsing kicker + lead ---------- */
.kicker { font: 500 .72rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--lilac); box-shadow: 0 0 12px var(--lilac); animation: pulse var(--breath) ease-in-out infinite; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 300; color: var(--muted); max-width: 30ch; }

/* ---------- journal entries ---------- */
.entry { max-width: 1320px; margin: 0 auto; padding: clamp(56px, 9vh, 110px) var(--pad); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 64px); position: relative; }
.entry::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: linear-gradient(90deg, rgba(var(--rule), .16), rgba(var(--rule), .04) 70%, transparent); }
.label { font: 500 .72rem/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.label b { display: block; font-family: var(--display); font-size: 2.1rem; font-weight: 200; letter-spacing: 0; color: rgba(var(--rule), .22); margin-bottom: 6px; }
.body-l { font-family: var(--display); font-size: clamp(1.05rem, 1.6vw, 1.36rem); font-weight: 300; line-height: 1.5; max-width: 36ch; }
.body-l a, .fine a { color: var(--ink); text-decoration-color: rgba(212,154,238,.6); text-underline-offset: 3px; }
.fine { color: var(--muted); max-width: 60ch; }
.full { grid-column: 1 / -1; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }

/* ---------- gallery tiles: caption sits inside the picture, bottom-left ---------- */
.tile { position: absolute; display: block; overflow: hidden; border-radius: 6px; background: #15131c; container-type: inline-size; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .tile:hover img { transform: scale(1.025); } }
/* up to two lines: on a narrow tile the nick goes under "art:" instead of being cut */
.tile .by { position: absolute; left: 8px; bottom: 7px; right: 8px; font: 500 .6rem/1.2 var(--mono); letter-spacing: .06em; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.95); pointer-events: none; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* the narrowest tiles (a portrait picture on a phone): smaller with the tile and tighter, so a whole 13-letter
   nick fits a line (a mono letter is .6em wide) down to a 64 px tile */
@container (max-width: 120px) { .tile .by { left: 4px; right: 4px; font-size: clamp(.45rem, 10.5cqi, .55rem); letter-spacing: 0; } }

/* ---------- footer ---------- */
.foot { width: 100%; max-width: 1320px; margin: 0 auto; padding: 64px var(--pad) 40px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.foot::before { content: ""; position: absolute; top: 0; left: var(--pad); right: var(--pad); height: 1px; background: linear-gradient(90deg, rgba(var(--rule), .16), transparent); }
.foot h2 { font: 500 .68rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot li a { text-decoration: none; color: var(--ink); }
@media (hover: hover) { .foot li a:hover { color: var(--lilac); } }
.foot .handle { font-family: var(--mono); font-weight: 500; }
.foot .role { display: block; color: var(--muted); font-size: .88rem; font-weight: 300; }
.farewell { font-family: var(--display); font-size: 1.4rem; font-weight: 300; }
.farewell + p { color: var(--muted); font-weight: 300; }
.colophon { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 500 .62rem/1 var(--mono); letter-spacing: .2em; color: var(--faint); text-transform: uppercase; padding-top: 24px; }

/* ---------- entrance ---------- */
.rise { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.8,.2,1); }
.rise.in { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .top { grid-template-columns: auto 1fr auto; gap: 10px 12px; padding: 12px var(--pad); }
  .brand { grid-column: 1; }
  .socials { grid-column: 2; justify-self: end; gap: 10px; }
  .lang { grid-column: 3; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 18px; }
  .brand-mark { width: 78px; }
  .entry { grid-template-columns: 1fr; }
  .label b { font-size: 1.5rem; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .kicker { letter-spacing: .12em; font-size: .66rem; }
}
@media (max-width: 380px) {
  .socials svg { width: 15px; height: 15px; }
  .lang button { padding: 6px 8px; }
  .btn { padding: .72rem 1.05rem; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; transform: none; }
}
