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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121c;
  --bg-card: #1a1a28;
  --bg-hover: #22223a;
  --text-primary: #e8e0d0;
  --text-secondary: #a09888;
  --text-muted: #6a6258;
  --accent-gold: #c9a84c;
  --accent-gold-dim: #a08030;
  --accent-red: #8b2f2f;
  --accent-red-dim: #6b1f1f;
  --border: #2a2a3a;
  --font-serif: 'Crimson Text', 'Georgia', serif;
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --read-width: 720px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #dbb85c;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.nav-brand span {
  color: var(--accent-gold);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent-gold);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

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

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 40%, rgba(201, 168, 76, 0.03) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(139, 47, 47, 0.03) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.02) 0%, transparent 40%);
  animation: heroGlow 20s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-2%, -2%); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-title .and {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-gold);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 1.0s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #dbb85c;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounceY 2s infinite;
  opacity: 0;
  animation: fadeUp 0.8s 1.4s forwards, bounceY 2s 1.4s infinite;
}

@keyframes bounceY {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Section styling */
.section {
  padding: 100px 24px;
  position: relative;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold-dim);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-icon.read { background: rgba(201, 168, 76, 0.1); color: var(--accent-gold); }
.feature-icon.resources { background: rgba(139, 47, 47, 0.1); color: var(--accent-red); }
.feature-icon.companion { background: rgba(201, 168, 76, 0.1); color: var(--accent-gold); }

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

.coming-soon-banner {
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.06), rgba(18, 18, 28, 0));
}

.coming-soon-card {
  border: 1px solid rgba(201, 168, 76, 0.25);
  background: linear-gradient(135deg, rgba(26, 26, 40, 0.92), rgba(18, 18, 28, 0.96));
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.works-hero {
  min-height: 70vh;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.works-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.works-filter {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.works-filter:hover {
  color: var(--accent-gold);
  border-color: rgba(201, 168, 76, 0.35);
}

.works-section {
  margin-top: 42px;
}

.works-section-header {
  margin-bottom: 18px;
}

.works-section-header h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.works-section-header p {
  color: var(--text-secondary);
  max-width: 760px;
}

.work-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 26, 40, 0.96), rgba(18, 18, 28, 0.98));
  border-radius: 20px;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

a.work-card {
  color: inherit;
  display: block;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.4);
  color: inherit;
}

.work-card.featured {
  border-color: rgba(201, 168, 76, 0.45);
  background: linear-gradient(180deg, rgba(45, 38, 22, 0.96), rgba(18, 18, 28, 0.98));
}

.work-cover {
  height: 180px;
  border-radius: 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 16px;
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: rgba(232, 224, 208, 0.95);
  background:
    linear-gradient(180deg, rgba(10, 10, 15, 0.08), rgba(10, 10, 15, 0.55)),
    radial-gradient(circle at top left, rgba(201, 168, 76, 0.35), transparent 40%),
    linear-gradient(135deg, rgba(44, 36, 22, 0.98), rgba(20, 20, 30, 0.98));
  background-image:
    linear-gradient(180deg, rgba(10, 10, 15, 0.08), rgba(10, 10, 15, 0.55)),
    radial-gradient(circle at top left, rgba(201, 168, 76, 0.35), transparent 40%),
    var(--cover-image, linear-gradient(135deg, rgba(44, 36, 22, 0.98), rgba(20, 20, 30, 0.98)));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(201, 168, 76, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.featured-cover {
  background:
    radial-gradient(circle at top left, rgba(201, 168, 76, 0.5), transparent 42%),
    radial-gradient(circle at bottom right, rgba(139, 47, 47, 0.25), transparent 35%),
    linear-gradient(135deg, rgba(61, 44, 16, 0.98), rgba(18, 18, 28, 0.98));
}

.work-meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.work-card-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.work-tag {
  display: inline-flex;
  width: fit-content;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 100px;
  padding: 5px 10px;
}

.work-card h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  line-height: 1.2;
}

.work-card p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.work-card a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.feature-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feature-link:hover {
  gap: 10px;
}

/* About poem section */
.about-poem {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text .dropcap {
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 0.8;
  float: left;
  padding-right: 8px;
  color: var(--accent-gold);
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Featured quote */
.quote-section {
  background: var(--bg-primary);
}

.quote-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-style: italic;
  line-height: 1.6;
  color: var(--text-primary);
  position: relative;
  padding: 40px 0;
}

.quote-text::before {
  content: '\201C';
  font-size: 5rem;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-gold);
  opacity: 0.3;
  line-height: 1;
}

.quote-attribution {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-muted);
}

.footer-brand span {
  color: var(--accent-gold);
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ========== READING PAGE ========== */
.read-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.read-header {
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.read-header-inner {
  max-width: var(--read-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.read-book-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.read-book-selector select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 36px 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a09888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.read-book-selector select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.read-progress {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-content {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 64px 24px 120px;
}

.read-book-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-gold);
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.read-line {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-primary);
  padding: 0 0 0 64px;
  position: relative;
  transition: background 0.2s;
}

.read-line:hover {
  background: rgba(201, 168, 76, 0.03);
}

.read-line-number {
  position: absolute;
  left: 0;
  width: 48px;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--text-muted);
  user-select: none;
  opacity: 0.5;
  padding-right: 12px;
}

.read-line-empty {
  height: 1.2em;
}

.read-line-centered {
  text-align: center;
  padding-left: 0;
}

.read-inline-plate {
  margin: 44px calc(50% - 50vw) 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px 0;
  background: linear-gradient(180deg, rgba(26, 26, 40, 0.6), rgba(10, 10, 15, 0));
}

.read-inline-plate-link {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.read-inline-plate img {
  display: block;
  width: min(100%, 980px);
  max-height: 760px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
}

.read-inline-plate figcaption {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 14px 4px 0;
}

.read-inline-plate-label {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

  .read-inline-plate-caption {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ========== SIDEBAR ========== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-panel {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  width: 320px;
  height: calc(100vh - var(--nav-height));
  z-index: 180;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.sidebar-panel.open {
  transform: translateX(0);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
}

.sidebar-book {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-left: auto;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.sidebar-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
}

.sidebar-body::-webkit-scrollbar {
  width: 4px;
}

.sidebar-body::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sidebar-goto {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-goto-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}

.sidebar-goto-input {
  width: 56px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

.sidebar-goto-input::-webkit-inner-spin-button,
.sidebar-goto-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sidebar-goto-input:focus {
  border-color: var(--accent-gold-dim);
}

.sidebar-bookmarks {
  margin-bottom: 16px;
}

.sidebar-passage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-bookmark-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: transform 0.2s;
}

.sidebar-bookmark-btn:hover {
  transform: scale(1.2);
}

.sidebar-passage {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-passage-indicator {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(18, 18, 28, 0));
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.sidebar-passage-lines {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.sidebar-passage-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.sidebar-passage .sidebar-card:first-of-type {
  margin-top: 4px;
}

.sidebar-empty {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sidebar-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  margin-bottom: 6px;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.sidebar-card:hover {
  border-color: var(--accent-gold-dim);
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-card-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1.4;
}

.sidebar-card-body {
  flex: 1;
  min-width: 0;
}

.sidebar-card-label {
  display: block;
  line-height: 1.3;
  margin-bottom: 2px;
}

.sidebar-card-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.sidebar-card-action {
  font-size: 0.85rem;
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 1px;
}

.sidebar-card-btn-full {
  cursor: pointer;
}

.sidebar-card-stack {
  display: flex;
  align-items: flex-start;
}

.sidebar-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}

.sidebar-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  cursor: pointer;
}

.sidebar-card-btn:hover {
  border-color: var(--accent-gold-dim);
  color: var(--accent-gold);
}

@media (max-width: 768px) {
  .sidebar-panel {
    width: 100%;
  }
}

/* ========== RESOURCES PAGE ========== */
.resources-page {
  padding-top: calc(var(--nav-height) + 48px);
  min-height: 100vh;
  padding-bottom: 80px;
}

.resource-category {
  margin-bottom: 64px;
}

.resource-category h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.resource-category > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.resource-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.resource-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateY(-2px);
}

.resource-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.resource-card h3 a {
  color: var(--text-primary);
}

.resource-card h3 a:hover {
  color: var(--accent-gold);
}

.resource-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.resource-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.resource-tag {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
}

.resource-tag.course { background: rgba(201, 168, 76, 0.1); color: var(--accent-gold); }
.resource-tag.text { background: rgba(139, 47, 47, 0.1); color: var(--accent-red); }
.resource-tag.audio { background: rgba(201, 168, 76, 0.1); color: var(--accent-gold); }
.resource-tag.video { background: rgba(201, 168, 76, 0.15); color: #dbb85c; }

.resource-card.book-card {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.book-cover-link {
  flex-shrink: 0;
  width: 100px;
  display: block;
}

.book-cover-link img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
  transition: opacity 0.2s;
}

.book-cover-link:hover img {
  opacity: 0.85;
}

.book-info {
  flex: 1;
  min-width: 0;
}

.book-info h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.book-info h3 a {
  color: var(--text-primary);
}

.book-info h3 a:hover {
  color: var(--accent-gold);
}

.book-author {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.book-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.book-download-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.book-download-links a {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.book-download-links a:hover {
  opacity: 0.8;
}

.book-download-links .separator {
  color: var(--text-muted);
  font-size: 0.7rem;
}

@media (max-width: 520px) {
  .resource-card.book-card {
    flex-direction: column;
  }
  .book-cover-link {
    width: 80px;
  }
}

.study-path {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
}

.study-path h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--accent-gold);
}

.study-path p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.study-path ol {
  padding-left: 20px;
  color: var(--text-secondary);
}

.study-path ol li {
  margin-bottom: 8px;
}

/* ========== COMPANION PAGE ========== */
.companion-page {
  padding-top: calc(var(--nav-height) + 48px);
  min-height: 100vh;
  padding-bottom: 80px;
}

.companion-content {
  max-width: 800px;
  margin: 0 auto;
}

.companion-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-top: 64px;
  margin-bottom: 16px;
  color: var(--accent-gold);
}

.companion-content h2:first-child {
  margin-top: 0;
}

.companion-content h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.companion-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.companion-content ul, .companion-content ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 16px;
}

.companion-content li {
  margin-bottom: 8px;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.theme-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.theme-card h4 {
  font-family: var(--font-heading);
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.theme-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== HERO IMAGE ========== */
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.08;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transition: opacity 1s;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
    rgba(10, 10, 15, 0.4) 0%,
    rgba(10, 10, 15, 0.7) 40%,
    rgba(10, 10, 15, 1) 100%
  );
}

.hero-content, .hero-badge, .hero-particles {
  z-index: 3;
}

/* ========== DORE PREVIEW SECTION ========== */
.dore-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dore-preview-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  transition: all 0.4s;
}

.dore-preview-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold-dim);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.dore-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dore-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(10, 10, 15, 0.9));
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ========== READ ILLUSTRATIONS ========== */
.read-illustrations {
  margin-bottom: 40px;
}

.read-illustrations-scroll {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.read-illustrations-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.read-illustrations-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.read-illustrations-track::-webkit-scrollbar {
  height: 4px;
}

.read-illustrations-track::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 2px;
}

.read-illustrations-track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.read-study-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.read-study-links-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-right: 6px;
}

.read-study-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.read-study-link:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.read-ill-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.3s;
  background: var(--bg-primary);
}

.read-ill-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateY(-2px);
}

.read-ill-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.read-ill-label {
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== GALLERY PAGE ========== */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.gallery-filter {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-filter:hover {
  border-color: var(--accent-gold-dim);
  color: var(--text-primary);
}

.gallery-filter.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold-dim);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.95));
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 16px 16px;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gallery-item-caption {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-info {
  text-align: center;
  margin-top: 16px;
  padding: 0 24px;
}

.lightbox-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.lightbox-caption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.lightbox-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 3rem;
  cursor: pointer;
  z-index: 10;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.lightbox-nav:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ========== RESUME BANNER ========== */
.resume-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(26, 26, 40, 0.6));
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.resume-banner strong {
  color: var(--text-primary);
}

.resume-banner .resume-btn {
  margin-left: auto;
}

.resume-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s;
}

.resume-dismiss:hover {
  color: var(--text-primary);
}

/* ========== LINE HIGHLIGHT ========== */
.read-line-highlight {
  animation: lineGlow 2s ease-out;
}

@keyframes lineGlow {
  0% { background: rgba(201, 168, 76, 0.15); }
  100% { background: transparent; }
}

/* ========== DORE HERO JS ========== */
.hero-image-loaded {
  opacity: 0.12;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .works-section {
    margin-top: 32px;
  }

  .work-cover {
    height: 150px;
    font-size: 1.6rem;
  }

  .resource-cards {
    grid-template-columns: 1fr;
  }

  .dore-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .read-ill-card {
    flex: 0 0 160px;
  }

  .read-ill-card img {
    height: 120px;
  }

  .read-line {
    font-size: 1rem;
    padding-left: 48px;
  }

  .read-line-number {
    width: 36px;
    font-size: 0.6rem;
  }

  .read-header-inner {
    flex-wrap: wrap;
  }

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .coming-soon-card {
    padding: 24px;
  }

  .works-grid {
    gap: 16px;
  }

  .works-filters {
    gap: 8px;
  }

  .works-filter {
    font-size: 0.68rem;
    padding: 7px 10px;
  }

  .work-cover {
    height: 130px;
    padding: 14px;
  }

  .dore-preview-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .gallery-filters {
    gap: 6px;
  }

  .gallery-filter {
    font-size: 0.7rem;
    padding: 6px 12px;
  }

  .read-ill-card {
    flex: 0 0 140px;
  }

  .read-ill-card img {
    height: 100px;
  }

  .read-line {
    padding-left: 36px;
  }

  .lightbox-nav {
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
}
