/* ===== VARIABLES ===== */
:root {
  --violet-deep: #2A1040;
  --violet: #5B2D8E;
  --violet-light: #8B5FBF;
  --amethyst: #C4A0E8;
  --gold: #D4A843;
  --gold-soft: #E8CC7E;
  --bg: #0F0B18;
  --bg-card: #1A1226;
  --bg-card-hover: #221A30;
  --text: #E8E0F0;
  --text-muted: #9B8FB0;
  --border: rgba(139, 95, 191, 0.15);
  --border-accent: rgba(212, 168, 67, 0.3);
  --max-width: 820px;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--violet);
  color: #fff;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 11, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease);
}

.logo:hover {
  color: var(--gold-soft);
}

/* ===== NAV MENU ===== */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}

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

.nav-menu a:hover {
  color: var(--gold);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* ===== HAMBURGER ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 110;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle-bar:nth-child(1) { top: 0; }
.nav-toggle-bar:nth-child(2) { top: 9px; }
.nav-toggle-bar:nth-child(3) { top: 18px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ===== MAIN ===== */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  min-height: 60vh;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--amethyst);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-accent);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--violet-light);
  margin: 2rem 0 0.6rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

a {
  color: var(--amethyst);
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--gold-soft);
}

/* ===== LISTS ===== */
ul, ol {
  margin: 0.5rem 0 1.25rem 1.5rem;
  color: var(--text);
}

li {
  margin-bottom: 0.4rem;
}

li::marker {
  color: var(--violet-light);
}

/* ===== BLOCKQUOTE ===== */
blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(91, 45, 142, 0.08);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

/* ===== INTRO ===== */
.intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ===== ARTICLE LIST ===== */
.article-list {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin: 0;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.article-list li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(196, 160, 232, 0.25);
  transform: translateX(4px);
}

.article-list a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  position: relative;
  transition: color 0.25s var(--ease);
}

.article-list a::before {
  content: '\2727';
  margin-right: 0.75rem;
  color: var(--violet-light);
  font-size: 0.8rem;
  transition: color 0.25s var(--ease);
}

.article-list li:hover a {
  color: var(--amethyst);
}

.article-list li:hover a::before {
  color: var(--gold);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  padding-left: 1.55rem;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: rgba(42, 16, 64, 0.15);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--amethyst);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer-legal a:hover {
  color: var(--gold);
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100dvh;
    background: var(--violet-deep);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-menu a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.08em;
  }

  .nav-menu a::after {
    display: none;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .site-main {
    padding: 2rem 1.25rem;
  }

  .article-list a {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .site-main {
    padding: 1.5rem 1rem;
  }
}

/* Categories nav */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.categories a {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border, #333);
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.categories a:hover, .categories a.active {
  background: var(--primary, #7B2D8E);
  color: #fff;
  border-color: var(--primary, #7B2D8E);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border, #333);
}
.pagination a {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border, #333);
  border-radius: 6px;
  transition: all 0.2s;
}
.pagination a:hover {
  background: var(--primary, #7B2D8E);
  color: #fff;
}
.page-info {
  font-size: 0.85rem;
  opacity: 0.7;
}
