/*
Theme Name: Evadora
Theme URI: https://evadoraz.com
Author: Eva Zheng
Description: A well-edited personal site. Writing is the center of everything.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: evadora
*/

/* ── Fonts loaded via functions.php
   DM Sans — all typography, full weight range 100–900
   ───────────────────────────────────────────────── */

/* ══════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════ */
:root {
  --bg:           #0F0E0C;
  --bg-alt:       #171512;
  --text:         #FFFCF7;
  --text-2:       #EDE8E1;
  --text-3:       #9E9488;
  --text-primary: #F5F1EC;
  --text-body:    #EDE8E1;
  --text-muted:   #9E9488;
  --accent:       #D94F30;
  --orange:     #FF5714;
  --blue:       #1B52F5;
  --blue-dim:   rgba(27, 82, 245, 0.08);
  --border:     #2A2520;
  --border-dim: #201D18;

  --font-display: 'DM Sans', -apple-system, sans-serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;

  --max:      760px;
  --radius:   4px;
}

/* ══════════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer — main grows to fill viewport, footer never floats */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════
   LIGHT MODE
   Dark is default. .light class flips to warm paper.
══════════════════════════════════════════════ */
html.light {
  --bg:           #F5F0E8;
  --bg-alt:       #ECE7DF;
  --text:         #1A0E07;
  --text-2:       #3D3830;
  --text-3:       #736859;
  --text-primary: #1A1714;
  --text-body:    #3D3830;
  --text-muted:   #736859;
  --accent:       #B33D1F;
  --border:     #E0D8CC;
  --border-dim: #E8E2D8;
}

/* Light-weight fonts are fine on paper; dark needs more weight */
html.light body { font-weight: 300; }

/* ══════════════════════════════════════════════
   LIFE MODE — galaxy palette, always overrides light/dark.
   Activated by html.life-mode (set in life.js).
══════════════════════════════════════════════ */
html.life-mode {
  --bg:           #08070A;
  --bg-alt:       #0F0E12;
  --text:         #F0EBE2;
  --text-2:       #D6CFC3;
  --text-3:       #8A7A58;
  --text-primary: #D4A853;
  --text-body:    #D6CFC3;
  --text-muted:   #8A7A58;
  --accent:       #D4A853;
  --orange:       #D4A853;
  --blue:         #BFA06A;
  --border:       rgba(212,168,83,0.1);
  --border-dim:   rgba(212,168,83,0.05);
}
html.life-mode body {
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
}

/* ── Galaxy canvas ─────────────────────────────── */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
html.life-mode #stars-canvas { opacity: 1; }

/* ── Nebula orbs ───────────────────────────────── */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  background: transparent;
}
.orb-1 {
  width: 500px; height: 500px;
  top: -120px; left: -150px;
  animation: drift1 18s ease-in-out infinite;
}
.orb-2 {
  width: 420px; height: 420px;
  bottom: -100px; right: -120px;
  animation: drift2 24s ease-in-out infinite;
}
.orb-3 {
  width: 350px; height: 350px;
  top: 30%; left: 50%;
  animation: drift3 22s ease-in-out infinite;
}
html.life-mode .orb-1 { background: rgba(90,60,140,0.06); }
html.life-mode .orb-2 { background: rgba(212,168,83,0.04); }
html.life-mode .orb-3 { background: rgba(40,70,120,0.05); }

@keyframes drift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px,-30px) scale(1.05); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-30px,25px) scale(0.95); }
}
@keyframes drift3 {
  0%,100% { transform: translate(-50%,0); }
  33%      { transform: translate(calc(-50% + 20px),-25px); }
  66%      { transform: translate(calc(-50% - 15px),15px); }
}

/* ══════════════════════════════════════════════
   HEADER — centered magazine masthead
══════════════════════════════════════════════ */
.site-header {
  text-align: center;
  padding: 3.25rem 2rem 1rem;
}

.site-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 3rem;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  transition: opacity 0.15s, color 0.3s;
}

.site-title:hover { opacity: 0.8; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}

.nav-link { transition: color 0.15s; }
.nav-link:hover, .nav-link.current { color: var(--text); }

/* ── Diamond toggle — sits between nav links ── */
.diamond-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}
.diamond-toggle:hover  { transform: scale(1.25); }
.diamond-toggle:active { transform: scale(0.9); }
.diamond-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: drop-shadow(0 0 5px rgba(217, 79, 48, 0.3));
  animation: shimmer 3.5s ease-in-out infinite;
}
html.light .diamond-toggle svg {
  transform: rotate(45deg);
  filter: drop-shadow(0 0 5px rgba(179, 61, 31, 0.25));
}
.diamond-fill {
  transition: fill 0.5s ease;
  fill: var(--accent);
}
html.life-mode .diamond-fill { fill: #EDD38A; }
html.life-mode .diamond-toggle svg {
  filter: drop-shadow(0 0 5px rgba(212, 168, 83, 0.4));
}
/* Explicit gold so it wins regardless of other overrides */
html.life-mode .site-title { color: #D4A853; }

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

/* ══════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════ */
.site-main { flex: 1; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ══════════════════════════════════════════════
   HERO BIO
══════════════════════════════════════════════ */
.site-hero {
  padding: 0.75rem 0 1.5rem;
  text-align: center;
}

.hero-bio {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  text-align: left;
}
.hero-bio p + p { margin-top: 1rem; }

/* ══════════════════════════════════════════════
   SECTION LABEL
══════════════════════════════════════════════ */
.section-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.5rem;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3.5rem 0 2.25rem;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider-text {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--text-2);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   POST LIST — essays
══════════════════════════════════════════════ */
.posts-section { padding-bottom: 1rem; }

/* Lead post (most recent) */
.post-item--lead {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 0;
}

.post-item--lead .post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.post-item--lead .post-title a { transition: color 0.15s; }
.post-item--lead .post-title a:hover { color: var(--orange); }

.post-item--lead .post-excerpt {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 0.6rem;
}

.post-item--lead .post-meta {
  font-size: 0.72rem;
  color: var(--text-3);
}

/* Post list items */
.post-list { list-style: none; }

.post-list-item {
  border-bottom: 1px solid var(--border-dim);
}

.post-list-item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  transition: color 0.15s;
}

.post-list-item a:hover { color: var(--orange); }

.post-list-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
  flex: 1;
}

.post-list-date {
  font-size: 0.72rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 300;
}

/* ══════════════════════════════════════════════
   LIFE POSTS — locked state
══════════════════════════════════════════════ */
.post-list--life .post-list-item { border-bottom-color: var(--border-dim); }

.post-item--locked {
  cursor: pointer;
}

.post-item--locked > div,
.post-item--locked > a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  color: var(--text-2);
  transition: color 0.2s;
}

.post-item--locked:hover > div,
.post-item--locked:hover > a { color: var(--blue); }

.life-post-gem {
  font-size: 0.6rem;
  color: var(--text-3);
  flex-shrink: 0;
  line-height: 1.75;
  transition: color 0.2s;
}

.post-item--locked:hover .life-post-gem { color: var(--blue); }

.post-item--revealed > div,
.post-item--revealed > a {
  color: var(--text);
  animation: fadeReveal 0.5s ease forwards;
}

.post-item--revealed .life-post-gem { color: var(--orange); }

@keyframes fadeReveal {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════
   LIFE SECTION — homepage gold accents
   Locked post titles + section divider
══════════════════════════════════════════════ */
.section-divider-text              { color: #C8960A; }

.post-list--life .life-post-gem    { color: #B8860A; }
.post-list--life .post-item--locked > div { color: #7A5828; }
.post-list--life .post-item--locked:hover > div { color: #C8960A; }
.post-list--life .post-item--locked:hover .life-post-gem { color: #E8A030; }
.post-list--life .post-item--revealed .life-post-gem { color: #C8960A; }

/* ══════════════════════════════════════════════
   RIDDLE BLOCK — inline, appears after clicked item
══════════════════════════════════════════════ */
.riddle-block {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    max-height 0.35s ease,
    opacity    0.3s  ease,
    transform  0.3s  ease,
    padding    0.3s  ease;
  padding: 0 1.5rem;
  border: 1px dashed transparent;
  border-radius: var(--radius);
  margin: 0;
}

.riddle-block.visible {
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
  padding: 1.35rem 1.5rem;
  border-color: #B8860A;     /* always gold — threshold is always black/gold */
  background: #0A0805;
  margin: 0.15rem 0 0.25rem;
}

.riddle-block.dissolve {
  max-height: 0;
  opacity: 0;
  padding: 0 1.5rem;
  border-color: transparent;
}

/* All riddle text/inputs hardcoded black/gold — always the threshold */
.riddle-question {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.05rem;
  color: #E8C86A;
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.riddle-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.riddle-input {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.87rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #2A1E08;
  border-radius: var(--radius);
  background: #141008;
  color: #E8C86A;
  outline: none;
  width: 200px;
  transition: border-color 0.2s;
}

.riddle-input::placeholder { color: #3A2A10; }
.riddle-input:focus { border-color: #C8960A; }

.riddle-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: #C8960A;
  color: #0A0805;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.15s;
}

.riddle-btn:hover { opacity: 0.85; }

.riddle-error {
  font-size: 0.75rem;
  color: #E8A030;
  margin-top: 0.6rem;
  display: none;
}

.riddle-error.visible { display: block; }

.riddle-block.shake { animation: riddleShake 0.45s ease; }

@keyframes riddleShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ══════════════════════════════════════════════
   FULL POST CONTENT (single.php)
══════════════════════════════════════════════ */
.single-post { padding: 4rem 0 5rem; }

.back-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

.back-link:hover { color: var(--orange); }

.post-title-large {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}

.post-meta-line {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-bottom: 3rem;
}

.post-content { color: var(--text); }
.post-content p { margin-bottom: 1.4rem; }

.post-content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 2.75rem 0 0.85rem;
}

.post-content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 2rem 0 0.7rem;
}

.post-content h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.2;
  margin: 1.75rem 0 0.6rem;
}

.post-content h5 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.2;
  margin: 1.5rem 0 0.5rem;
}

.post-content h6 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.2;
  margin: 1.25rem 0 0.4rem;
}

/* ── Heading color hierarchy — steps down with heading level ── */
.article-body h1,
.article-body h2 { color: var(--text); }
.article-body h3,
.article-body h4 { color: var(--text-2); }
.article-body h5,
.article-body h6 { color: var(--text-3); }

.post-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s;
}
.post-content a:hover { text-decoration-color: var(--text-3); }

.post-content a:hover { text-decoration-color: var(--blue); }

.post-content blockquote {
  border-left: 2px solid var(--orange);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.65;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.post-content li { margin-bottom: 0.35rem; }

.post-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  margin: 1.75rem 0;
}

/* Block editor figure / classic editor .wp-caption */
.post-content figure {
  margin: 1.75rem 0;
}
.post-content figure img {
  margin: 0;
}
.post-content figcaption,
.post-content .wp-caption-text {
  font-size: 0.75rem;
  color: var(--text-3);
  font-style: italic;
  margin-top: 0.5rem;
}
.post-content .wp-caption { max-width: 100% !important; }

/* Featured image (top of post) */
.post-thumbnail {
  margin: 1.75rem 0 2.5rem;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ══════════════════════════════════════════════
   TABLE OF CONTENTS (single posts, left gutter)
══════════════════════════════════════════════ */

/* Push article content right so the TOC has clear gutter.
   Scales with viewport width, capped so it doesn't grow forever. */
@media (min-width: 1101px) {
  .article-container .single-post {
    margin-left: clamp(100px, 14vw, 280px);
  }
}

.toc {
  position: fixed;
  top: 150px;
  width: 240px;
  z-index: 10;
}
.toc-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
  opacity: 0.65;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  left: -13px;
}
.toc-item {
  position: relative;
  padding: 7px 0 7px 14px;
}
.toc-item::before {
  content: '';
  position: absolute;
  left: 0; top: 7px; bottom: 7px;
  width: 1.5px;
  background: var(--accent);
  opacity: 0;
  border-radius: 1px;
  transition: opacity 0.35s ease;
}
.toc-item.active::before { opacity: 1; }
.toc-link {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
}
.toc-item.active .toc-link,
.toc-link:hover { color: var(--text-body); }

@media (max-width: 1100px) { .toc { display: none; } }

/* Post navigation */
.post-nav {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-3);
}

.post-nav a { transition: color 0.15s; }
.post-nav a:hover { color: var(--orange); }

/* ══════════════════════════════════════════════
   ESSAYS PAGE
══════════════════════════════════════════════ */
.page-essays { padding: 4rem 0 5rem; }

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: 3rem;
}

/* ── Essays page — featured + older list ──────── */

.essays-featured {
  position: relative;
  padding-top: 40px;
}

/* Gradient top border */
.essays-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.15;
}

.essays-featured-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 20px;
}

.essays-featured-title {
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.essays-featured-title a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s;
}

.essays-featured-title a:hover { opacity: 0.8; }

.essays-featured-date {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.essays-featured-excerpt {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 20px;
}

.essays-featured-excerpt p { margin: 0; }

.essays-featured-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.essays-featured-read:hover { opacity: 1; }

.essays-featured-read .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.essays-featured-read:hover .arrow { transform: translateX(3px); }

/* Older posts */
.essays-older {
  padding-top: 48px;
}

.essays-older-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 24px;
}

.essays-older-list { list-style: none; padding: 0; margin: 0; }

.essays-older-item {
  border-bottom: 1px solid rgba(158, 148, 136, 0.06);
  transition: border-color 0.15s;
}

.essays-older-item:first-child {
  border-top: 1px solid rgba(158, 148, 136, 0.06);
}

.essays-older-item:hover {
  border-bottom-color: rgba(158, 148, 136, 0.12);
}

.essays-older-item:first-child:hover {
  border-top-color: rgba(158, 148, 136, 0.12);
}

.essays-older-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
  color: inherit;
}

.essays-older-title {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.3;
  transition: color 0.15s;
}

.essays-older-link:hover .essays-older-title { color: var(--text); }

.essays-older-date {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   LIFE PAGE — gate + posts
══════════════════════════════════════════════ */
.page-life { padding: 4rem 0 5rem; }

/* Centers the gate-box vertically in the viewport */
.life-gate-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

/* ── Gate box ─────────────────────────────────── */
.gate-box {
  position: relative;
  background: rgba(212,168,83,0.025);
  border: 1px solid rgba(212,168,83,0.1);
  border-radius: 8px;
  padding: 40px 40px 36px;
  margin: 0 auto 56px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow:
    inset 0 0 40px rgba(212,168,83,0.02),
    0 0 0 1px rgba(212,168,83,0.03);
}
.gate-box:hover,
.gate-box:focus-within {
  border-color: rgba(212,168,83,0.2);
  box-shadow:
    inset 0 0 60px rgba(212,168,83,0.035),
    0 0 30px rgba(212,168,83,0.04),
    0 0 0 1px rgba(212,168,83,0.06);
}
.gate-box::before,
.gate-box::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(212,168,83,0.18);
  border-style: solid;
  transition: border-color 0.4s ease;
}
.gate-box::before {
  top: -1px; left: -1px;
  border-width: 1px 0 0 1px;
  border-radius: 8px 0 0 0;
}
.gate-box::after {
  bottom: -1px; right: -1px;
  border-width: 0 1px 1px 0;
  border-radius: 0 0 8px 0;
}
.gate-box:hover::before,
.gate-box:hover::after,
.gate-box:focus-within::before,
.gate-box:focus-within::after {
  border-color: rgba(212,168,83,0.35);
}
.gate-box.shake { animation: gateShake 0.45s ease; }
@keyframes gateShake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}

.gate-question {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 300;
  color: #BFA06A;
  margin-bottom: 24px;
  line-height: 1.4;
}
.gate-input-row {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 280px;
  margin: 0 auto;
}
.gate-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(212,168,83,0.15);
  border-radius: 0;
  padding: 8px 28px 8px 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: #BFA06A;
  width: 100%;
  outline: none;
  transition: border-color 0.4s ease;
}
.gate-input::placeholder { color: #8A7A58; opacity: 0.35; }
.gate-input:focus { border-bottom-color: rgba(212,168,83,0.4); }
.gate-submit {
  position: absolute;
  right: 0;
  bottom: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.3s ease, transform 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
}
.gate-submit:hover { opacity: 0.6; transform: translateX(2px); }
.gate-input:focus ~ .gate-submit { opacity: 0.5; }
.gate-submit svg { width: 16px; height: 16px; }

/* Life posts after unlock */
.life-post-list .post-list-item .post-list-title { color: var(--blue); }
.life-post-list .post-list-item a:hover { color: #D4A853; }

/* Lock/unlock toggle */
.life-lock-btn {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: var(--font-body);
  padding: 0;
}
.life-lock-btn:hover { color: var(--orange); }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border-dim);
}

.social-link {
  display: flex;
  align-items: center;
  color: var(--text-3);
  transition: color 0.15s;
}

.social-link:hover { color: var(--text); }

.social-link svg {
  width: 17px;
  height: 17px;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .site-title { font-size: 2.75rem; }

  .hero-bio { font-size: 0.95rem; }

  .post-item--lead .post-title { font-size: 1.7rem; }

  .post-title-large { font-size: 2.1rem; }

  .riddle-input { width: 140px; }
}
