/* ─── Stephie's World · night theme ───
   Blade Runner x Wong Kar-wai: wet streets, sodium light, one red sign.
   Shared by index.html (globe) and newyork.html (map). */

:root {
  --ink: #050507;
  --ink-2: #0b0a0e;
  --cream: #efe4d6;
  --cream-dim: rgba(239, 228, 214, 0.8);
  --cream-faint: rgba(239, 228, 214, 0.58);
  --line: rgba(239, 228, 214, 0.09);
  --neon: #ff2d4a;
  --neon-soft: rgba(255, 45, 74, 0.55);
  --neon-faint: rgba(255, 45, 74, 0.14);
  --amber: #ffb15c;
  --amber-soft: rgba(255, 177, 92, 0.55);
  --teal: #6fcfc0;
  --teal-soft: rgba(111, 207, 192, 0.45);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --read: 'Newsreader', Georgia, serif;  /* reading text: sturdier on small screens */
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --zh: 'Noto Serif SC', 'Songti SC', serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ─── Atmosphere layers ─── */
.fx { position: fixed; inset: 0; pointer-events: none; }

.fx-vignette {
  z-index: 5;
  background:
    radial-gradient(ellipse 60% 45% at 50% 105%, rgba(255, 45, 74, 0.10), transparent 70%),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.fx-grain {
  z-index: 6;
  inset: -50%;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%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");
  animation: grain 0.9s steps(4) infinite;
}

.fx-scan {
  z-index: 6;
  opacity: 0.35;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px);
}

.fx-rain { z-index: 4; width: 100%; height: 100%; }

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

/* ─── HUD type ─── */
.hud {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

.hud b { font-weight: 400; color: var(--cream-dim); }
.hud .red { color: var(--neon); text-shadow: 0 0 8px var(--neon-soft); }

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
  text-transform: none;
}

.nav a {
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav a:hover {
  color: var(--cream);
  text-shadow: 0 0 10px var(--neon-soft);
}

/* Neon flicker, used sparingly */
.flicker { animation: flicker 7s infinite; }

@keyframes flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20% { opacity: 0.35; }
  63% { opacity: 0.6; }
}

/* ─── Skill tags ─── */
.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--cream-dim);
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--neon-faint);
  box-shadow: inset 0 0 12px rgba(255, 45, 74, 0.06);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.tag:hover {
  color: var(--cream);
  border-color: var(--neon-soft);
  box-shadow: inset 0 0 12px rgba(255, 45, 74, 0.15), 0 0 12px rgba(255, 45, 74, 0.2);
}

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-grain, .flicker { animation: none; }
}

/* ─── Neon signs ───
   One rule: neon is for signs (where you are, where to go), never for content.
   Every page shares this cluster; the sign for the page you're on is left unlit. */
/* Your name is the shop sign: warm amber block tubes, on every page */
.home-link {
  font-family: 'Tilt Neon', var(--mono); font-size: 0.86rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #fff1dc;
  text-shadow: 0 0 2px #fff, 0 0 5px #ffc27a, 0 0 11px #ffb15c, 0 0 22px rgba(255, 177, 92, 0.5);
  animation: sign-on 2s steps(1, end) 0.3s both;
  transition: filter 0.3s ease;
}
.home-link:hover { filter: brightness(1.25); }
/* Way back from an essay to the index of work: a pink sign, like WORK */
.back-link {
  font-family: 'Tilt Neon', var(--mono); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #ffe3e8; text-shadow: 0 0 2px #fff, 0 0 5px #ff5a78, 0 0 12px #ff2d4a, 0 0 24px rgba(255, 45, 74, 0.5);
  animation: sign-on 2s steps(1, end) 0.3s both; transition: filter 0.3s ease;
}
.back-link:hover { filter: brightness(1.25); }

.signs { display: flex; align-items: center; gap: 1.3rem; }
.top { flex-wrap: wrap; row-gap: 0.7rem; }
.sign {
  font-family: 'Tilt Neon', var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  animation: sign-on 2s steps(1, end) both;
  transition: filter 0.3s ease, color 0.3s ease;
}
.sign.teal { color: #dffff9; animation-delay: 0.5s; text-shadow: 0 0 2px #fff, 0 0 5px #6fcfc0, 0 0 12px #3fb8ac, 0 0 24px rgba(63, 184, 172, 0.6); }
.sign.amber { color: #fff1dc; animation-delay: 0.7s; text-shadow: 0 0 2px #fff, 0 0 5px #ffc27a, 0 0 12px #ffb15c, 0 0 24px rgba(255, 177, 92, 0.55); }
.sign.pink { color: #ffe3e8; animation-delay: 0.9s; text-shadow: 0 0 2px #fff, 0 0 5px #ff5a78, 0 0 12px #ff2d4a, 0 0 24px #ff2d4a, 0 0 40px rgba(255, 45, 74, 0.5); }
.sign.framed { margin-left: 0.2rem; font-size: 0.86rem; }
.sign:hover { filter: brightness(1.3); color: #fff; }
/* You are here: that sign's tube is off */
.sign[aria-current="page"] { color: rgba(239, 228, 214, 0.38); text-shadow: none; animation: none; }

/* Titles in neon (纽约, 巴黎, 上海, 29): a white-hot core in a red bloom, stuttering on */
span.tube.tube {
  color: #ffe3e8;
  text-shadow: 0 0 2px #fff, 0 0 6px #ff5a78, 0 0 14px #ff2d4a, 0 0 30px #ff2d4a, 0 0 54px rgba(255, 45, 74, 0.5);
  animation: sign-on 2.2s steps(1, end) 0.6s both, tube 11s steps(1, end) 6s infinite;
}

@keyframes sign-on {
  0% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: 0.1; } 20% { opacity: 1; }
  24% { opacity: 0.2; } 30% { opacity: 0.9; } 34% { opacity: 0.3; } 46% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes tube {
  0%, 86%, 100% { opacity: 1; }
  87% { opacity: 0.15; } 89% { opacity: 1; } 90% { opacity: 0.25; } 93% { opacity: 1; }
}

@media (max-width: 760px) {
  .signs { gap: 0.75rem; }
  .sign { font-size: 0.6rem; letter-spacing: 0.1em; }
  .sign.framed { font-size: 0.68rem; margin-left: 0.1rem; }
  .home-link, .back-link { font-size: 0.7rem; letter-spacing: 0.12em; }
}
@media (prefers-reduced-motion: reduce) {
  .sign, span.tube.tube, .home-link, .back-link { animation: none; }
}

/* Page titles glow in the colour of their menu sign: reading amber, about teal, work pink */
.title-sign {
  font-family: 'Tilt Neon', var(--mono) !important; font-style: normal !important; font-weight: 400 !important;
  text-transform: uppercase; letter-spacing: 0.18em !important;
  animation: sign-on 2.2s steps(1, end) 0.5s both;
}
.title-sign.amber { color: #fff1dc !important; text-shadow: 0 0 2px #fff, 0 0 6px #ffc27a, 0 0 14px #ffb15c, 0 0 30px rgba(255, 177, 92, 0.5); }
.title-sign.teal { color: #dffff9 !important; text-shadow: 0 0 2px #fff, 0 0 6px #6fcfc0, 0 0 14px #3fb8ac, 0 0 30px rgba(63, 184, 172, 0.5); }
.title-sign.pink { color: #ffe3e8 !important; text-shadow: 0 0 2px #fff, 0 0 6px #ff5a78, 0 0 14px #ff2d4a, 0 0 30px rgba(255, 45, 74, 0.5); }
@media (prefers-reduced-motion: reduce) { .title-sign { animation: none; } }
