/* ══════════════════════════════════════════════════
   ZXL Studio — Premium Dark Portfolio
   ══════════════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:          #131313;
  --bg-alt:      #191919;
  --bg-card:     #1E1E1F;
  --surface:     #252526;
  --border:      rgba(255, 255, 255, 0.07);
  --text:        #EDEDEF;
  --text-muted:  rgba(255, 255, 255, 0.42);
  --text-dim:    rgba(255, 255, 255, 0.22);
  --accent:      #D97706;    /* warm ember */
  --accent-hover:#B45309;
  --accent-glow: rgba(217, 119, 6, 0.22);
  --radius:      10px;
  --radius-lg:   14px;
  --font:        'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', monospace;
  --nav-h:       64px;
  --transition:  200ms ease-in-out;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(19, 19, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  transition: opacity var(--transition);
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logo:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: 40px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.70);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a.active { color: #ffffff; }

/* ── Mobile Toggle ── */
.mobile-toggle {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero (asymmetric split: content left, art bleeds right) ── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  transform-origin: 68% 45%;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  0%   { transform: scale(1.03) translate3d(0, 0, 0); }
  100% { transform: scale(1.18) translate3d(-2.2%, -2.8%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
}

.hero-embers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Ominous, randomly-timed lightning flash on the horizon. JS drives opacity
   directly (a strike is irregular by nature, not a fixed loop), so this only
   defines the layer itself. Sits under hero-overlay so the flash lights the
   art without ever blowing out the copy's readability. */
.hero-lightning {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  --lx: 58%;
  --ly: 16%;
  background: radial-gradient(ellipse 55% 28% at var(--lx) var(--ly), rgba(224,150,255,0.9) 0%, rgba(168,85,247,0.5) 30%, rgba(124,58,237,0.14) 55%, transparent 72%);
  mix-blend-mode: screen;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, transparent 0%, var(--bg) 100%),
    linear-gradient(90deg, rgba(19, 19, 19,0.94) 0%, rgba(19, 19, 19,0.72) 38%, rgba(19, 19, 19,0.30) 62%, rgba(19, 19, 19,0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
  padding-top: var(--nav-h);
  max-width: 620px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Two-Track Intro (Games / Tools) ── */
.tracks-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.track-card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  transition: border-color var(--transition);
}

.track-card:hover { border-color: rgba(255,255,255,0.14); }

.track-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.track-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 400ms ease, transform 400ms ease;
}

.track-card:hover .track-card-bg img {
  opacity: 0.7;
  transform: scale(1.03);
}

.track-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, var(--bg-card) 10%, rgba(30,30,31,0.55) 55%, rgba(30,30,31,0.15) 100%);
}

.track-card-body {
  position: relative;
  z-index: 2;
}

.track-card-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.track-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
}

.track-card p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 46ch;
  margin-bottom: 20px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 36px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition);
}
.btn-sm:hover {
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
  background: rgba(255,255,255,0.04);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: #ffffff;
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Sections ── */
.section {
  padding: 100px 0 120px;
}

.section-alt {
  background: var(--bg-alt);
}

/* ── Chapter Sections ── */
/* Reusable "scene backdrop" pattern for sections that should feel like a
   distinct place, not just a content block. Placeholder gradients stand in
   for real photography (to be generated later) - swap by adding an <img>
   into .chapter-bg the same way .hero-bg works, no structural change needed.
   Edges fade into the page's own background so the backdrop reads as part
   of the page, not a pasted-in rectangle. */
.chapter-section {
  position: relative;
  overflow: hidden;
}

.chapter-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  animation: heroDrift 34s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .chapter-bg { animation: none; }
}

.chapter-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fade targets are per-edge custom properties, defaulting to the page's base
   background (--bg) since most section boundaries sit on plain .section.
   Override per chapter section only where the actual neighbor is .section-alt
   (--bg-alt) instead - a flat var(--bg-alt) default here would blend cleanly
   into some neighbors but leave a visible seam against others. */
.chapter-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, var(--chapter-fade-top, var(--bg)) 0%, transparent 12%, transparent 88%, var(--chapter-fade-bottom, var(--bg)) 100%);
}
/* #projects sits between #tracks (--bg) above and #about (--bg-alt) below. */
.chapter-cave { --chapter-fade-bottom: var(--bg-alt); }
/* #latest-devlog sits between #about (--bg-alt) above and the footer (--bg) below. */
.chapter-library { --chapter-fade-top: var(--bg-alt); }

/* Warm animated glow under each wall-torch in the cave photo (all six - the
   two bright foreground torches plus four smaller ones receding down the
   corridor), so the scene reads as lit rather than just a flat image. Sits
   below the top/bottom fade overlay so it dims out at the section edges too.
   Split into two layers on different timings/periods so the torches don't
   all breathe in unison - real torchlight doesn't sync like that. */
.chapter-glow, .chapter-flicker {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}
.chapter-glow { animation: chapterGlowPulse 5s ease-in-out infinite; }
.chapter-flicker { animation: chapterGlowPulse 4.2s ease-in-out infinite; animation-delay: -1.6s; }

.chapter-cave .chapter-glow {
  background:
    /* foreground edge torches - tallest, brightest */
    radial-gradient(ellipse 22% 40% at 8% 55%, rgba(255,180,90,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 22% 40% at 92% 55%, rgba(255,180,90,0.5) 0%, transparent 70%),
    /* cool mist ambient toward the back of the corridor */
    radial-gradient(ellipse 30% 40% at 50% 45%, rgba(140,165,195,0.16) 0%, transparent 75%);
}
.chapter-cave .chapter-flicker {
  background:
    /* mid-corridor torches */
    radial-gradient(ellipse 11% 22% at 30% 58%, rgba(255,180,90,0.4) 0%, transparent 70%),
    radial-gradient(ellipse 11% 22% at 70% 58%, rgba(255,180,90,0.4) 0%, transparent 70%),
    /* far background torches, smallest and dimmest */
    radial-gradient(ellipse 8% 16% at 43% 63%, rgba(255,180,90,0.28) 0%, transparent 70%),
    radial-gradient(ellipse 8% 16% at 57% 63%, rgba(255,180,90,0.28) 0%, transparent 70%);
}
@keyframes chapterGlowPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-glow, .chapter-flicker { animation: none; opacity: 0.55; }
}

/* Ember particle canvas, drawn by js/embers.js. Canvas2D rather than a
   second WebGL context - a few dozen glowing dots don't need Three.js. */
.chapter-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.chapter-section > .container {
  position: relative;
  z-index: 2;
}

/* Fallback tint behind images/chapter-dungeon-cave.jpg, shown briefly while
   the photo loads (or if it fails to). */
.chapter-cave .chapter-bg {
  background:
    radial-gradient(ellipse 70% 60% at 28% 72%, rgba(217,119,6,0.16) 0%, transparent 58%),
    linear-gradient(160deg, #1c1712 0%, #100d0a 55%, #0a0807 100%);
}

/* Fallback tint behind images/chapter-ancient-library.jpg, shown briefly
   while the photo loads (or if it fails to). */
.chapter-library .chapter-bg {
  background:
    radial-gradient(ellipse 65% 55% at 68% 32%, rgba(217,119,6,0.2) 0%, transparent 55%),
    linear-gradient(200deg, #241a10 0%, #15100a 55%, #0d0a08 100%);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Project Grid ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.project-card:hover {
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.30);
}

.project-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(217, 119, 6, 0.14), transparent 45%),
    var(--surface);
  padding: 16px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 400ms ease, filter 400ms ease;
}
.project-card:hover .project-image img {
  transform: scale(1.015);
  filter: brightness(1.04);
}

.project-body {
  padding: 24px;
}

.project-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-dim);
}

.tag.sep {
  color: rgba(255,255,255,0.08);
}

.project-body p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 12px;
}

/* ── About Grid ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text .section-label {
  margin-bottom: 16px;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--accent);
  font-weight: 500;
}

.about-text a {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid rgba(217,119,6,0.35);
  transition: border-color var(--transition);
}
.about-text a:hover {
  border-color: var(--accent);
}

/* ── Footer ── */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.platform-btn:hover {
  border-color: rgba(255,255,255,0.15);
  color: #ffffff;
  background: rgba(255,255,255,0.03);
}

.platform-btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.platform-btn-accent:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 28px;
}

.footer-social a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-dim);
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-dim);
}

/* ── Scroll Parallax ── */
.parallax-element {
  will-change: transform;
}

/* ── Auth Desktop Badge ── */
.auth-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 201;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    height: calc(100% - var(--nav-h));
    background: rgba(19, 19, 19, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 24px 24px 40px;
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1.2rem;
    padding: 14px 0;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-links a:hover,
  .nav-links a.active { color: #ffffff; }

  /* Hide desktop auth badge on mobile, show mobile auth section */
  .auth-desktop { display: none !important; }
  #navAuthMobile { display: block !important; }
  #navAuthMobile a {
    font-size: 1.2rem;
    padding: 14px 0;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
  }
  #navAuthMobile a:hover,
  #navAuthMobile a.active { color: #ffffff; }

  /* Auth badge inside mobile menu */
  #navAuthMobile .mobile-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(217, 119, 6,0.3);
    background: rgba(217, 119, 6,0.08);
    cursor: pointer;
    margin-bottom: 8px;
  }
  #navAuthMobile .mobile-auth-badge span { color: var(--text, #EDEDEF); }
  #navAuthMobile .mobile-auth-badge .credits { color: var(--accent, #D97706); font-weight: 600; }

  /* Mobile logout button */
  #navAuthMobile .mobile-logout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    color: #EF4444;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    margin-top: 8px;
    border-radius: 8px;
    transition: background 0.15s;
  }
  #navAuthMobile .mobile-logout-btn:hover,
  #navAuthMobile .mobile-logout-btn:active {
    background: rgba(239,68,68,0.1);
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    aspect-ratio: 16 / 10;
    max-height: 300px;
  }

  .section {
    padding: 72px 0 80px;
  }

  .footer-platforms {
    flex-direction: column;
    align-items: center;
  }

  .hero {
    min-height: 86vh;
    text-align: center;
    justify-content: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(19,19,19,0.35) 0%, var(--bg) 100%),
      rgba(19,19,19,0.55);
  }

  .tracks-grid {
    grid-template-columns: 1fr;
  }

  .track-card {
    min-height: 280px;
    padding: 32px 24px;
  }
}

/* ── Tablet (769px – 1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════
   Project Detail — Forbidden Fantasy
   ══════════════════════════════════════════════════ */

/* ── Project Hero ── */
.project-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(19, 19, 19,0.30) 0%, rgba(19, 19, 19,0.82) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(19, 19, 19,0.50) 0%, transparent 50%, rgba(19, 19, 19,0.50) 100%);
}

.project-hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-h);
  max-width: 740px;
}

.project-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 20px;
}

.project-hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.project-hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Overview Grid ── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.overview-card:hover {
  border-color: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.overview-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.overview-card p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease, filter 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* ── Features List ── */
.features-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.feature-item:hover {
  border-color: rgba(255,255,255,0.08);
}

.feature-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
  width: 40px;
  text-align: center;
}

.feature-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.feature-text p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── System Requirements ── */
.sysreq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 700px;
  margin: 0 auto;
}

.sysreq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.sysreq-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.sysreq-recommended {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.sysreq-recommended h3 {
  color: var(--accent);
}

.sysreq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sysreq-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sysreq-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.req-label {
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.req-value {
  font-weight: 400;
  color: #ffffff;
}

/* ── Details Table ── */
.details-table {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 500;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-right: 20px;
}

.detail-value {
  color: #ffffff;
  text-align: right;
  font-weight: 400;
}

/* ── CTA Section ── */
.cta-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cta-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.cta-box p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.mature-notice {
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  color: var(--text-dim) !important;
  margin-bottom: 0 !important;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Project Detail Responsive ── */
@media (max-width: 768px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .sysreq-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    flex-direction: column;
    gap: 12px;
  }

  .cta-box {
    padding: 40px 24px;
  }
}

/* ══════════════════════════════════════════════════
   Support Page — Supporter Hub
   ══════════════════════════════════════════════════ */

/* ── Support Hero ── */
.support-hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.support-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.support-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroDrift 34s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .support-hero-bg img { animation: none; }
}

.support-hero-pattern {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(217, 119, 6, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(217, 119, 6, 0.10) 0%, transparent 45%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.015) 40px,
      rgba(255, 255, 255, 0.015) 41px
    ),
    var(--bg-alt);
}

.support-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(19, 19, 19,0.45) 0%, rgba(19, 19, 19,0.85) 70%, var(--bg) 100%);
}

.support-hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-h);
  max-width: 680px;
}

.support-hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 20px;
}

.support-hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto;
}

/* ── Ways to Support Cards ── */
.support-ways-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.support-way-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.support-way-card:hover {
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.support-way-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.support-way-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.support-way-card p {
  font-size: 0.83rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Platform CTA Cards ── */
.support-platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.support-platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px 32px;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-platform-card:hover {
  border-color: rgba(255,255,255,0.10);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.30);
}

.support-platform-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.support-platform-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.support-platform-card p {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.btn-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border) !important;
  color: var(--text-dim) !important;
}

.support-mature-note {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 0, 0.08);
  border-radius: var(--radius);
}

.support-mature-note p {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
}

.support-mature-note strong {
  color: var(--text-muted);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   Floating Supporter Message Bubble
   ══════════════════════════════════════════════════ */

/* ── Trigger button ── */
.msg-bubble-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.35);
  transition: all var(--transition);
  line-height: 1;
}

.msg-bubble-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 28px rgba(217, 119, 6, 0.45);
  transform: translateY(-2px);
}

.msg-bubble-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.msg-bubble-btn .bubble-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.msg-bubble-btn .bubble-label {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .msg-bubble-btn {
    bottom: 20px;
    right: 20px;
    padding: 14px 18px;
  }
  .msg-bubble-btn .bubble-label {
    display: none;
  }
}

/* ── Modal overlay ── */
.msg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(19, 19, 19, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: msgFadeIn 0.2s ease;
}

.msg-modal-overlay.active {
  display: flex;
}

@keyframes msgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Modal panel ── */
.msg-modal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px 28px;
  position: relative;
  animation: msgSlideUp 0.25s ease;
}

@keyframes msgSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.msg-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.msg-modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
  line-height: 1;
}

.msg-modal-close:hover {
  color: #ffffff;
  background: var(--surface);
}

.msg-modal-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* ── Form inside modal ── */
.msg-form .form-group {
  margin-bottom: 14px;
}

.msg-form .form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.msg-form .form-group input,
.msg-form .form-group select,
.msg-form .form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #ffffff;
  outline: none;
  transition: border-color var(--transition);
}

.msg-form .form-group input:focus,
.msg-form .form-group select:focus,
.msg-form .form-group textarea:focus {
  border-color: var(--accent);
}

.msg-form .form-group input::placeholder,
.msg-form .form-group textarea::placeholder {
  color: var(--text-dim);
}

.msg-form .form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff30' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.msg-form .form-group select option {
  background: var(--bg-alt);
  color: #fff;
}

.msg-form .form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.msg-form .btn-submit-msg {
  width: 100%;
  padding: 12px 28px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 500;
  transition: all var(--transition);
  margin-top: 4px;
}

.msg-form .btn-submit-msg:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.msg-form .btn-submit-msg:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

.msg-form .btn-submit-msg.loading {
  pointer-events: none;
  opacity: 0.5;
}

.msg-form .btn-submit-msg.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* ── Inline states ── */
.msg-form-status {
  display: none;
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 12px;
}

.msg-form-status.visible {
  display: block;
}

.msg-form-status.success {
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.msg-form-status.error {
  background: rgba(220, 38, 38, 0.10);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #fca5a5;
}

/* ── Support Page Responsive ── */
@media (max-width: 768px) {
  .support-platforms-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .support-hero {
    min-height: 60vh;
  }

  .msg-modal-panel {
    padding: 24px 20px 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .support-platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════
   Devlog System — Bulletin Board & Post Pages
   ══════════════════════════════════════════════════ */

/* ── Devlog Archive Page Header ── */
.devlog-header {
  padding: 120px 0 40px;
  text-align: center;
}

.devlog-header-content {
  max-width: 600px;
  margin: 0 auto;
}

.devlog-header-content .section-label {
  margin-bottom: 16px;
}

.devlog-header-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.2;
}

.devlog-header-content p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Devlog Section ── */
.devlog-section {
  padding-top: 40px;
}

/* ── Devlog Archive Cards ── */
.devlog-archive {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.devlog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: all var(--transition);
}

.devlog-card:hover {
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.devlog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.devlog-card-date {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.devlog-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.devlog-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.devlog-card-title a {
  color: inherit;
  transition: color var(--transition);
}

.devlog-card-title a:hover {
  color: var(--accent);
}

.devlog-card-excerpt {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.devlog-card-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity var(--transition);
}

.devlog-card-link:hover {
  opacity: 0.8;
}

/* ── No-Script / Fallback ── */
.devlog-noscript {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.devlog-noscript p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.devlog-noscript ul {
  list-style: none;
  padding: 0;
}

.devlog-noscript li {
  margin-bottom: 8px;
}

.devlog-noscript a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity var(--transition);
}

.devlog-noscript a:hover {
  opacity: 0.8;
}

/* ── Homepage Latest Devlog Section ── */
.devlog-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.devlog-home-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}

.devlog-home-card:hover {
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.devlog-home-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.devlog-home-card-meta time {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.devlog-home-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.devlog-home-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.devlog-home-card h3 a {
  color: inherit;
  transition: color var(--transition);
}

.devlog-home-card h3 a:hover {
  color: var(--accent);
}

.devlog-home-card p {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.devlog-home-card-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity var(--transition);
}

.devlog-home-card-link:hover {
  opacity: 0.8;
}

.devlog-home-fallback {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.devlog-home-fallback p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-muted);
}

.devlog-home-fallback a {
  color: var(--accent);
  font-weight: 500;
  transition: opacity var(--transition);
}

.devlog-home-fallback a:hover {
  opacity: 0.8;
}

.devlog-home-cta {
  text-align: center;
  margin-top: 36px;
}

/* ── Post Tags (reusable pill) ── */
.post-tag {
  display: inline-block;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 100px;
  line-height: 1.4;
}

.post-tag-category {
  color: var(--accent);
  border-color: rgba(217, 119, 6, 0.25);
  background: rgba(217, 119, 6, 0.08);
}

/* ── Individual Post Page ── */
.post-hero {
  padding: 120px 0 40px;
}

.post-hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.post-back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color var(--transition);
}

.post-back-link:hover {
  color: #ffffff;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.post-date {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.post-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 16px;
}

.post-excerpt-hero {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Post Article Body ── */
.post-article {
  padding-bottom: 80px;
}

.post-body {
  max-width: 700px;
  margin: 0 auto;
}

.post-body p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
}

.post-body p strong {
  color: #ffffff;
  font-weight: 500;
}

.post-body a {
  color: var(--accent);
  font-weight: 500;
  transition: opacity var(--transition);
}

.post-body a:hover {
  opacity: 0.8;
}

.post-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 36px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.post-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 28px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.post-body ul,
.post-body ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
}

.post-body li {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 6px;
}

.post-body li strong {
  color: #ffffff;
  font-weight: 500;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}

.post-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

.post-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent);
}

.post-footer-nav {
  display: flex;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Devlog Responsive ── */
@media (max-width: 768px) {
  .devlog-home-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .devlog-card {
    padding: 20px 24px;
  }

  .post-hero {
    padding: 100px 0 28px;
  }

  .post-footer-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .devlog-home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════
   Steam News Badge (homepage merged feed)
   ══════════════════════════════════════════════════ */

.post-tag-steam {
  background: rgba(27, 85, 146, 0.20);
  border-color: rgba(27, 85, 146, 0.40);
  color: #66c0f4;
}

/* ── Devlog Article Viewer (inline) ── */
.devlog-article-viewer {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.devlog-article-viewer h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: #ffffff;
}
.devlog-article-viewer h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}
.devlog-article-viewer p {
  margin: 0 0 1rem;
  line-height: 1.8;
}
.devlog-article-viewer ul,
.devlog-article-viewer ol {
  margin: 0 0 1rem 1.5rem;
}
.devlog-article-viewer li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.devlog-article-viewer pre {
  background: rgba(0,0,0,0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.devlog-article-viewer code {
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.devlog-article-viewer blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-style: italic;
}
.devlog-article-viewer table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
}
.devlog-article-viewer th,
.devlog-article-viewer td {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: left;
}
.devlog-article-viewer th {
  background: rgba(255,255,255,0.05);
  font-weight: 600;
}
.devlog-article-loading {
  text-align: center;
  padding: 2rem;
  color: #888;
}
.devlog-article-error {
  text-align: center;
  padding: 2rem;
  color: #d45;
}
.devlog-card.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}
