/* ============================================================
   SHARED STYLES — All pages
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --cream: #e8e4c9;
  --olive-btn: #d4cf8e;
  --dark: #1a1a18;
  --glass-bg: rgba(80, 78, 60, 0.25);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f0ede0;
  --text-secondary: rgba(240, 237, 224, 0.6);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
html, body { width: 100%; min-height: 100%; background: var(--dark); color: var(--text-primary); font-family: var(--font-sans); }

/* BACKGROUND GRADIENT (static pages without video) */
.bg-gradient {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #1a1a18 0%, #3d3b28 40%, #6b6940 70%, #8a8755 100%);
}

/* NAV */
nav { display: flex; align-items: center; padding: 28px 48px; flex-shrink: 0; position: relative; z-index: 100; }
.logo { font-family: var(--font-serif); font-size: 18px; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-primary); white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.logo .right-pill { display: inline-block; border: 1px solid rgba(255,255,255,0.3); border-radius: 20px; padding: 2px 14px; font-style: italic; font-size: 14px; margin: 0 4px; }

.nav-links { display: flex; gap: 40px; list-style: none; margin-left: auto; }
.nav-links a { font-family: var(--font-serif); font-size: 17px; color: var(--text-primary); text-decoration: none; opacity: 0.65; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; font-style: italic; font-weight: 700; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; z-index: 101; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); margin: 5px 0; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* PAGE CONTAINER */
.page-container {
  position: relative; z-index: 2;
  width: 100%; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* MAIN CONTENT LAYOUT — triangle left, content right */
.page-main {
  flex: 1; display: flex;
  padding: 20px 48px 60px;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-sidebar {
  width: 260px; flex-shrink: 0;
  display: flex; flex-direction: column;
  gap: 20px;
  position: sticky; top: 100px;
  align-self: flex-start;
}

.page-sidebar .triangle-img {
  width: 220px; height: auto;
}

/* Sidebar TOC */
.sidebar-toc { list-style: none; }
.sidebar-toc li { margin-bottom: 8px; }
.sidebar-toc a {
  font-family: var(--font-sans); font-size: 14px;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s;
}
.sidebar-toc a:hover, .sidebar-toc a.active { color: var(--text-primary); }
.sidebar-toc .sub { padding-left: 16px; }
.sidebar-toc .sub a { font-size: 13px; }
.sidebar-toc .section-title {
  font-style: italic; font-family: var(--font-serif);
  font-size: 15px; color: var(--text-primary);
  margin-bottom: 4px;
}

/* GLASS CARD (content area) */
.glass-card {
  background: var(--glass-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border); border-radius: 24px; padding: 40px 48px;
  flex: 1; min-width: 0;
}

/* ARTICLE CONTENT */
.article-content h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 36px; line-height: 1.3; margin-bottom: 8px;
  color: var(--text-primary);
}
.article-content .subtitle {
  font-family: var(--font-serif); font-style: italic;
  font-size: 18px; color: var(--text-secondary);
  margin-bottom: 32px;
}
.article-content h3 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 24px; line-height: 1.4; margin: 36px 0 16px;
  color: var(--text-primary);
}
.article-content p {
  font-family: var(--font-sans); font-size: 16px;
  line-height: 1.8; margin-bottom: 18px;
  color: rgba(240, 237, 224, 0.85);
}
.article-content ul, .article-content ol {
  margin: 0 0 18px 24px;
  font-family: var(--font-sans); font-size: 16px;
  line-height: 1.8; color: rgba(240, 237, 224, 0.85);
}
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text-primary); font-weight: 500; }
.article-content .highlight {
  color: var(--olive-btn); font-style: italic;
}

/* FORM STYLES */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-row input, .form-field input {
  flex: 1; background: var(--olive-btn); border: none; border-radius: 12px;
  padding: 14px 20px; font-family: var(--font-sans); font-size: 15px;
  color: var(--dark); outline: none;
}
.form-row input::placeholder, .form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(26, 26, 24, 0.45); }
.form-field textarea {
  width: 100%; min-height: 200px; background: var(--olive-btn);
  border: none; border-radius: 12px; padding: 16px 20px;
  font-family: var(--font-sans); font-size: 15px;
  color: var(--dark); outline: none; resize: vertical;
}
.form-submit {
  display: flex; justify-content: flex-end; margin-top: 16px;
}
.submit-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,0.85); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s;
}
.submit-btn:hover { background: rgba(255,255,255,1); transform: scale(1.05); }
.submit-btn:active { transform: scale(0.95); }
.submit-btn svg { width: 22px; height: 22px; fill: var(--dark); }

/* ABOUT PAGE */
.about-layout { display: flex; gap: 40px; align-items: flex-start; }
.about-photo {
  width: 300px; flex-shrink: 0; position: relative;
}
.about-photo img {
  width: 100%; height: auto; border-radius: 8px;
  filter: grayscale(100%);
}
.about-photo .photo-bg {
  position: absolute; inset: -10px; background: var(--olive-btn);
  border-radius: 12px; z-index: -1;
}
.about-content { flex: 1; min-width: 0; }
.about-content h1 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 32px; margin-bottom: 20px;
}
.about-content p {
  font-family: var(--font-sans); font-size: 16px;
  line-height: 1.8; margin-bottom: 18px;
  color: rgba(240, 237, 224, 0.85);
}

/* THEORY TABLE */
.theory-table {
  width: 100%; border-collapse: collapse; margin-top: 24px;
}
.theory-table th {
  font-family: var(--font-serif); font-weight: 400;
  font-size: 16px; text-align: left; padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: var(--text-primary);
}
.theory-table td {
  font-family: var(--font-sans); font-size: 14px;
  padding: 12px 16px; color: rgba(240, 237, 224, 0.75);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
}
.theory-table .label {
  font-family: var(--font-serif); font-style: italic;
  font-size: 18px; color: var(--text-primary);
  display: block; margin-top: 4px;
}
.theory-table .icon { font-size: 14px; opacity: 0.6; }

/* COMMUNITY PAGE */
.community-header {
  margin-bottom: 24px;
}
.community-header .overline {
  font-family: var(--font-sans); font-size: 14px;
  color: var(--text-secondary); margin-bottom: 4px;
}
.community-header h1 {
  font-family: var(--font-serif); font-weight: 400; font-size: 32px;
}

/* MUSIC TOGGLE */
.music-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.music-toggle:hover { transform: scale(1.1); }
.eq-bars { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq-bars span { width: 3px; background: var(--olive-btn); border-radius: 1px; animation: eq 0.8s infinite ease-in-out; }
.eq-bars span:nth-child(1) { animation-delay: 0s; }
.eq-bars span:nth-child(2) { animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { animation-delay: 0.4s; }
.eq-bars span:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }
.music-toggle.muted .eq-bars span { animation: none; height: 4px; opacity: 0.4; }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .hamburger { display: block; }
  .nav-links {
    display: none; position: fixed; inset: 0;
    background: rgba(26,26,24,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 32px; z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 24px; }

  .page-main { flex-direction: column; padding: 20px 20px 40px; gap: 24px; }
  .page-sidebar { width: 100%; position: static; flex-direction: row; align-items: center; gap: 16px; }
  .page-sidebar .triangle-img { width: 120px; }
  .page-sidebar .sidebar-toc { display: none; }

  .glass-card { padding: 24px 20px; border-radius: 20px; }
  .article-content h1 { font-size: 26px; }
  .article-content h3 { font-size: 20px; }
  .article-content p { font-size: 15px; }

  .form-row { flex-direction: column; }

  .about-layout { flex-direction: column; }
  .about-photo { width: 200px; margin: 0 auto; }

  .music-toggle { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}
