/* =============================================
   PAGES.CSS — Gamified Inner Pages
   Level Select · Player Profile · Quest Log
   ============================================= */

/* --- Page Layout --- */
.page-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) 2rem 8rem;
  min-height: calc(100vh - var(--header-h) - 60px);
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: var(--pixel-font);
  font-size: clamp(0.75rem, 2.2vw, 1.1rem);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-subtitle {
  font-family: var(--body-font);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

/* =========================================
   SECTION LABELS
   ========================================= */
.section-label {
  font-family: var(--pixel-font);
  font-size: 0.48rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.2), transparent);
}

/* =========================================
   PROJECTS — LEVEL SELECT (HORIZONTAL STREET)
   ========================================= */
body.page-projects {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  height: 100vh;
}

body.page-projects .page-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: max-content;
  max-width: none !important;
  height: calc(100vh - var(--header-h));
  padding: 0 6rem;
  gap: 5rem;
  box-sizing: border-box;

  /* Beautiful seamless scrolling background spanning the entire horizontal street */
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(90deg, transparent 75%, var(--bg-secondary) 100%), /* Fades to road stone green at the end */
    radial-gradient(ellipse at 95% 50%, rgba(46, 97, 85, 0.08) 0%, transparent 60%),
    linear-gradient(rgba(46, 97, 85, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 97, 85, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 30px 30px, 30px 30px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-attachment: local, local, local, local;
}

.page-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 280px;
  position: relative;
}

.page-title-group h1 {
  font-family: var(--pixel-font);
  font-size: 1.6rem;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.page-title-group p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.level-select-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  column-gap: 60px; /* Uniform 60px gaps */
  position: relative;
  height: auto;
  align-items: flex-start;
  padding-bottom: 110px; /* Optimize height footprint to prevent viewport clipping */
}

/* Horizontal Road Lane (Thicker road: 1.25x size) */
.level-select-grid::before {
  content: '';
  position: absolute;
  bottom: 5px; /* Sits directly below the cards */
  top: auto;
  left: -15rem; /* Extend left past gap to reach title group */
  right: -2rem;
  height: 100px; /* Optimized Road width */
  background: var(--bg-secondary);
  transform: none;
  pointer-events: none;
  z-index: 0;
}

/* Horizontal Centerline (Centered on the Thicker 100px Road) */
.level-select-grid::after {
  content: '';
  position: absolute;
  bottom: 54px; /* Center of the 100px road (5px + 100px / 2 - 1px) */
  top: auto;
  left: -15rem; /* Extend left past gap to match road extension */
  right: -2rem;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--neon-yellow) 0px,
    var(--neon-yellow) 12px,
    transparent 12px,
    transparent 24px
  );
  transform: none;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.level-tile {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid rgba(61, 122, 111, 0.14);
  border-radius: 8px;
  overflow: hidden; /* clip image and nameplate neatly */
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  text-decoration: none;
  color: inherit;
  z-index: 2;
  box-shadow: 0 3px 14px rgba(39, 60, 53, 0.07);
  width: 620px; /* 2x larger card size */
  flex-shrink: 0;
  margin: 0 !important; /* Ensure uniform gaps */
}

/* Top ridge eave removed */

.level-tile:hover::before {
  opacity: 1;
}

/* A small door sign that floats on top of the image-wrap, always visible */
.tile-img-wrap {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  position: relative;
}

.tile-visit-badge {
  display: none; /* Hidden by default; appears when card is clicked to walk to stage */
  font-family: var(--pixel-font);
  font-size: 0.65rem; /* Proportional visit badge text */
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(39, 60, 53, 0.85);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  padding: 6px 14px;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.level-tile:hover {
  border-color: var(--neon-cyan);
  box-shadow:
    0 0 18px rgba(61, 122, 111, 0.14),
    0 6px 24px rgba(39, 60, 53, 0.10);
  transform: translateY(-5px);
}

.stage-badge {
  display: none; /* Removed ST-01, ST-02 etc. badges */
}

.active-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--pixel-font);
  font-size: 0.6rem; /* Proportional active badge text */
  background: rgba(255, 0, 170, 0.15);
  color: var(--neon-magenta);
  padding: 4px 8px;
  border: 1px solid rgba(255, 0, 170, 0.35);
  z-index: 2;
  animation: glow-pulse 2s infinite;
}

.tile-img-wrap {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.level-tile:hover .tile-img {
  transform: scale(1.05);
}

/* Enter prompt overlay — appears on hover */
.enter-prompt {
  position: absolute;
  top: 5px; /* offset for the ::before ridge */
  left: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(39, 60, 53, 0.55);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 6;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.level-tile:hover .enter-prompt {
  opacity: 1;
}

.enter-prompt span {
  font-family: var(--pixel-font);
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(61, 122, 111, 0.9);
  letter-spacing: 0.12em;
  background: var(--neon-cyan);
  padding: 6px 14px;
  border-radius: 4px;
}

.tile-info {
  padding: 24px 28px 28px; /* Proportional padding for giant cards */
}

.tile-info h2 {
  font-family: var(--pixel-font);
  font-size: 1.35rem; /* Proportional card title text */
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  text-transform: uppercase;
}

.tile-info p {
  font-family: var(--body-font);
  font-size: 1.15rem; /* Proportional card description text */
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.tile-year {
  font-family: var(--pixel-font);
  font-size: 0.75rem; /* Proportional card year text */
  color: var(--neon-green);
  letter-spacing: 0.05em;
}

/* =========================================
   ABOUT — PLAYER PROFILE
   ========================================= */
.player-profile {
  max-width: 700px;
}

/* Profile header */
.profile-header {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 2px;
  padding: 24px;
  margin-bottom: 2.5rem;
}

.profile-header .profile-class {
  font-family: var(--pixel-font);
  font-size: 0.42rem;
  color: var(--neon-cyan);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.profile-header .profile-guild {
  font-family: var(--body-font);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-header .profile-base {
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Bio dialog */
.bio-dialog {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 2px;
  padding: 24px;
  margin-bottom: 2.5rem;
  position: relative;
}

.bio-dialog::before {
  content: '◆ BIO';
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: var(--pixel-font);
  font-size: 0.38rem;
  color: var(--neon-cyan);
  background: var(--bg-primary);
  padding: 2px 10px;
  letter-spacing: 0.06em;
}

.bio-dialog p {
  font-family: var(--body-font);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.bio-dialog p:last-child {
  margin-bottom: 0;
}

.bio-dialog strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Stat bars */
.stat-bars {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: 2px;
  padding: 20px;
  margin-bottom: 2.5rem;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-label {
  font-family: var(--pixel-font);
  font-size: 0.38rem;
  color: var(--text-secondary);
  width: 110px;
  text-align: right;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.stat-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 240, 255, 0.1);
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  width: 0;
  transition: width 1.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stat-level {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  color: var(--neon-yellow);
  width: 45px;
  flex-shrink: 0;
}

/* Language stats */
.lang-stats {
  margin-bottom: 2.5rem;
}

.lang-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.lang-row:last-child {
  margin-bottom: 0;
}

.lang-flag {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.lang-name {
  font-family: var(--pixel-font);
  font-size: 0.38rem;
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
  line-height: 1.6;
}

.lang-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 0, 170, 0.1);
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-magenta), var(--neon-purple));
  box-shadow: 0 0 6px rgba(255, 0, 170, 0.25);
  width: 0;
  transition: width 1.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lang-level-text {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  color: var(--neon-purple);
  width: 70px;
  flex-shrink: 0;
}

/* Achievements */
.achievements-section {
  margin-bottom: 2.5rem;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(0, 240, 255, 0.05);
  border-radius: 2px;
  margin-bottom: 6px;
  transition: all 0.3s;
}

.achievement-item:hover {
  border-color: var(--neon-yellow);
  background: rgba(255, 230, 0, 0.02);
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.06);
}

.achievement-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.achievement-text {
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: var(--text-primary);
  flex: 1;
}

.achievement-year {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  color: var(--neon-green);
  flex-shrink: 0;
}

/* Quest history (past experience) */
.quest-history {
  margin-bottom: 2.5rem;
}

.quest-history-item {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: 2px;
  margin-bottom: 8px;
}

.quest-history-item .quest-title-text {
  font-family: var(--pixel-font);
  font-size: 0.42rem;
  color: var(--neon-orange);
  margin-bottom: 8px;
  text-transform: uppercase;
  line-height: 1.8;
}

.quest-history-item p {
  font-family: var(--body-font);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.quest-history-item strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* Contact button */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel-font);
  font-size: 0.48rem;
  color: var(--neon-cyan);
  background: transparent;
  border: 2px solid var(--neon-cyan);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-btn:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.2),
    0 0 40px rgba(0, 240, 255, 0.08);
  transform: translateY(-2px);
}

/* =========================================
   THOUGHTS — QUEST LOG
   ========================================= */
.quest-log {
  max-width: 820px;
}

/* Codex section (translations) */
.codex-section {
  margin-bottom: 3rem;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.codex-card {
  background: var(--bg-card);
  border: 1px solid rgba(179, 136, 255, 0.1);
  border-radius: 2px;
  padding: 22px;
  transition: all 0.3s;
}

.codex-card:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 0 15px rgba(179, 136, 255, 0.1);
}

.codex-card .codex-type {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  color: var(--neon-purple);
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.codex-card h3 {
  font-family: var(--body-font);
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.codex-card .codex-author {
  font-family: var(--body-font);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.codex-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.codex-ch {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.18);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.codex-ch:hover {
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
  border-color: var(--neon-cyan);
}

/* Quest cards grid */
.quests-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.quest-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 0, 170, 0.06);
  border-radius: 2px;
  padding: 22px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  text-decoration: none;
  color: inherit;
}

.quest-card:hover {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 18px rgba(255, 0, 170, 0.1);
  transform: translateY(-4px);
}

.quest-card .quest-status {
  font-family: var(--pixel-font);
  font-size: 0.32rem;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.quest-status.completed {
  color: var(--neon-green);
}

.quest-status.active {
  color: var(--neon-yellow);
  animation: blink-text 2s step-end infinite;
}

.quest-card h3 {
  font-family: var(--pixel-font);
  font-size: 0.45rem;
  color: var(--text-primary);
  line-height: 2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.quest-card .quest-desc {
  font-family: var(--body-font);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.quest-accept {
  font-family: var(--pixel-font);
  font-size: 0.35rem;
  color: var(--neon-magenta);
  letter-spacing: 0.06em;
  transition: all 0.3s;
}

.quest-card:hover .quest-accept {
  text-shadow: 0 0 8px rgba(255, 0, 170, 0.5);
}

/* =========================================
   RESPONSIVE — INNER PAGES
   ========================================= */
@media (max-width: 900px) {
  /* level-select-grid vertical stacking overrides removed to preserve horizontal scrolling */
}

@media (max-width: 768px) {
  /* level-select-grid vertical stacking overrides removed to preserve horizontal scrolling */

  .codex-grid,
  .quests-grid {
    grid-template-columns: 1fr;
  }

  .stat-label {
    width: 80px;
    font-size: 0.34rem;
  }

  .stat-level {
    width: 38px;
    font-size: 0.28rem;
  }

  .lang-name {
    width: 60px;
    font-size: 0.34rem;
  }

  .lang-level-text {
    width: 55px;
    font-size: 0.28rem;
  }

  .profile-header {
    padding: 18px;
  }

  .stat-bars {
    padding: 14px;
  }

  .page-title {
    font-size: clamp(0.6rem, 3vw, 0.85rem);
  }

  .section-label {
    font-size: 0.4rem;
  }
}

/* =========================================
   THOUGHTS PAGE — UNIQUE MOSS GREEN ACCENT
   ========================================= */
body.page-thoughts {
  background-color: #e8eeeb !important;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(61, 122, 111, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(192, 102, 110, 0.03) 0%, transparent 50%),
    linear-gradient(rgba(61, 122, 111, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 122, 111, 0.025) 1px, transparent 1px) !important;
}

body.page-thoughts #header {
  background: rgba(232, 238, 235, 0.93) !important;
  border-bottom: 1px solid rgba(61, 122, 111, 0.12) !important;
}

body.page-thoughts .quest-card {
  background: #d8e2dd !important;
  border-color: rgba(61, 122, 111, 0.12) !important;
}

body.page-thoughts .quest-card:hover {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 14px rgba(61, 122, 111, 0.13) !important;
}

body.page-thoughts .codex-card {
  background: #d8e2dd !important;
  border-color: rgba(61, 122, 111, 0.12) !important;
}

body.page-thoughts .codex-card:hover {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 14px rgba(61, 122, 111, 0.13) !important;
}

body.page-thoughts #footer {
  background: #e8eeeb !important;
  border-top: 1px solid rgba(61, 122, 111, 0.12) !important;
}

/* --- Crossing/Intersection Roads --- */
.street-crossing {
  grid-column: 1 / span 2;
  height: 50px; /* matching the proportions of the main vertical road */
  background: var(--bg-secondary);
  position: relative;
  z-index: 1; /* sits behind tiles and character, above background */
  margin: 0; /* aligned naturally by the small grid row-gap */
}

.street-crossing::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--neon-yellow) 0px,
    var(--neon-yellow) 12px,
    transparent 12px,
    transparent 24px
  );
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 900px) {
  .street-crossing {
    display: none; /* Hide crossings on single-column mobile stacking */
  }
}

/* ══════════════════════════════════════════════
   ROAD END DECORATIONS & GRADIENT (projects.html)
   ══════════════════════════════════════════════ */
body.page-projects {
  background-color: var(--bg-primary);
  background-image: none !important; /* Clear base body background image to prevent double rendering */
}

.level-select-grid {
  margin-right: 320px !important; /* Make room for the end of the road text on the right */
  margin-bottom: 0 !important;
}

.road-end-container {
  position: absolute;
  right: -270px;
  bottom: 5px; /* Vertically centered with the road */
  top: auto;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
  z-index: 10;
  text-align: center;
  width: 250px;
}

.road-end-text {
  font-family: var(--pixel-font);
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  pointer-events: none;
}

.road-end-text p {
  font-size: 1.3rem; /* 1. Bigger text */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  background: linear-gradient(90deg, var(--neon-cyan) 0%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1.3;
}

/* Fixed horizontal footer overlays */
body.page-projects #footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: transparent !important;
  border-top: none !important;
  pointer-events: none; /* Let character walk underneath */
}

body.page-projects #footer .footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  pointer-events: auto; /* Let links remain clickable */
}

/* =========================================
   THEME GROUPS / TRACK CONNECTOR LINES & LABELS
   ========================================= */
.theme-group {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  column-gap: 60px; /* spacing between cards inside the group */
  padding-top: 50px; /* Optimize height to prevent top cutoffs */
}

/* Horizontal line running across the top of each theme group */
.theme-label {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.theme-label::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan) 15%, var(--neon-cyan) 85%, transparent);
  z-index: 1;
}

.theme-label span {
  font-family: var(--pixel-font);
  font-size: 0.75rem; /* Larger, bold pixel track name */
  color: var(--neon-cyan);
  background: var(--bg-primary); /* matches page background to cut the line */
  padding: 0 24px; /* More padding for text break */
  position: relative;
  z-index: 2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* =========================================
   FLOATING HUD STAGE NAVIGATION MENU
   ========================================= */
.projects-hud-menu {
  position: fixed;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(24, 44, 37, 0.85); /* Deep forest green glass */
  border: 1.5px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 16px 12px;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  width: 140px;
}

.hud-menu-header {
  font-family: var(--pixel-font);
  font-size: 0.48rem;
  color: var(--neon-yellow);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
}

.hud-menu-group {
  position: relative;
  width: 100%;
}

.hud-theme-btn {
  font-family: var(--pixel-font);
  font-size: 0.44rem;
  color: #cbd6cf; /* soft sage white */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
  width: 100%;
}

.hud-menu-group:hover .hud-theme-btn {
  color: var(--bg-primary);
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* Horizontal Flyout Submenu Panel */
.hud-submenu {
  position: absolute;
  right: calc(100% + 15px); /* Flyout to the left */
  top: 0;
  background: rgba(24, 44, 37, 0.95); /* Deep forest green */
  border: 1.5px solid var(--neon-cyan);
  border-radius: 6px;
  padding: 8px 10px;
  display: none;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  width: 190px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Invisible bridge to maintain hover state across the 15px gap */
.hud-submenu::before {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 100%;
  width: 25px; /* Spans the gap and prevents layout collapse */
  background: transparent;
}

.hud-menu-group:hover .hud-submenu {
  display: flex;
}

.hud-sub-item {
  font-family: var(--body-font);
  font-size: 0.72rem;
  color: #cbd6cf;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.hud-sub-item:hover {
  color: var(--neon-yellow) !important;
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================
   MINIMALIST RESTING SHELTER MOCKUP STYLE
   ========================================= */
.resting-shelter {
  width: 80px;
  height: 80px;
  background: #8faea2;
  border: 2px solid #5c6c64;
  border-radius: 12px;
  margin-top: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.shelter-z-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Make ZZZ particles float only when character is sleeping inside */
.resting-shelter.sleeping .shelter-z-container {
  opacity: 1;
}

.shelter-z-container span {
  font-family: var(--pixel-font);
  color: var(--neon-yellow);
  font-size: 0.65rem;
  opacity: 0;
  animation: float-zz 2.5s infinite linear;
}

.shelter-z-container .z1 { animation-delay: 0s; }
.shelter-z-container .z2 { animation-delay: 0.8s; font-size: 0.5rem; }
.shelter-z-container .z3 { animation-delay: 1.6s; font-size: 0.38rem; }

@keyframes float-zz {
  0% { transform: translateY(10px) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-30px) translateX(12px); opacity: 0; }
}

/* Vertical Driveway lane connecting the shelter to the horizontal road */
.shelter-driveway {
  position: absolute;
  left: calc(50% - 20px); /* Center under the centered shelter box */
  top: calc(100% - 10px); /* Starts near the bottom of resting-shelter */
  width: 40px;
  height: 800px; /* Long strip extending downwards behind the main road */
  background: var(--bg-secondary);
  z-index: -1; /* Layer behind character and text overlays */
  pointer-events: none;
  border-left: 1px dashed rgba(194, 95, 70, 0.1);
  border-right: 1px dashed rgba(194, 95, 70, 0.1);
}

/* Yellow Dashed Centerline for the Vertical Driveway */
.shelter-driveway::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--neon-yellow) 0px,
    var(--neon-yellow) 12px,
    transparent 12px,
    transparent 24px
  );
}


/* Skill + language bars: fill to their --fill value once revealed */
.stat-bars.active .stat-fill,
.lang-stats.active .lang-fill {
  width: var(--fill);
}

/* =========================================
   STAGE NAV: bottom bar instead of a panel over the cards
   ========================================= */
.projects-hud-menu {
  top: auto;
  bottom: 44px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  flex-direction: row;
  align-items: center;
  width: auto;
  padding: 8px 12px;
  gap: 8px;
}
.hud-menu-header {
  margin: 0 4px 0 0;
  border-bottom: none;
  border-right: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 0 12px 0 2px;
  white-space: nowrap;
}
.hud-menu-group { width: auto; }
.hud-theme-btn { width: auto; white-space: nowrap; padding: 7px 12px; }
.hud-submenu {
  right: auto;
  left: 0;
  top: auto;
  bottom: calc(100% + 12px); /* flies up above the bar */
}
.hud-submenu::before { top: 100%; bottom: auto; left: 0; right: 0; width: auto; height: 16px; }

/* About: contact buttons side by side */
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Quests: not-yet-published entries */
.quest-card--soon { cursor: default; }
.quest-card--soon:hover { transform: none; }
.quest-accept--soon { opacity: 0.6; }
.codex-ch--soon { cursor: default; opacity: 0.7; }
.codex-soon {
  display: block;
  margin-top: 10px;
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* =========================================
   PROJECTS PAGE ON PHONES: simple vertical list
   ========================================= */
@media (max-width: 768px) {
  body.page-projects {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto;
  }
  body.page-projects .page-content {
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    height: auto;
    padding: calc(var(--header-h) + 2rem) 1rem 3rem;
    gap: 1.5rem;
  }
  body.page-projects .page-title-group { min-width: 0; }
  body.page-projects .resting-shelter,
  body.page-projects .shelter-driveway,
  body.page-projects .projects-hud-menu,
  body.page-projects .road-end-container,
  body.page-projects #player-sprite,
  body.page-projects #controls-hint { display: none !important; }
  body.page-projects .level-select-grid {
    flex-direction: column;
    margin-right: 0 !important;
    padding-bottom: 0;
    row-gap: 2rem;
  }
  body.page-projects .level-select-grid::before,
  body.page-projects .level-select-grid::after { display: none; }
  body.page-projects .theme-group {
    flex-direction: column;
    row-gap: 1.25rem;
    padding-top: 2.5rem;
  }
  body.page-projects .level-tile { width: 100%; }
  body.page-projects .reveal-text-left,
  body.page-projects .reveal-text-right { transform: none !important; opacity: 1 !important; }
  body.page-projects #footer { position: static; }
}

/* =========================================
   PROFILE PAGE (pf-) — two-column CV layout
   ========================================= */
.pf-page { max-width: 1120px; }
.pf-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 4.5rem;
  align-items: start;
}

/* Left identity card */
.pf-aside {
  position: sticky;
  top: calc(var(--header-h) + 2.5rem);
  background: var(--bg-card);
  border: 1px solid rgba(46, 97, 85, 0.14);
  border-radius: 6px;
  padding: 2rem 1.75rem;
  box-shadow: 0 10px 30px rgba(24, 44, 37, 0.06);
}
.pf-kicker,
.pf-mini-title {
  font-family: var(--pixel-font);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin: 0 0 0.75rem;
}
.pf-name {
  font-family: var(--serif-font);
  font-size: 2.9rem;
  font-weight: 500;
  line-height: 1.02;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}
.pf-role {
  font-size: 0.98rem;
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
}
.pf-facts { margin: 0 0 1.75rem; display: grid; gap: 0.9rem; }
.pf-facts dt {
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-magenta);
  margin-bottom: 0.15rem;
}
.pf-facts dd { margin: 0; font-size: 0.92rem; color: var(--text-primary); line-height: 1.45; }
.pf-actions { display: grid; gap: 0.6rem; margin-bottom: 1.75rem; }
.pf-btn {
  display: block;
  text-align: center;
  font-family: var(--pixel-font);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--neon-cyan);
  border-radius: 4px;
  color: var(--neon-cyan);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.pf-btn:hover { background: rgba(46, 97, 85, 0.08); }
.pf-btn--primary { background: var(--neon-cyan); color: var(--bg-card); }
.pf-btn--primary:hover { background: var(--neon-purple); color: var(--bg-card); }
.pf-langs ul { list-style: none; margin: 0; padding: 0; }
.pf-langs li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(46, 97, 85, 0.18);
  color: var(--text-primary);
}
.pf-langs li span:last-child { color: var(--text-secondary); }

/* Right column */
.pf-bio p {
  font-size: 1.14rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin: 0 0 1.1rem;
  max-width: 64ch;
}
.pf-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 1rem;
}
.pf-stats div { border-top: 2px solid var(--neon-cyan); padding-top: 0.9rem; }
.pf-stats strong {
  display: block;
  font-family: var(--serif-font);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
  color: var(--neon-cyan);
  margin-bottom: 0.45rem;
}
.pf-stats span { font-size: 0.85rem; line-height: 1.45; color: var(--text-secondary); }

.pf-section { margin-top: 3.25rem; }
.pf-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--pixel-font);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin: 0 0 0.5rem;
}
.pf-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(46, 97, 85, 0.2);
}
.pf-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(46, 97, 85, 0.1);
}
.pf-entry:last-child { border-bottom: none; }
.pf-entry--compact { padding: 0.8rem 0; }
.pf-date {
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0;
  padding-top: 0.25rem;
}
.pf-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.45;
}
.pf-muted { font-weight: 400; color: var(--text-secondary); }
.pf-org { font-size: 0.92rem; color: var(--text-secondary); margin: 0.2rem 0 0; line-height: 1.5; }
.pf-entry ul { list-style: none; margin: 0.65rem 0 0; padding: 0; }
.pf-entry li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.pf-entry li::before {               /* small pixel-square bullet */
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: var(--neon-magenta);
}
.pf-link {
  display: inline-block;
  margin: 0.6rem 1.25rem 0 0;
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 97, 85, 0.3);
}
.pf-link:hover { border-color: var(--neon-cyan); }
a.pf-press { display: inline; text-decoration: none; border-bottom: 1px solid rgba(46, 97, 85, 0.3); }
a.pf-press:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

.pf-skill-group { margin-top: 1.1rem; }
.pf-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pf-chips li {
  font-size: 0.88rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-card);
  border: 1px solid rgba(46, 97, 85, 0.22);
  border-radius: 3px;
  color: var(--text-primary);
}

@media (max-width: 860px) {
  .pf-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .pf-aside { position: static; }
  .pf-name { font-size: 2.5rem; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-entry { grid-template-columns: 1fr; gap: 0.35rem; }
}
.pf-social { display: flex; gap: 1.25rem; margin: -0.75rem 0 1.75rem; }
.pf-social a {
  font-family: var(--pixel-font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 97, 85, 0.3);
}
.pf-social a:hover { border-color: var(--neon-cyan); }

/* =========================================
   DESIGN PASS (2026-11): projects, quests, profile
   ========================================= */
/* 2 — titles in the serif font, pixel font only for short labels */
html body .tile-info h2 {
  font-family: var(--serif-font);
  font-size: 1.85rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 8px;
}
html body .tile-info p { font-size: 1rem; }
html body .quest-card h3 {
  font-family: var(--body-font);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}

/* 6 — smaller cards: about three per laptop screen */
@media (min-width: 769px) {
  html body .level-tile { width: 440px; }
  html body .tile-info { padding: 18px 22px 22px; }
}

/* 9 — STAGE NAV contrast */
html body .projects-hud-menu { background: rgba(20, 36, 30, 0.95); border-color: rgba(159, 210, 189, 0.55); }
html body .hud-menu-header { color: #cfe6dc; opacity: 0.9; }
html body .hud-theme-btn {
  color: #f1f7f4;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
html body .hud-sub-item { color: #e6f0eb; font-size: 0.85rem; }

/* 7 — road / grid toggle */
.view-toggle {
  margin-top: 1rem;
  font-family: var(--pixel-font);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  background: var(--bg-card);
  border: 1.5px solid var(--neon-cyan);
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
  position: relative;
  z-index: 5;
}
.view-toggle:hover { background: var(--neon-cyan); color: var(--bg-card); }
@media (max-width: 768px) { .view-toggle { display: none; } }

/* 7 — grid view layout */
body.page-projects.view-grid { overflow-x: hidden !important; overflow-y: auto !important; height: auto; }
body.page-projects.view-grid .page-content {
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  max-width: 1240px !important;
  margin: 0 auto;
  height: auto;
  padding: calc(var(--header-h) + 2.5rem) 2rem 4rem;
  gap: 2rem;
  background-image: none;
}
body.page-projects.view-grid .resting-shelter,
body.page-projects.view-grid .shelter-driveway,
body.page-projects.view-grid .projects-hud-menu,
body.page-projects.view-grid .road-end-container,
body.page-projects.view-grid .char-speech-bubble,
body.page-projects.view-grid #player-sprite { display: none !important; }
body.page-projects.view-grid .page-title-group { min-width: 0; }
body.page-projects.view-grid .level-select-grid {
  flex-direction: column;
  margin-right: 0 !important;
  padding-bottom: 0;
  row-gap: 2rem;
}
body.page-projects.view-grid .level-select-grid::before,
body.page-projects.view-grid .level-select-grid::after { display: none; }
body.page-projects.view-grid .theme-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-top: 2.75rem;
}
body.page-projects.view-grid .level-tile { width: auto; }
body.page-projects.view-grid .tile-info h2 { font-size: 1.5rem; }
body.page-projects.view-grid .reveal-text-left,
body.page-projects.view-grid .reveal-text-right { opacity: 1 !important; transform: none !important; }
body.page-projects.view-grid #footer { position: static; }

/* 12 — project thumbnails on the profile */
.pf-thumb {
  display: block;
  margin: 0.75rem 0 0.25rem;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 18px rgba(24, 44, 37, 0.12);
}
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.pf-thumb:hover img { transform: scale(1.04); }

/* Profile: individual grants under the funding total */
html body .pf-entry ul.pf-grants { margin-top: 0.5rem; }
html body .pf-entry ul.pf-grants li { display: flex; flex-direction: column; margin-bottom: 0.55rem; }
.pf-grant-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.pf-grant-meta { font-size: 0.88rem; color: var(--text-secondary); }

/* Profile: social links as logos */
.pf-social { align-items: center; }
.pf-social a.brand-link { border-bottom: none; padding: 2px 0; opacity: 0.85; transition: opacity 0.2s, transform 0.2s; }
.pf-social a.brand-link:hover { opacity: 1; transform: translateY(-1px); }
.pf-social .brand-icon { width: 22px; height: 22px; }

/* =========================================
   ESSAYS (essay-*.html) — linked from the Quest Log
   ========================================= */
body.page-essay .essay-page { max-width: 760px; }
.essay { margin: 0 auto; }
.essay-back {
  display: inline-block;
  font-family: var(--pixel-font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
}
.essay-back:hover { color: var(--neon-green); }
.essay-kind {
  margin: 2.6rem 0 0.7rem;
  font-family: var(--pixel-font);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-green);
}
.essay-title {
  font-family: var(--serif-font);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  line-height: 1.08;
  color: var(--text-primary);
  overflow-wrap: break-word;
}
.essay-subtitle {
  margin-top: 0.7rem;
  font-family: var(--serif-font);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--text-secondary);
}
.essay-body {
  margin-top: 2.4rem;
  font-family: var(--body-font);
  font-size: 1.06rem;
  line-height: 1.78;
  color: var(--text-primary);
}
.essay-body p { margin: 0 0 1.3em; }
.essay-body h2 {
  margin: 2.3em 0 0.75em;
  font-family: var(--serif-font);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.2;
}
.essay-body blockquote {
  margin: 2.1em 0;
  padding: 0.15em 0 0.15em 1.1em;
  border-left: 3px solid var(--neon-green);
}
.essay-body blockquote p {
  margin: 0;
  font-family: var(--serif-font);
  font-style: italic;
  font-size: 1.85rem;
  line-height: 1.3;
}
.essay-body figure { margin: 2.2em 0; }
.essay-body > figure:first-child { margin-top: 0; }
.essay-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: #d8e2dd;
}
.essay-figure--row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.essay-figure--row img { aspect-ratio: 4 / 3; object-fit: cover; }
.essay-body figcaption {
  grid-column: 1 / -1;
  margin-top: 0.7em;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-secondary);
}
.essay-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(98, 158, 121, 0.7);
  text-underline-offset: 3px;
}
.essay-body a:hover { color: var(--neon-green); }
.essay-body ul {
  margin: 0 0 1.3em;
  padding-left: 1.2em;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.essay-body li { margin-bottom: 0.55em; overflow-wrap: anywhere; }
.essay-related {
  margin-top: 3rem;
  padding: 18px 22px;
  background: #d8e2dd;
  border: 1px solid rgba(61, 122, 111, 0.14);
}
.essay-related-label {
  margin-bottom: 0.6rem;
  font-family: var(--pixel-font);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-green);
}
.essay-related-link {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}
.essay-related-link:hover { color: var(--neon-green); }
.essay-related-talk { margin-top: 0.4rem; font-size: 0.92rem; line-height: 1.55; color: var(--text-secondary); }
.essay-next {
  display: block;
  margin-top: 4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(61, 122, 111, 0.22);
  color: var(--text-primary);
  text-decoration: none;
}
.essay-next-label {
  display: block;
  font-family: var(--pixel-font);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.essay-next-title {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--serif-font);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.2;
}
.essay-next-title::after { content: ' →'; }
.essay-next:hover .essay-next-title { color: var(--neon-green); }
html[lang="ko"] .essay-body { font-size: 1.02rem; line-height: 1.9; word-break: keep-all; }
html[lang="ko"] .essay-title { line-height: 1.2; word-break: keep-all; }
[lang="ko"] { word-break: keep-all; }
@media (max-width: 768px) {
  .essay-body { font-size: 1rem; line-height: 1.72; }
  .essay-body blockquote p { font-size: 1.32rem; }
  .essay-body h2 { font-size: 1.5rem; }
  .essay-subtitle { font-size: 1.2rem; }
  .essay-next-title { font-size: 1.4rem; }
}

/* Quest cards: image across the top of each card (2026-11) */
.quest-card .quest-thumb {
  margin: -22px -22px 18px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #c9d6cf;
  border-bottom: 1px solid rgba(61, 122, 111, 0.12);
}
.quest-card .quest-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.quest-card:hover .quest-thumb img { transform: scale(1.03); }
.quest-card--soon .quest-thumb img { filter: grayscale(0.6); opacity: 0.75; }
.quest-card--soon:hover .quest-thumb img { transform: none; }
