/* Layout: one obsidian-glass card floating over drifting volcanic ash; tabs turn the card into the portfolio. */
:root {
  --void: #050507;
  --glass: rgba(14, 14, 18, 0.62);
  --well: rgba(255, 255, 255, 0.035);
  --edge: rgba(255, 255, 255, 0.08);
  --edge-2: rgba(255, 255, 255, 0.16);
  --ink: #f5f5f7;
  --ink-2: #a3a3ad;
  --ink-3: #5f5f6a;

  /* discord status, semantic only */
  --online: #23a55a;
  --idle: #f0b232;
  --dnd: #f23f43;
  --offline: #80848e;

  --font-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 24px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(255, 255, 255, 0.055), transparent 70%),
    var(--void);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.75));
  z-index: 1;
}
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--void); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

#ash { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* sits above the click-to-enter screen so the trail shows from the start */
.cursor-trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }
.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- click to enter ---------- */
.enter {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--void);
  cursor: pointer;
  transition: opacity 0.9s var(--ease), filter 0.9s var(--ease), visibility 0s linear 0.9s;
}
.enter:focus-visible { outline: none; }
.enter-mark {
  font: italic 400 clamp(2.4rem, 8vw, 3.4rem)/1 var(--font-display);
  letter-spacing: -0.01em;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.25);
}
.enter-cta {
  font: 400 0.72rem/1 var(--font-mono);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.entered .enter { opacity: 0; filter: blur(12px); visibility: hidden; pointer-events: none; }

.caret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.15em;
  animation: blink 1.05s steps(1) infinite;
}
.enter-cta .caret { width: 0.55em; height: 0.9em; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- stage ---------- */
.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 540px);
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding-inline: 16px;
  padding-block: 48px 96px;
  perspective: 1400px;
}
.js .stage { opacity: 0; transform: translateY(26px) scale(0.98); }
.entered .stage {
  opacity: 1;
  transform: none;
  transition: opacity 1.1s var(--ease) 0.15s, transform 1.1s var(--ease) 0.15s;
}

.card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 22px 26px 26px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 120px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.6);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
}
/* specular edge that follows the pointer, like light on volcanic glass */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.05), transparent 45%);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 22px;
  font: 400 0.72rem/1 var(--font-mono);
  color: var(--ink-3);
}
.meta { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.platforms { gap: 10px; margin-left: auto; }
.platforms svg { color: var(--ink-2); }

/* ---------- identity ---------- */
.identity {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
  padding-top: 4px;
}
.avatar {
  position: relative;
  width: 104px;
  height: 104px;
  margin-bottom: 10px;
}
.avatar > img#avatar,
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--edge-2);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.025), 0 12px 40px -8px rgba(0, 0, 0, 0.9);
}
.avatar-fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #1c1c22, #08080a);
  font: italic 400 3.2rem/1 var(--font-display);
  color: var(--ink);
}
.avatar > img#avatar { position: absolute; inset: 0; }
.deco {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  max-width: none;
  pointer-events: none;
}
.dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #0b0b0e;
  background: var(--offline);
  transition: background 0.4s;
}
.dot[data-status="online"] { background: var(--online); box-shadow: 0 0 12px rgba(35, 165, 90, 0.55); }
.dot[data-status="idle"] { background: var(--idle); }
.dot[data-status="dnd"] { background: var(--dnd); }

.name {
  margin: 0;
  font: italic 400 clamp(2.8rem, 10vw, 3.75rem)/0.95 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
  background: linear-gradient(100deg, #8a8a94 0%, var(--ink) 30%, #ffffff 46%, var(--ink) 62%, #8a8a94 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.22));
  animation: shimmer 7s var(--ease) infinite;
  padding-inline: 0.08em;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  60%, 100% { background-position: 0% 0; }
}
.handle {
  margin: 4px 0 0;
  display: inline-flex;
  gap: 8px;
  font: 400 0.8rem/1.4 var(--font-mono);
  color: var(--ink-2);
}
.handle .sep { color: var(--ink-3); }
.bio {
  margin: 10px 0 0;
  min-height: 1.55em;
  font-size: 0.95rem;
  color: var(--ink);
}
.bio .caret { width: 1.5px; height: 1.05em; margin-left: 3px; color: var(--ink-2); }

.chips {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--well);
  font: 400 0.75rem/1.2 var(--font-mono);
  color: var(--ink-2);
}
.chips img, .lang-head img, .icon-link img, .row-icon img { filter: invert(1); opacity: 0.85; }

/* ---------- tabs ---------- */
.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--edge);
}
.tabs button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 0;
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.25s;
}
.tabs button:hover { color: var(--ink-2); }
.tabs button[aria-selected="true"] { color: var(--void); }
.tab-ink {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--w, 0);
  transform: translateX(var(--x, 0));
  border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.18);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}

.panel { animation: panel-in 0.45s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- presence rows ---------- */
.presence { display: grid; gap: 10px; }
.row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--edge);
  min-width: 0;
}
.row.quiet { grid-template-columns: 1fr; padding: 14px 16px; }
.row-art {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}
.row-art > img:first-child {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #111;
}
.row-art .small {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #121216;
  background: #121216;
  object-fit: cover;
}
.row-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--edge);
  color: var(--ink-2);
}
.row-body { min-width: 0; display: grid; gap: 1px; }
.row-label {
  font: 400 0.66rem/1.4 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.row-main {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-main a { text-decoration: none; }
.row-main a:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-time {
  margin: 3px 0 0;
  font: 400 0.72rem/1.3 var(--font-mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
#panel-now { display: grid; gap: 10px; }
.presence:empty { display: none; }

.about {
  display: grid;
  gap: 8px;
  padding: 14px 16px 15px;
  border-radius: 16px;
  background: var(--well);
  border: 1px solid var(--edge);
  min-width: 0;
}
.about-lines { display: grid; gap: 4px; }
.about-line { margin: 0; font-size: 0.92rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.about-link { margin-top: 4px; font: 400 0.8rem/1.4 var(--font-mono); }
.about-link a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.about-link a::after { content: " ↗"; }
.about-link a:hover { color: var(--ink); text-decoration-color: var(--ink); }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px dashed var(--edge-2);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
  min-width: 0;
}
.notice svg { flex: none; margin-top: 1px; color: var(--ink-2); }
.notice span { min-width: 0; overflow-wrap: anywhere; }

.bar {
  margin-top: 8px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--ink);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transition: width 1s linear;
}
.bar-times {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font: 400 0.68rem/1 var(--font-mono);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- links ---------- */
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.icon-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.icon-link:hover { transform: translateY(-2px); border-color: var(--edge-2); background: rgba(255, 255, 255, 0.07); }
.icon-link img { width: 18px; height: 18px; }
.copy-link {
  width: auto;
  padding-inline: 14px;
  display: inline-flex;
  gap: 8px;
  font: 400 0.75rem/1 var(--font-mono);
  color: var(--ink-2);
}

/* ---------- stack ---------- */
.stack, .work { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lang {
  border-radius: 16px;
  border: 1px solid var(--edge);
  background: var(--well);
  overflow: hidden;
  min-width: 0;
}
.lang-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}
.lang-head::-webkit-details-marker { display: none; }
.lang-head:hover { background: rgba(255, 255, 255, 0.025); }
.chev { flex: none; color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.2s; }
.lang-head:hover .chev { color: var(--ink); }
.lang[open] .chev { transform: rotate(180deg); }
.lang[open] .code { animation: panel-in 0.4s var(--ease); }
.lang-name { font-weight: 600; font-size: 0.95rem; }
.ext {
  font: 400 0.7rem/1 var(--font-mono);
  color: var(--ink-3);
  padding: 3px 6px;
  border: 1px solid var(--edge);
  border-radius: 6px;
}
.lang-note {
  margin-left: auto;
  font: 400 0.72rem/1.3 var(--font-mono);
  color: var(--ink-3);
}
.code {
  margin: 0;
  padding: 12px 14px 14px;
  overflow-x: auto;
  border-top: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.35);
  font: 400 0.76rem/1.65 var(--font-mono);
  color: var(--ink-2);
  tab-size: 4;
}
.code .k { color: var(--ink); font-weight: 500; }
.code .f { color: #d6d6dc; }
.code .s { color: #b4b4bd; }
.code .t { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
.code .c { color: #7d7d89; font-style: italic; }

/* ---------- work (pinned cards) ---------- */
.pin {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.25s, background 0.25s;
}
a.pin:hover { border-color: var(--edge-2); background: rgba(255, 255, 255, 0.06); }
.pin-logo {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--edge);
  background: #0b0b0d;
  transition: transform 0.35s var(--ease);
}
a.pin:hover .pin-logo { transform: scale(1.04); }
.pin-logo-blank {
  display: grid;
  place-items: center;
  font: italic 400 2.2rem/1 var(--font-display);
}
.pin-body {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-width: 0;
}
.pin-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.pin-name { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.pin-kind {
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  font: 400 0.66rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pin-go { margin-left: auto; color: var(--ink-3); transition: color 0.25s, transform 0.25s var(--ease); }
a.pin:hover .pin-go { color: var(--ink); transform: translate(2px, -2px); }
/* additions sit in the card's bottom-right corner */
.pin-adds {
  align-self: end;
  justify-self: end;
  display: grid;
  gap: 5px;
  max-width: 32ch;
  min-width: 0;
}
.pin-adds ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pin-adds li {
  position: relative;
  padding-left: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.pin-adds li::before { content: "–"; position: absolute; left: 0; color: var(--ink-3); }
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 18px;
  border-radius: 16px;
  border: 1px dashed var(--edge-2);
  text-align: center;
}
.empty-title { font: italic 400 1.6rem/1.1 var(--font-display); }
.empty p { margin: 0; font-size: 0.85rem; color: var(--ink-2); max-width: 32ch; }
.empty code { font: 400 0.78rem var(--font-mono); color: var(--ink); }

/* ---------- contact button + popup ---------- */
.contact-fab {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px 13px 16px;
  border-radius: 999px;
  border: 1px solid var(--edge-2);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 18px 50px -14px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease);
}
.contact-fab:hover {
  background: var(--ink);
  color: var(--void);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.22), 0 18px 50px -14px rgba(0, 0, 0, 0.95);
  transform: translateY(-2px);
}
.js .contact-fab { opacity: 0; transform: translateY(14px); pointer-events: none; }
.entered .contact-fab {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.8s var(--ease) 0.6s, transform 0.8s var(--ease) 0.6s, background 0.25s, color 0.25s, box-shadow 0.25s;
}
.entered .contact-fab:hover { transform: translateY(-2px); }

.contact {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--edge-2);
  background: rgba(12, 12, 16, 0.9);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 120px -20px rgba(0, 0, 0, 0.95);
  overflow: auto;
}
.contact::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.contact[open] { animation: pop 0.4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

.contact-inner { display: grid; gap: 16px; padding: 22px 22px 20px; }
.contact-form { display: grid; gap: 16px; }
.hint a { color: var(--ink-2); text-underline-offset: 3px; }
.hint a:hover { color: var(--ink); }

.contact-join {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--edge-2);
  background: var(--well);
  color: var(--ink);
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.contact-join::after { content: "↗"; letter-spacing: 0; }
.contact-join:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--ink-2); }

/* waiting for the DM button press */
.contact-wait { display: grid; justify-items: center; gap: 10px; padding: 8px 4px 2px; text-align: center; }
.contact-wait h3 { margin: 6px 0 0; font: italic 400 1.7rem/1.1 var(--font-display); }
.contact-wait p { margin: 0; max-width: 34ch; font-size: 0.88rem; color: var(--ink-2); }
.contact-wait strong { color: var(--ink); font-weight: 500; }
.contact-wait .form-status { margin-top: 4px; }
.contact-wait .contact-submit { width: 100%; margin-top: 8px; }
.wait-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--edge-2);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02) 60%);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25);
  animation: orb 1.8s ease-out infinite;
}
.contact-wait[data-state="sent"] .wait-orb { animation: none; background: var(--ink); box-shadow: 0 0 30px rgba(255, 255, 255, 0.35); }
.contact-wait[data-state="failed"] .wait-orb { animation: none; opacity: 0.4; }
@keyframes orb {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25); }
  100% { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
}
.contact-submit.ghost {
  background: var(--well);
  color: var(--ink-2);
  border: 1px solid var(--edge);
  box-shadow: none;
}
.contact-submit.ghost:hover { color: var(--ink); border-color: var(--edge-2); box-shadow: none; }
.contact-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-head h2 { margin: 0; font: italic 400 2rem/1 var(--font-display); text-shadow: 0 0 22px rgba(255, 255, 255, 0.18); }
.contact-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: var(--ink-2);
  cursor: pointer;
}
.contact-close:hover { color: var(--ink); border-color: var(--edge-2); }

.field { display: grid; gap: 7px; min-width: 0; }
.field label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font: 400 0.75rem/1.3 var(--font-mono);
  color: var(--ink-2);
}
.field label strong { color: var(--ink); font-weight: 500; }
.count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.field textarea,
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font: 400 0.92rem/1.5 var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input { font-family: var(--font-mono); font-size: 0.85rem; }
.field textarea::placeholder, .field input::placeholder { color: var(--ink-3); }
.field textarea:focus, .field input:focus {
  outline: none;
  border-color: var(--edge-2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.field [aria-invalid="true"],
.field [aria-invalid="true"]:focus { border-color: var(--dnd); }
.hint { margin: 0; font-size: 0.78rem; color: var(--ink-3); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-submit {
  appearance: none;
  border: 0;
  padding: 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--void);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.16);
  transition: opacity 0.2s, box-shadow 0.2s;
}
.contact-submit:hover { box-shadow: 0 0 34px rgba(255, 255, 255, 0.3); }
.contact-submit:disabled { opacity: 0.5; cursor: wait; }
.form-status { margin: -4px 0 0; min-height: 1.3em; font: 400 0.78rem/1.4 var(--font-mono); color: var(--ink-2); text-align: center; }
.form-status[data-kind="error"] { color: #ff8a8d; }

@media (max-width: 480px) {
  .contact-fab { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .contact-inner { padding: 18px 16px 16px; }
}

/* ---------- redirect page ---------- */
.go-stage { padding-block: 48px; }
.go-card {
  max-width: 420px;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 30px 28px 28px;
  text-align: center;
  animation: pop 0.6s var(--ease);
}
.go-text {
  margin: 0;
  max-width: 28ch;
  font: italic 400 clamp(1.15rem, 4vw, 1.35rem)/1.3 var(--font-display);
  text-wrap: balance;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.16);
}
.go-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  appearance: none;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: var(--well);
  color: var(--ink-3);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  cursor: not-allowed;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s, border-color 0.4s;
}
/* fills left to right while the visitor waits */
.go-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.07);
  transform-origin: left;
  transform: scaleX(0);
}
.go-btn.counting::before { animation: fill var(--wait, 5s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.go-btn span { position: relative; }
.go-btn.ready {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--void);
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}
.go-btn.ready::before { display: none; }
.go-btn.ready:hover { box-shadow: 0 0 40px rgba(255, 255, 255, 0.34); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--void);
  font: 500 0.78rem/1 var(--font-mono);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 480px) {
  .card { padding: 18px 16px 20px; }
  .lang-note { order: 5; margin-left: 0; width: 100%; }
  .chev { margin-left: auto; }
  .row-art, .row-art > img:first-child, .row-icon { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .caret { animation: none; }
}
