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

:root {
  --bg-1: #020205;
  --bg-2: #07080d;
  --panel-bg: rgba(11, 13, 18, 0.8);
  --text: #f2f6ff;
  --muted: #b8c7de;
  --accent: #c9d4e3;
  --entry-pad-block: clamp(2.25rem, 5vh, 4.5rem);
  --entry-pad-inline: clamp(1.75rem, 4vw, 4.25rem);
  --entry-gap-eyebrow-title: 1rem;
  --entry-gap-title-copy: 1rem;
  --entry-gap-copy-copy: 0.9rem;
  --entry-gap-copy-button: 2.25rem;
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 66% 42%, rgba(130, 136, 153, 0.08), transparent 52%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

body.detail-body {
  overflow-x: hidden;
  overflow-y: auto;
}

html {
  scroll-behavior: smooth;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 44%, rgba(170, 176, 192, 0.1), transparent 58%);
  transition: filter 0.8s ease-in-out, transform 0.6s ease-out;
}

.bg-grid::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.13) 0.5px, transparent 0.8px);
  background-size: 3px 3px;
  opacity: 0.08;
}

.bg-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 56%, rgba(0, 0, 0, 0.54) 100%);
  opacity: 1;
}

/* ── Cursor aura glow ─────────────────────────────────────────── */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cursor-glow.is-active {
  opacity: 1;
}

.cursor-glow::before {
  content: "";
  position: absolute;
  left: var(--cx, 50vw);
  top: var(--cy, 50vh);
  width: 440px;
  height: 440px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.28), rgba(141, 91, 255, 0.14) 45%, transparent 72%);
  filter: blur(20px);
  mix-blend-mode: screen;
}

/* ── Animated gradient text ──────────────────────────────────── */
.gradient-text,
.section-card h3,
.about h3 {
  background: linear-gradient(100deg, #f2f6ff 0%, #7fb4ff 28%, #b58dff 52%, #7fb4ff 76%, #f2f6ff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 8s ease-in-out infinite;
}

.section-card .changelog-heading {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: rgba(185, 205, 230, 0.5);
  animation: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-grid .star {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 2px);
  height: var(--size, 2px);
  border-radius: 50%;
  opacity: var(--opacity, 0.45);
  background: rgba(235, 242, 255, 0.9);
  box-shadow: 0 0 5px rgba(189, 208, 235, 0.28);
  transform: translate3d(var(--x, 50vw), var(--y, 50vh), 0);
  animation: starTwinkle var(--duration, 6s) ease-in-out var(--delay, 0s) infinite;
}

.entry {
  position: relative;
  width: min(1000px, calc(100% - 2rem));
  margin: 3.5rem auto;
  border-radius: 1.75rem;
  overflow: hidden;
  background: var(--panel-bg);
  border: 1px solid rgba(219, 227, 240, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(230, 237, 247, 0.05),
    inset 0 -24px 44px rgba(0, 0, 0, 0.25),
    0 1.8rem 4.5rem rgba(0, 0, 0, 0.45);
  min-height: min(640px, calc(100vh - 7rem));
  transform: translateY(0);
  opacity: 1;
  transition: none;
}

.entry__media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 44%, rgba(194, 205, 225, 0.08), transparent 38%),
    linear-gradient(to right, rgba(3, 4, 9, 0.78) 0%, rgba(5, 7, 12, 0.38) 55%, rgba(4, 6, 11, 0.68) 100%);
}

.entry__media::before,
.entry__media::after {
  content: "";
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.entry__media::before {
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.55), transparent 70%);
  animation: nebulaDriftA 22s ease-in-out infinite;
}

.entry__media::after {
  bottom: -16%;
  right: -6%;
  background: radial-gradient(circle, rgba(141, 91, 255, 0.5), transparent 70%);
  animation: nebulaDriftB 26s ease-in-out infinite;
}

@keyframes nebulaDriftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.12); }
}

@keyframes nebulaDriftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6%, -5%) scale(1.08); }
}

.entry__overlay {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto;
  padding: var(--entry-pad-block) var(--entry-pad-inline);
}

/* ── Entry reveal sequence ───────────────────────────────────── */
@keyframes entryReveal {
  0% { opacity: 0; transform: translateY(18px); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.eyebrow,
.entry__copy,
.entry__disclaimer {
  animation: entryReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin: 0 0 var(--entry-gap-eyebrow-title);
  font-size: 0.92rem;
  color: rgba(232, 239, 248, 0.6);
  animation-delay: 0.15s;
}

.entry__overlay h1 {
  margin: 2.5rem 0 4rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
}

.entry-headline-chars {
  display: inline-block;
}

.entry-headline-char {
  display: inline-block;
  background: linear-gradient(100deg, #f2f6ff 0%, #7fb4ff 30%, #b58dff 55%, #7fb4ff 80%, #f2f6ff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(16px);
  animation:
    charIn 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    gradientShift 6s ease-in-out infinite;
  animation-delay:
    calc(0.4s + var(--char-i) * 0.045s),
    calc(1.1s + var(--char-i) * 0.08s);
}

@keyframes charIn {
  0% { opacity: 0; transform: translateY(16px); filter: blur(10px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.entry__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 300ch;
  animation-delay: 1.15s;
}

.entry__copy + .entry__copy {
  margin-top: var(--entry-gap-copy-copy);
}

.entry__button {
  margin-top: 4.5rem;
  align-self: center;
  border: 1px solid rgba(225, 232, 242, 0.32);
  border-radius: 999px;
  background: rgba(188, 200, 218, 0.1);
  color: rgba(238, 243, 250, 0.92);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.15s ease-out;
  animation:
    entryReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both,
    buttonPulse 3.2s ease-in-out 2.4s infinite;
}

@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(120, 170, 255, 0); }
  50% { box-shadow: 0 0 26px rgba(120, 170, 255, 0.35); }
}

.entry__button:hover {
  transform: translateY(-1px);
  border-color: rgba(238, 244, 252, 0.45);
  box-shadow: 0 0 20px rgba(208, 221, 242, 0.16);
}

.entry__button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.entry__disclaimer {
  margin-top: 3.5rem 0 0;
  max-width: 44ch;
  font-size: clamp(0.78rem, 1.9vw, 0.86rem);
  line-height: 1.45;
  color: rgba(230, 238, 248, 0.58);
  text-align: center;
  animation-delay: 1.65s;
}

.site {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto 4rem;
  padding-bottom: clamp(10rem, 35vh, 22rem);
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.subway-nav {
  display: none;
}

.site__header {
  padding: 8rem 0 4.5rem;
}

.site__header {
  text-align: center;
}

.typewriter-lines {
  text-align: center;
  margin: 0 0 0rem;
}

.typewriter-line {
  margin: 0 0 .35rem;
  font-size: clamp(2rem, 1.6vw, 2.55rem);
  font-weight: 700;
  color: rgba(242, 246, 255, 0.92);
  line-height: 1.25;
  min-height: 1.25em;
}

.typewriter-line::after {
  content: "|";
  margin-left: 1px;
  color: rgba(199, 225, 255, 0.65);
  opacity: 0;
}

.typewriter-line.tw-typing::after {
  animation: twCursor 0.65s step-end infinite;
  opacity: 1;
}

@keyframes twCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.header-bullets {
  list-style: none;
  padding: 0;
  margin: 4rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.header-bullets li {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 0 0 auto;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(199, 225, 255, 0.2);
  border-radius: 999px;
  background: rgba(197, 211, 233, 0.07);
  font-size: clamp(0.75rem, 1.3vw, 0.9rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-bullets li:hover {
  border-color: rgba(199, 225, 255, 0.38);
  background: rgba(197, 211, 233, 0.12);
}

.site h2 {
  margin: 0 0 1.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(185, 205, 230, 0.45);
}

.site p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.section-card {
  background: rgba(10, 17, 30, 0.5);
  border: 1px solid rgba(199, 225, 255, 0.17);
  border-radius: 1rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 36px rgba(6, 13, 26, 0.25);
}

.section-card + .section-card {
  margin-top: 4rem;
}

.site-intro {
  margin-top: 0rem;
  margin-bottom: 4rem;
}

.about {
  text-align: center;
}

.about h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 1.6vw, 2.55rem);
}

.section-card h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 1.6vw, 2.55rem);
}

.section-card p {
  color: rgba(233, 243, 255, 0.88);
  line-height: 1.65;
}

.feature-section {
  display: flex;
  flex-direction: column;
}

.section-card__action {
  margin-top: auto;
  padding-top: 1.15rem;
}

.section-card__button {
  display: inline-block;
  border: 1px solid rgba(221, 232, 248, 0.28);
  border-radius: 999px;
  background: rgba(197, 211, 233, 0.1);
  color: rgba(239, 245, 255, 0.9);
  text-decoration: none;
  text-align: center;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.section-card__button:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 243, 255, 0.45);
  box-shadow: 0 0 18px rgba(201, 220, 246, 0.14);
}

.section-card__button:focus-visible {
  outline: 2px solid rgba(241, 247, 255, 0.85);
  outline-offset: 2px;
}

.detail-page {
  width: min(920px, calc(100% - 2rem));
  margin: 3.25rem auto 4rem;
}

.ai-blog-intro h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.ai-post {
  border-color: rgba(182, 93, 255, 0.82);
  box-shadow:
    0 14px 36px rgba(29, 12, 42, 0.32),
    inset 0 0 0 1px rgba(203, 141, 255, 0.14);
}

.ai-post__meta {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(222, 208, 240, 0.72);
}

.ai-post h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

.ai-post__snippet {
  margin: 0;
}

.ai-post-content p + p {
  margin-top: 0.9rem;
}

.ai-post-content h2,
.ai-post-content h3 {
  margin: 1.1rem 0 0.55rem;
}

.year-nav {
  display: none;
}

.project-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  position: relative;
  display: block;
  padding: 1.1rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(27, 40, 61, 0.85), rgba(19, 29, 46, 0.85));
  border: 1px solid rgba(130, 171, 222, 0.24);
  box-shadow: 0 10px 28px rgba(5, 12, 24, 0.22);
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.project-card h4 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.project-card p {
  margin: 0;
  font-size: 0.94rem;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(181, 211, 245, 0.4);
  box-shadow: 0 16px 34px rgba(5, 12, 24, 0.32);
}

/* Individual project card colors */
.project-card:nth-child(1) { background: linear-gradient(160deg, rgba(30, 58, 100, 0.9), rgba(18, 36, 66, 0.9)); border-color: rgba(100, 160, 255, 0.3); }
.project-card:nth-child(2) { background: linear-gradient(160deg, rgba(55, 28, 90, 0.9), rgba(34, 16, 58, 0.9)); border-color: rgba(180, 110, 255, 0.3); }
.project-card:nth-child(3) { background: linear-gradient(160deg, rgba(15, 70, 60, 0.9), rgba(10, 46, 40, 0.9)); border-color: rgba(50, 210, 170, 0.3); }
.project-card:nth-child(4) { background: linear-gradient(160deg, rgba(80, 30, 30, 0.9), rgba(52, 18, 18, 0.9)); border-color: rgba(240, 90, 80, 0.3); }
.project-card:nth-child(5) { background: linear-gradient(160deg, rgba(60, 48, 10, 0.9), rgba(40, 32, 6, 0.9)); border-color: rgba(230, 185, 40, 0.3); }
.project-card:nth-child(6) { background: linear-gradient(160deg, rgba(10, 55, 72, 0.9), rgba(6, 36, 50, 0.9)); border-color: rgba(40, 190, 230, 0.3); }

.project-card:focus-visible {
  outline: 2px solid rgba(231, 241, 255, 0.9);
  outline-offset: 2px;
}

.travel__intro {
  margin-bottom: 1rem;
}

.map-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 2000 / 857;
  padding: 0;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(144, 196, 255, 0.26);
  background:
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(145deg, #12223a, #1a3b66);
  outline: 1px dashed rgba(187, 218, 255, 0.35);
}

.map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to right,
      rgba(197, 225, 255, 0.12) 0,
      rgba(197, 225, 255, 0.12) 1px,
      transparent 1px,
      transparent 10%
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(197, 225, 255, 0.12) 0,
      rgba(197, 225, 255, 0.12) 1px,
      transparent 1px,
      transparent 10%
    );
}

.world-map {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.78;
}

.map-pin {
  z-index: 3;
  fill: #8d5bff;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2;
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s ease, fill 0.2s ease;
}

.map-pin:hover {
  fill: #4fa6ff;
  transform: scale(1.15);
}

.map-pin:focus-visible {
  stroke: #ffffff;
  stroke-width: 2.6;
}

.map-pin[aria-pressed="true"] {
  fill: #ffd66d;
}

/* ── Map pin radar ping (ring circles are cloned in JS) ────────── */
.map-pin__ring {
  fill: none;
  stroke: rgba(141, 91, 255, 0.9);
  stroke-width: 2;
  pointer-events: none;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.map-pin:hover + .map-pin__ring,
.map-pin[aria-pressed="true"] + .map-pin__ring {
  animation: radarPing 1.5s ease-out infinite;
}

@keyframes radarPing {
  0% { opacity: 0.65; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.6); }
}

.travel__selected {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  min-height: 1.4em;
  text-align: center;
}

#selectedPlaces {
  display: inline-block;
  color: #d5ebff;
  font-weight: 700;
}

#selectedPlaces:empty::before {
  content: "\00a0";
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.spotify-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.random-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.random-box {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 2rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(164, 203, 242, 0.25);
  background: rgba(19, 30, 47, 0.72);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.random-box:hover {
  transform: translateY(-4px);
  border-color: rgba(188, 217, 248, 0.4);
  box-shadow: 0 14px 30px rgba(6, 14, 27, 0.3);
}

/* ── Tilt + cursor sheen on interactive cards ───────────────────
   .moment-card:not(.spotify-card) is excluded from tilt via JS;
   spotify-card keeps its own transform: none hover behavior. */
.project-card::after,
.moment-card::after,
.random-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--tilt-x, 50%) var(--tilt-y, 50%), rgba(160, 200, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.project-card:hover::after,
.moment-card:hover::after,
.random-box:hover::after {
  opacity: 1;
}

.spotify-card::after {
  display: none;
}

.random-box h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.random-box p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(207, 219, 235, 0.68);
}

@media (max-width: 720px) {
  .random-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    margin-top: 1rem;
    scrollbar-width: none;
  }

  .random-grid::-webkit-scrollbar {
    display: none;
  }

  .random-box {
    flex: 0 0 82vw;
    max-width: 320px;
    scroll-snap-align: start;
  }
}

/* ── Changelog terminal ──────────────────────────────── */
.changelog-section {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New", monospace;
}

.changelog-heading {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New", monospace;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(185, 205, 230, 0.5);
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}

.changelog-terminal {
  position: relative;
  background: rgba(5, 8, 14, 0.92);
  border: 1px solid rgba(164, 203, 242, 0.15);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  overflow: hidden;
  min-height: 6rem;
}

.changelog-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}

.changelog-output {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cl-line {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  font-size: clamp(0.7rem, 1.1vw, 0.82rem);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
}

.cl-version {
  color: #f2f6ff;
  min-width: 5.5em;
  flex-shrink: 0;
}

.cl-date {
  color: rgba(185, 205, 230, 0.45);
  min-width: 5em;
  flex-shrink: 0;
}

.cl-tag {
  display: inline-block;
  min-width: 6.5em;
  text-align: center;
  padding: 0 0.4em;
  border-radius: 3px;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.cl-tag--release    { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.cl-tag--feature    { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.cl-tag--patch      { background: rgba(250, 204, 21, 0.15);  color: #facc15; }
.cl-tag--fix        { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.cl-tag--hotfix     { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.cl-tag--deprecate  { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }

.cl-desc {
  color: rgba(207, 219, 235, 0.72);
  overflow: hidden;
  white-space: nowrap;
}

.cl-cursor::after {
  content: "█";
  color: rgba(199, 225, 255, 0.7);
  animation: clBlink 0.75s step-end infinite;
}

@keyframes clBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (max-width: 720px) {
  .cl-line {
    flex-wrap: wrap;
    white-space: normal;
    gap: 0.3em;
  }

  .cl-desc {
    white-space: normal;
    flex-basis: 100%;
  }
}

.spotify-card {
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.spotify-card:hover,
.spotify-card:focus-visible {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.spotify-card iframe {
  display: block;
  border-radius: 12px;
}

.moment-card {
  position: relative;
  display: block;
  padding: 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(164, 203, 242, 0.25);
  background: rgba(19, 30, 47, 0.72);
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.moment-image {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 0.55rem;
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  color: rgba(231, 241, 255, 0.85);
  background:
    linear-gradient(135deg, rgba(114, 168, 230, 0.35), rgba(81, 120, 174, 0.35)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 9px, transparent 9px 18px);
}

.moment-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.moment-card .moment-author {
  margin: -0.2rem 0 0.45rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(207, 219, 235, 0.68);
}

.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  margin: 0.65rem 0;
  border-radius: 6px;
  background: rgba(199, 225, 255, 0.07);
  border: 1px dashed rgba(199, 225, 255, 0.2);
  object-fit: cover;
  display: block;
}

.moment-card p {
  margin: 0;
  font-size: 0.9rem;
}

.moment-card:hover,
.moment-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(188, 217, 248, 0.4);
  box-shadow: 0 14px 30px rgba(6, 14, 27, 0.3);
}

.moment-card:focus-visible {
  outline: 2px solid rgba(231, 241, 255, 0.9);
  outline-offset: 2px;
}

body.is-entered .entry {
  position: absolute;
  top: 3.5rem;
  left: 50%;
  margin: 0;
  transform: translate(-50%, 0);
  transform-origin: center center;
  animation: panelDissolve 0.8s ease-in-out forwards;
  pointer-events: none;
}

body.is-entered {
  overflow-x: hidden;
  overflow-y: auto;
}

body.is-entered .site {
  animation: siteFadeUp 0.75s ease-in-out 0.3s forwards;
  pointer-events: auto;
}

body.is-entered .bg-grid {
  filter: brightness(1.08);
}

@keyframes panelDissolve {
  0% {
    opacity: 1;
    filter: blur(0) saturate(1);
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    filter: blur(10px) saturate(1.08);
    transform: translate(-50%, 0);
  }
}

@keyframes siteFadeUp {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes starTwinkle {
  0% {
    opacity: calc(var(--opacity, 0.7) * 0.45);
    filter: brightness(0.9);
  }

  100% {
    opacity: var(--opacity, 0.7);
    filter: brightness(1.25);
  }
}

/* ── Scroll reveals ──────────────────────────────────────────── */
body.fade-up-active .section-card {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(6px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

body.fade-up-active .section-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

body.fade-up-active .section-card .project-card,
body.fade-up-active .section-card .moment-card,
body.fade-up-active .section-card .random-box,
body.fade-up-active .section-card .header-bullets li {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.fade-up-active .section-card.is-visible .project-card,
body.fade-up-active .section-card.is-visible .moment-card,
body.fade-up-active .section-card.is-visible .random-box,
body.fade-up-active .section-card.is-visible .header-bullets li {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .entry {
    min-height: min(560px, calc(100vh - 3rem));
    margin: 1.5rem auto;
    border-radius: 1.1rem;
  }

  body.is-entered .entry {
    top: 1.5rem;
  }

  .entry__overlay {
    width: 100%;
    min-height: inherit;
  }

  /* Project carousel on mobile */
  .project-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.9rem;
    scrollbar-width: none;
  }

  .project-grid::-webkit-scrollbar {
    display: none;
  }

  .project-slide {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 0 0 82vw;
    max-width: 320px;
    scroll-snap-align: start;
    align-items: stretch;
  }

  .project-carousel .project-card {
    flex: 1;
  }

  .project-carousel__controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  /* Hide map, show places list */
  .map-panel,
  .travel__selected {
    display: none;
  }

  .travel-places-list {
    display: block;
    list-style: none;
    margin: 0.75rem 0 1.25rem;
    padding: 0;
    border-top: 1px solid rgba(199, 225, 255, 0.1);
  }

  .travel-places-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(199, 225, 255, 0.1);
  }

  .tpl__place {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(242, 246, 255, 0.92);
  }

  .tpl__detail {
    font-size: 0.8rem;
    color: rgba(185, 205, 230, 0.62);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tpl-wrapper {
    position: relative;
    max-height: 10.5rem;
    overflow: hidden;
    transition: max-height 0.45s ease;
  }

  .tpl-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5rem;
    background: linear-gradient(to bottom, transparent, rgba(10, 17, 30, 0.96));
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .tpl-wrapper.is-expanded {
    max-height: 60rem;
  }

  .tpl-wrapper.is-expanded::after {
    opacity: 0;
  }

  .tpl-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.5rem auto 0.25rem;
    background: none;
    border: none;
    color: rgba(185, 210, 242, 0.78);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
  }

  .tpl-toggle:hover {
    color: rgba(242, 246, 255, 0.95);
  }

  .tpl-toggle__arrow {
    display: inline-block;
    transition: transform 0.35s ease;
  }

  .tpl-toggle.is-expanded .tpl-toggle__arrow {
    transform: rotate(180deg);
  }

  /* Horizontal scroll carousel */
  .moments-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.9rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .moments-grid::-webkit-scrollbar {
    display: none;
  }

  .moment-card {
    flex: 0 0 82vw;
    max-width: 320px;
    scroll-snap-align: start;
  }

  .moments-carousel__controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .moments-carousel__btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(199, 225, 255, 0.28);
    background: rgba(197, 211, 233, 0.1);
    color: rgba(242, 246, 255, 0.88);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .moments-carousel__btn:hover {
    background: rgba(197, 211, 233, 0.18);
    border-color: rgba(225, 240, 255, 0.45);
    transform: scale(1.06);
  }

  .moments-carousel__btn:focus-visible {
    outline: 2px solid rgba(241, 247, 255, 0.85);
    outline-offset: 2px;
  }

  .moments-carousel__btn:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
  }

}

@media (min-width: 1350px) {
  .site {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto 4rem;
  }

  .subway-nav {
    position: fixed;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }

  body.is-entered .subway-nav {
    display: block;
  }

  .subway-track {
    position: relative;
  }

  .subway-train {
    position: absolute;
    left: 50%;
    top: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle, #dceaff, #6fa8ff 70%);
    box-shadow: 0 0 12px rgba(111, 168, 255, 0.75), 0 0 2px rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%);
    transition: top 0.2s linear;
    pointer-events: none;
  }

  .subway-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .subway-stop {
    position: relative;
    display: flex;
    justify-content: center;
  }

  .subway-stop:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 0.25rem);
    width: 1px;
    height: 1.9rem;
    transform: translateX(-50%);
    background: rgba(201, 216, 236, 0.25);
    pointer-events: none;
  }

  .subway-link {
    width: 94px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.58rem;
    text-decoration: none;
    color: rgba(203, 216, 232, 0.55);
    transition: color 0.22s ease;
  }

  .subway-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(209, 223, 242, 0.5);
    background: rgba(196, 212, 233, 0.3);
    box-shadow: 0 0 0 0 rgba(221, 232, 248, 0.1);
    transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  }

  .subway-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    color: inherit;
    transition: color 0.22s ease;
  }

  .subway-link:hover .subway-dot,
  .subway-link:focus-visible .subway-dot,
  .subway-link.is-active .subway-dot {
    border-color: rgba(235, 245, 255, 0.9);
    background: rgba(241, 248, 255, 0.95);
    box-shadow: 0 0 10px rgba(211, 228, 248, 0.42);
  }

  .subway-link:hover .subway-label,
  .subway-link:focus-visible .subway-label,
  .subway-link.is-active .subway-label {
    color: rgba(245, 250, 255, 0.96);
  }

  .subway-link:focus-visible {
    outline: 2px solid rgba(241, 247, 255, 0.85);
    outline-offset: 2px;
    border-radius: 0.5rem;
  }

  body.detail-body .year-nav {
    display: block;
    position: fixed;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }

  .year-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .year-stop {
    position: relative;
    display: flex;
    justify-content: center;
  }

  .year-stop:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 0.25rem);
    width: 1px;
    height: 1.9rem;
    transform: translateX(-50%);
    background: rgba(201, 216, 236, 0.25);
    pointer-events: none;
  }

  .year-link {
    width: 94px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.58rem;
    text-decoration: none;
    color: rgba(203, 216, 232, 0.55);
    transition: color 0.22s ease;
  }

  .year-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(209, 223, 242, 0.5);
    background: rgba(196, 212, 233, 0.3);
    box-shadow: 0 0 0 0 rgba(221, 232, 248, 0.1);
    transition: background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  }

  .year-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
    color: inherit;
    transition: color 0.22s ease;
  }

  .year-link:hover .year-dot,
  .year-link:focus-visible .year-dot,
  .year-link.is-active .year-dot {
    border-color: rgba(235, 245, 255, 0.9);
    background: rgba(241, 248, 255, 0.95);
    box-shadow: 0 0 10px rgba(211, 228, 248, 0.42);
  }

  .year-link:hover .year-label,
  .year-link:focus-visible .year-label,
  .year-link.is-active .year-label {
    color: rgba(245, 250, 255, 0.96);
  }

  .year-link:focus-visible {
    outline: 2px solid rgba(241, 247, 255, 0.85);
    outline-offset: 2px;
    border-radius: 0.5rem;
  }

  .year-link--disabled {
    color: rgba(203, 216, 232, 0.32);
    cursor: not-allowed;
  }

  .year-link--disabled .year-dot {
    border-color: rgba(209, 223, 242, 0.26);
    background: rgba(196, 212, 233, 0.18);
    box-shadow: none;
  }
}

/* ── Project carousel ───────────────────────────────────────── */

/* On desktop the slide wrappers are invisible to the grid */
@media (min-width: 721px) {
  .project-slide {
    display: contents;
  }

  .project-carousel__controls {
    display: none;
  }
}

/* ── Travel places list ─────────────────────────────────────── */

@media (min-width: 721px) {
  .travel-places-list {
    display: none;
  }

  .tpl-wrapper,
  .tpl-toggle {
    display: none;
  }
}

/* ── Moments carousel ───────────────────────────────────────── */

@media (min-width: 721px) {
  .moments-carousel__controls {
    display: none;
  }
}

/* ── Mobile header ─────────────────────────────────────────── */

.mobile-header {
  display: none;
}

@media (max-width: 1349px) {
  body.is-entered .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 52px;
    padding: 0 1.25rem;
    background: rgba(7, 8, 13, 0.88);
    border-bottom: 1px solid rgba(199, 225, 255, 0.12);
    backdrop-filter: blur(12px);
  }

  body.is-entered .site {
    padding-top: 3.5rem;
  }

  .mobile-header__brand {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(242, 246, 255, 0.92);
    text-decoration: none;
  }

  .mobile-header__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.2s ease;
  }

  .mobile-header__hamburger:hover {
    background: rgba(199, 225, 255, 0.08);
  }

  .mobile-header__hamburger:focus-visible {
    outline: 2px solid rgba(241, 247, 255, 0.85);
    outline-offset: 2px;
  }

  .mobile-header__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: rgba(242, 246, 255, 0.88);
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
  }

  .mobile-header__hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-header__hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-header__hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-header__menu {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(7, 8, 13, 0.96);
    border-bottom: 1px solid rgba(199, 225, 255, 0.12);
    backdrop-filter: blur(12px);
  }

  .mobile-header__menu[aria-hidden="false"] {
    display: block;
  }

  .mobile-header__menu ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
  }

  .mobile-header__menu li {
    border-bottom: 1px solid rgba(199, 225, 255, 0.07);
  }

  .mobile-header__menu li:last-child {
    border-bottom: none;
  }

  .mobile-header__menu a {
    display: block;
    padding: 0.9rem 1.5rem;
    color: rgba(203, 216, 232, 0.82);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .mobile-header__menu a:hover {
    color: rgba(242, 246, 255, 0.96);
    background: rgba(199, 225, 255, 0.05);
  }
}

/* ── Reduced motion ──────────────────────────────────────────────
   Placed last so it wins the cascade over the feature rules above.
   JS-driven effects (cursor glow, entry parallax, card tilt, button
   magnet) are gated at the listener level and never activate, so
   only the pure-CSS autoplaying animations need overrides here. */
@media (prefers-reduced-motion: reduce) {
  .entry__media::before,
  .entry__media::after {
    animation: none !important;
  }

  .eyebrow,
  .entry__overlay h1,
  .entry__copy,
  .entry__button,
  .entry__disclaimer,
  .entry-headline-char {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .gradient-text,
  .section-card h3,
  .about h3 {
    animation: none !important;
    background-position: 0% 50% !important;
  }

  .map-pin__ring {
    animation: none !important;
  }

  .map-pin:hover + .map-pin__ring,
  .map-pin[aria-pressed="true"] + .map-pin__ring {
    opacity: 0.5;
  }
}
