/* ═══════════════════════════════════════════════════
   PSICOBEES — Design System
   Identidade visual: dourado sobre escuro profundo
   Tipografia: Playfair Display + Source Sans Pro
   Inspiração: abelhas — psicologia construída em
   comunidade; conhecimento como mel, fruto do
   trabalho intelectual coletivo (hexágonos = favo)
═══════════════════════════════════════════════════ */

/* ─── VARIABLES (Dark Theme — default) ─── */
:root {
  --bg-deep: #0a0e17;
  --bg-surface: #0f1420;
  --bg-card: #111827;
  --bg-card-hover: #161d2e;
  --bg-elevated: #1a2332;
  --bg-input: #0d1119;

  --gold: #d4a853;
  --gold-light: #f0d68a;
  --gold-dim: #8b7232;
  --gold-subtle: rgba(212, 168, 83, 0.08);
  --gold-border: rgba(212, 168, 83, 0.15);

  --text-primary: #e8e0d4;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-faint: #4b5563;

  --accent-red: #c0392b;
  --accent-blue: #2980b9;
  --accent-purple: #8e44ad;
  --accent-green: #27ae60;
  --accent-orange: #e67e22;
  --accent-teal: #16a085;

  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.1);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans Pro", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --max-width: 1200px;
  --content-width: 760px;
  --radius: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);

  --nav-bg: rgba(10, 14, 23, 0.85);
  --nav-bg-scrolled: rgba(10, 14, 23, 0.95);
  --nav-mobile-bg: rgba(10, 14, 23, 0.98);
  --code-bg: rgba(255, 255, 255, 0.05);
  --selection-bg: rgba(212, 168, 83, 0.3);
}

/* ─── VARIABLES (Light Theme) ─── */
[data-theme="light"] {
  --bg-deep: #f5f0e8;
  --bg-surface: #ede7db;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7f2;
  --bg-elevated: #f0ebe1;
  --bg-input: #ffffff;

  --gold: #9a7420;
  --gold-light: #7a5c18;
  --gold-dim: #b08a2e;
  --gold-subtle: rgba(154, 116, 32, 0.07);
  --gold-border: rgba(154, 116, 32, 0.18);

  --text-primary: #1a1612;
  --text-secondary: #4a443c;
  --text-muted: #7a7368;
  --text-faint: #a09888;

  --accent-red: #a83224;
  --accent-blue: #2272a4;
  --accent-purple: #7a3a96;
  --accent-green: #1f8f50;
  --accent-orange: #c86a1a;
  --accent-teal: #128570;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);

  --nav-bg: rgba(245, 240, 232, 0.9);
  --nav-bg-scrolled: rgba(245, 240, 232, 0.97);
  --nav-mobile-bg: rgba(245, 240, 232, 0.98);
  --code-bg: rgba(0, 0, 0, 0.05);
  --selection-bg: rgba(154, 116, 32, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      ellipse at 15% 10%,
      rgba(212, 168, 83, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 85% 90%,
      rgba(192, 57, 43, 0.015) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(41, 128, 185, 0.01) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
  transition: background 0.4s ease;
}

[data-theme="light"] body::before {
  background: radial-gradient(
      ellipse at 15% 10%,
      rgba(154, 116, 32, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 85% 90%,
      rgba(168, 50, 36, 0.02) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 50%,
      rgba(34, 114, 164, 0.015) 0%,
      transparent 60%
    );
}

/* Honeycomb pattern — favo de mel, trabalho coletivo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='42' viewBox='0 0 48 42'%3E%3Cpolygon points='24,1 43,11 43,31 24,41 5,31 5,11' fill='none' stroke='%23d4a853' stroke-width='0.5' stroke-opacity='0.04'/%3E%3C/svg%3E");
  background-size: 48px 42px;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='42' viewBox='0 0 48 42'%3E%3Cpolygon points='24,1 43,11 43,31 24,41 5,31 5,11' fill='none' stroke='%239a7420' stroke-width='0.6' stroke-opacity='0.12'/%3E%3C/svg%3E");
}

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

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

img {
  max-width: 100%;
  display: block;
}

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.2),
    rgba(212, 168, 83, 0.05)
  );
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
  background: var(--gold-subtle);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--nav-mobile-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 99;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 64px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 101;
  transition: width 0.1s linear;
  width: 0%;
}

/* ═══════════════════════════════════════
   HERO
═══════════════════════════════════════ */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(212, 168, 83, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-ornament {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeDown 0.8s ease forwards 0.2s;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--gold);
  line-height: 1.05;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeDown 0.8s ease forwards 0.35s;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.4em;
  display: block;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* Hero divider — linha com hexágonos (favos de mel) nas pontas */
.hero-divider {
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 28px auto;
  opacity: 0;
  animation: fadeIn 1s ease forwards 0.5s;
  position: relative;
}

.hero-divider::before,
.hero-divider::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 7px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.6;
  top: 50%;
  transform: translateY(-50%);
}

.hero-divider::before {
  left: calc(50% - 24px);
}

.hero-divider::after {
  right: calc(50% - 24px);
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  animation: fadeDown 0.8s ease forwards 0.6s;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ═══════════════════════════════════════
   SECTIONS & LAYOUT
═══════════════════════════════════════ */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
}

/* ═══════════════════════════════════════
   CATEGORY FILTERS
═══════════════════════════════════════ */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.category-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.category-tag:hover,
.category-tag.active {
  border-color: var(--gold-dim);
  color: var(--gold-light);
  background: var(--gold-subtle);
}

/* ═══════════════════════════════════════
   FEATURED POST
═══════════════════════════════════════ */
.featured {
  margin-bottom: 64px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.featured-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  color: inherit;
}

.featured-image {
  position: relative;
  min-height: 360px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.08) 0%,
    rgba(142, 68, 173, 0.06) 50%,
    rgba(41, 128, 185, 0.08) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Featured image: when using a real image */
.featured-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-card:hover .featured-image img {
  transform: scale(1.04);
}

.featured-image-art {
  font-size: 120px;
  opacity: 0.15;
  transition: all 0.5s ease;
  position: relative;
  z-index: 1;
}

/* When image is present, emoji becomes a small overlay badge */
.featured-image-art.has-image {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 36px;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 6px 8px;
  line-height: 1;
  z-index: 2;
}

.featured-card:hover .featured-image-art {
  opacity: 0.25;
  transform: scale(1.1) rotate(-5deg);
}

.featured-card:hover .featured-image-art.has-image {
  opacity: 1;
  transform: scale(1.1);
}

.featured-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(212, 168, 83, 0.2);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.featured-content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.featured-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

.featured-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.featured-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 16px;
  transition: color 0.2s ease;
}

.featured-card:hover .featured-title {
  color: var(--gold-light);
}

.featured-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 300;
}

.featured-read {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.featured-card:hover .featured-read {
  gap: 14px;
}

/* ═══════════════════════════════════════
   POST CARDS GRID
═══════════════════════════════════════ */
.posts-section {
  padding: 40px 0 80px;
}

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

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: inherit;
}

.post-card-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card image: when using a real image */
.post-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-image-art {
  font-size: 64px;
  opacity: 0.12;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}

/* When image is present, emoji becomes a small overlay badge */
.post-card-image-art.has-image {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 28px;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 4px 6px;
  line-height: 1;
  z-index: 2;
}

.post-card:hover .post-card-image-art {
  opacity: 0.2;
  transform: scale(1.15);
}

.post-card:hover .post-card-image-art.has-image {
  opacity: 1;
  transform: scale(1.1);
}

/* Card image backgrounds by category */
.bg-psychoanalysis {
  background: linear-gradient(
    135deg,
    rgba(192, 57, 43, 0.1),
    rgba(192, 57, 43, 0.03)
  );
}
.bg-behaviorism {
  background: linear-gradient(
    135deg,
    rgba(41, 128, 185, 0.1),
    rgba(41, 128, 185, 0.03)
  );
}
.bg-gestalt {
  background: linear-gradient(
    135deg,
    rgba(142, 68, 173, 0.1),
    rgba(142, 68, 173, 0.03)
  );
}
.bg-humanistic {
  background: linear-gradient(
    135deg,
    rgba(39, 174, 96, 0.1),
    rgba(39, 174, 96, 0.03)
  );
}
.bg-cognitive {
  background: linear-gradient(
    135deg,
    rgba(230, 126, 34, 0.1),
    rgba(230, 126, 34, 0.03)
  );
}
.bg-social {
  background: linear-gradient(
    135deg,
    rgba(22, 160, 133, 0.1),
    rgba(22, 160, 133, 0.03)
  );
}
.bg-general {
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.08),
    rgba(212, 168, 83, 0.02)
  );
}
.bg-development {
  background: linear-gradient(
    135deg,
    rgba(211, 84, 0, 0.1),
    rgba(211, 84, 0, 0.03)
  );
}
.bg-neuro {
  background: linear-gradient(
    135deg,
    rgba(93, 173, 226, 0.1),
    rgba(93, 173, 226, 0.03)
  );
}

.post-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-card-category {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
}

/* Category color badges */
.cat-psychoanalysis {
  color: var(--accent-red);
  background: rgba(192, 57, 43, 0.1);
}
.cat-behaviorism {
  color: var(--accent-blue);
  background: rgba(41, 128, 185, 0.1);
}
.cat-gestalt {
  color: var(--accent-purple);
  background: rgba(142, 68, 173, 0.1);
}
.cat-humanistic {
  color: var(--accent-green);
  background: rgba(39, 174, 96, 0.1);
}
.cat-cognitive {
  color: var(--accent-orange);
  background: rgba(230, 126, 34, 0.1);
}
.cat-social {
  color: var(--accent-teal);
  background: rgba(22, 160, 133, 0.1);
}
.cat-general {
  color: var(--gold);
  background: var(--gold-subtle);
}
.cat-development {
  color: #d35400;
  background: rgba(211, 84, 0, 0.1);
}
.cat-neuro {
  color: #5dade2;
  background: rgba(93, 173, 226, 0.1);
}

.post-card-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.post-card:hover .post-card-title {
  color: var(--gold-light);
}

.post-card-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.post-card-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-card-reading {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

.post-card-arrow {
  color: var(--gold-dim);
  font-size: 18px;
  transition: all 0.2s ease;
}

.post-card:hover .post-card-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

/* ═══════════════════════════════════════
   ARTICLE PAGE
═══════════════════════════════════════ */
.article-page {
  padding: 120px 24px 80px;
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.article-back {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  transition: all 0.2s ease;
}

.article-back:hover {
  color: var(--gold);
  gap: 12px;
}

.article-header {
  margin-bottom: 48px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 20px;
}

.article-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 40px 0;
}

/* Article hero image */
.article-hero-image {
  margin: 0 -24px 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 440px;
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 440px;
}

/* Article body typography */
.article-body {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: 1.5em;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5em 0 0.8em;
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2em 0 0.6em;
}

.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--gold-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.6;
}

.article-body blockquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  color: var(--gold-dim);
  margin-top: 10px;
  letter-spacing: 1px;
}

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

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--gold-light);
}

.article-body ul,
.article-body ol {
  margin: 1.2em 0;
  padding-left: 1.5em;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body a {
  color: var(--gold);
  border-bottom: 1px solid rgba(212, 168, 83, 0.3);
  transition: border-color 0.2s ease;
}

.article-body a:hover {
  border-bottom-color: var(--gold);
}

.article-body img {
  border-radius: var(--radius-sm);
  margin: 2em 0;
  border: 1px solid var(--border);
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5em 0;
}

/* Note box */
.note-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 2em 0;
  font-size: 14px;
}

.note-box-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
}

/* Article nav (prev/next) */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.article-nav-item {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.article-nav-item:hover {
  border-color: var(--gold-border);
  background: var(--bg-card-hover);
  color: inherit;
}

.article-nav-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 6px;
}

.article-nav-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.article-nav-item.next {
  text-align: right;
}

/* ═══════════════════════════════════════
   ARTICLE SHARE BUTTONS
═══════════════════════════════════════ */
.article-share {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
}

.article-share-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
}

.article-share-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn svg {
  flex-shrink: 0;
}

/* WhatsApp */
.share-btn.share-whatsapp:hover {
  border-color: #25d366;
  color: #25d366;
  background: rgba(37, 211, 102, 0.08);
}

/* Twitter / X */
.share-btn.share-twitter:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Facebook */
.share-btn.share-facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
}

/* LinkedIn */
.share-btn.share-linkedin:hover {
  border-color: #0a66c2;
  color: #0a66c2;
  background: rgba(10, 102, 194, 0.08);
}

/* Copy Link */
.share-btn.share-copy {
  width: auto;
  padding: 0 16px;
  gap: 8px;
}

.share-btn.share-copy:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-subtle);
}

.share-copy-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.share-btn.share-copy.copied {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(39, 174, 96, 0.08);
}

@media (max-width: 640px) {
  .article-share {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .share-btn {
    width: 38px;
    height: 38px;
  }

  .share-btn.share-copy {
    width: auto;
    padding: 0 14px;
  }
}

/* ═══════════════════════════════════════
   ARTICLE NEWSLETTER CTA
═══════════════════════════════════════ */
.article-newsletter {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.article-newsletter-inner {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.06) 0%,
    rgba(212, 168, 83, 0.02) 50%,
    rgba(17, 24, 39, 0.8) 100%
  );
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.article-newsletter-inner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.article-newsletter-icon {
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.6;
}

.article-newsletter h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.article-newsletter p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.article-newsletter .newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.article-newsletter .newsletter-msg {
  font-size: 14px;
  margin-top: 14px;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════════ */
.about-page {
  padding: 120px 24px 80px;
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.about-avatar-large {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.15),
    rgba(212, 168, 83, 0.03)
  );
  border: 2px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  margin-bottom: 32px;
  overflow: hidden;
}

.about-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.about-page h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 24px;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.about-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: var(--bg-card);
}

.about-social-link:hover {
  color: var(--gold);
  border-color: var(--gold-border);
  background: var(--gold-subtle);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.1);
}

.about-social-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.about-social-link:hover svg {
  opacity: 1;
}

.about-page .article-body p {
  margin-bottom: 1.2em;
}

/* ═══════════════════════════════════════
   ABOUT SECTION (Homepage)
═══════════════════════════════════════ */
.about-section {
  padding: 80px 0;
}

.about-card {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.about-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 48px;
  align-items: center;
}

.about-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.15),
    rgba(212, 168, 83, 0.03)
  );
  border: 2px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.about-text .about-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 20px;
}

.about-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════ */
.newsletter {
  max-width: var(--max-width);
  margin: 0 auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.newsletter-inner {
  text-align: center;
  padding: 56px 40px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 83, 0.06),
    rgba(212, 168, 83, 0.02)
  );
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.newsletter h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  position: relative;
}

.newsletter p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  position: relative;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.newsletter-form input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-form input::placeholder {
  color: var(--text-faint);
}

.newsletter-form input:focus {
  border-color: var(--gold-dim);
}

.newsletter-form button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-msg {
  font-size: 14px;
  margin-top: 14px;
  font-weight: 600;
}

/* ─── Newsletter Success Confirmation ─── */
.newsletter-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  animation: newsletterFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.newsletter-success.visible {
  display: flex;
}

.newsletter-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(39, 174, 96, 0.05));
  border: 2px solid rgba(39, 174, 96, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: newsletterPop 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.newsletter-success-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent-green);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-success-icon svg .check-path {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: newsletterCheckDraw 0.4s 0.5s ease forwards;
}

.newsletter-success-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  animation: newsletterSlideUp 0.5s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.newsletter-success-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 360px;
  animation: newsletterSlideUp 0.5s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.newsletter-success-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 6px 14px;
  margin-top: 2px;
  animation: newsletterSlideUp 0.5s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.newsletter-success-footer {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
  animation: newsletterSlideUp 0.5s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes newsletterFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes newsletterPop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes newsletterSlideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes newsletterCheckDraw {
  to { stroke-dashoffset: 0; }
}

/* ═══════════════════════════════════════
   MEMBERS AREA
═══════════════════════════════════════ */
.members-page .members-header {
  text-align: center;
  margin-bottom: 0;
}

.members-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 16px auto 0;
  line-height: 1.7;
}

.members-form-wrapper {
  max-width: 440px;
  margin: 0 auto;
}

.members-form-wrapper h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.members-form-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.members-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.members-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.members-form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.members-form input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.members-form input::placeholder {
  color: var(--text-faint);
}

.members-form input:focus {
  border-color: var(--gold-dim);
}

.members-form button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.members-form button:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.members-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Password input wrapper ─── */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px !important;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 4px 6px !important;
  margin: 0 !important;
  min-width: auto !important;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--gold);
  filter: none !important;
  box-shadow: none !important;
}

.password-toggle svg {
  display: block;
}

.members-msg {
  font-size: 14px;
  margin-top: 16px;
  font-weight: 600;
}

.members-form-btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 28px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.members-form-btn-secondary:hover {
  color: var(--gold);
  border-color: var(--gold-border);
}

/* Members tabs */
.members-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 32px auto 0;
  max-width: 440px;
  border-bottom: 1px solid var(--border);
}

.members-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.members-tab:hover {
  color: var(--text-secondary);
}

.members-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ═══════════════════════════════════════
   COMMENTS SECTION
═══════════════════════════════════════ */
.comments-section {
  max-width: var(--content-width);
  margin: 48px auto 0;
  padding: 0 24px;
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Comment form */
.comment-form-wrapper {
  margin-bottom: 32px;
}

.comment-form-user {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.comment-form-user strong {
  color: var(--gold);
}

.comment-form textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  min-height: 100px;
}

.comment-form textarea::placeholder {
  color: var(--text-faint);
}

.comment-form textarea:focus {
  border-color: var(--gold-dim);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.comment-char-count {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.comment-form button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-form button:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.comment-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-form-msg {
  font-size: 14px;
  margin-top: 12px;
  font-weight: 600;
}

/* Login prompt */
.comment-login-prompt {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  text-align: center;
  margin-bottom: 32px;
}

.comment-login-prompt p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.comment-login-prompt a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.comment-login-prompt a:hover {
  text-decoration: underline;
}

/* Comments list */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.comments-loading {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.comments-empty {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
  padding: 16px 0;
}

.comment-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item:first-child {
  padding-top: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-subtle);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.comment-username {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.comment-date {
  font-size: 12px;
  color: var(--text-faint);
  margin-left: auto;
}

.comment-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 42px;
}

/* Comment actions (like, reply) */
.comment-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 42px;
  margin-top: 8px;
}

.comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.comment-action-btn:hover {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.comment-action-icon {
  flex-shrink: 0;
}

/* Like button */
.comment-like-btn.liked {
  color: var(--accent-red, #e74c3c);
}

.comment-like-btn.liked:hover {
  background: rgba(231, 76, 60, 0.08);
  color: var(--accent-red, #e74c3c);
}

.comment-like-count {
  font-size: 12px;
  font-weight: 600;
  min-width: 8px;
}

.comment-like-btn.like-pulse {
  animation: likePulse 0.4s ease;
}

@keyframes likePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Reply button */
.comment-reply-btn:hover {
  color: var(--gold);
  background: var(--gold-subtle);
}

/* Delete button */
.comment-delete-btn:hover {
  color: var(--accent-red, #e74c3c);
  background: rgba(231, 76, 60, 0.08);
}

.comment-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Reply comment style (nested) */
.comment-item.comment-reply {
  padding-left: 42px;
  border-left: 2px solid var(--gold-border);
  margin-left: 20px;
}

.comment-reply-label {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 6px;
  padding-left: 42px;
}

.comment-reply-label strong {
  color: var(--gold);
  font-weight: 600;
}

/* Reply form (inline) */
.comment-reply-form-wrapper {
  padding: 16px 0 16px 62px;
  border-bottom: 1px solid var(--border);
  animation: replyFormSlide 0.25s ease;
}

@keyframes replyFormSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-reply-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.comment-reply-form-header strong {
  color: var(--gold);
}

.comment-reply-form-close {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.comment-reply-form-close:hover {
  color: var(--text-primary);
}

.comment-reply-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  min-height: 80px;
}

.comment-reply-textarea::placeholder {
  color: var(--text-faint);
}

.comment-reply-textarea:focus {
  border-color: var(--gold-dim);
}

.comment-reply-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.comment-reply-form-footer .comment-char-count {
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.comment-reply-form-footer button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-reply-form-footer button:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
}

.comment-reply-form-footer button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment-reply-form-msg {
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  position: relative;
  z-index: 1;
}

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

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-dim);
  font-weight: 700;
}

.footer-brand span {
  font-weight: 400;
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.85em;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   NAV USER INDICATOR (Login Status)
═══════════════════════════════════════ */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 4px 12px 4px 4px;
  border-radius: 24px;
  border: 1px solid var(--gold-border);
  background: var(--gold-subtle);
  transition: all 0.25s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav-user:hover {
  border-color: var(--gold-dim);
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold-light);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-deep);
  overflow: hidden;
  flex-shrink: 0;
}

.nav-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.nav-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════ */
.profile-page {
  text-align: center;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.profile-photo-wrapper {
  position: relative;
  display: inline-block;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(212, 168, 83, 0.05));
  border: 2px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.profile-photo:hover {
  border-color: var(--gold);
}

.profile-photo-initial {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-deep);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.profile-photo-edit:hover {
  transform: scale(1.1);
  background: var(--gold-light);
}

.profile-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
}

.profile-username {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold-dim);
  letter-spacing: 0.5px;
}

.profile-form-container {
  max-width: 440px;
  margin: 0 auto;
  text-align: left;
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.profile-section-title::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin-top: 8px;
}

.profile-form-container textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
  min-height: 80px;
}

.profile-form-container textarea::placeholder {
  color: var(--text-faint);
}

.profile-form-container textarea:focus {
  border-color: var(--gold-dim);
}

.profile-bio-count {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-top: 4px;
}

.profile-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.profile-btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg-deep);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.profile-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.3);
  color: var(--bg-deep);
}

.profile-btn-danger {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-btn-danger:hover {
  background: rgba(192, 57, 43, 0.1);
  border-color: var(--accent-red);
}

.profile-photo-actions {
  text-align: center;
  margin-top: 24px;
}

/* ═══════════════════════════════════════
   THEME TOGGLE
═══════════════════════════════════════ */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: var(--bg-card);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(212, 168, 83, 0.15);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
  line-height: 1;
}

/* Dark theme: show sun icon (to switch to light) */
.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}
.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

/* Light theme: show moon icon (to switch to dark) */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}
[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Smooth theme transition on key elements */
body,
body::before,
.nav,
.nav-mobile,
.post-card,
.featured-card,
.newsletter-inner,
.article-newsletter-inner,
.about-social-link,
.article-nav-item,
.note-box,
.newsletter-form input,
.newsletter-form button,
.site-footer {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-image {
    min-height: 220px;
  }
  .featured-content {
    padding: 32px 24px;
  }
  .about-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
  }
  .about-avatar {
    margin: 0 auto;
  }
  .article-nav {
    grid-template-columns: 1fr;
  }
  .article-nav-item.next {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: block;
  }
  .nav-user .nav-user-name {
    display: none;
  }
  .nav-user {
    padding: 3px;
    border-radius: 50%;
  }
  .hero {
    padding: 120px 24px 60px;
  }
  .hero-stats {
    gap: 24px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .article-newsletter-inner {
    padding: 36px 20px;
  }
  .article-newsletter h3 {
    font-size: 1.2rem;
  }
  .article-nav {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    justify-content: center;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}

/* ===== Crop Modal ===== */
.crop-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: cropFadeIn 0.2s ease;
}

@keyframes cropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.crop-modal {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: cropSlideUp 0.25s ease;
}

@keyframes cropSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gold-border);
}

.crop-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.crop-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.crop-modal-close:hover {
  color: var(--accent-red);
}

.crop-modal-body {
  padding: 20px;
}

.crop-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-deep);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.crop-container:active {
  cursor: grabbing;
}

.crop-container img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.crop-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-deep);
  opacity: 0.6;
  mask-image: radial-gradient(circle 120px at center, transparent 119px, black 120px);
  -webkit-mask-image: radial-gradient(circle 120px at center, transparent 119px, black 120px);
}

.crop-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.3);
}

.crop-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 0 8px;
}

.crop-zoom-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.crop-zoom-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--gold-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.crop-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s;
}

.crop-zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.crop-zoom-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-card);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.crop-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--gold-border);
}

@media (max-width: 480px) {
  .crop-container {
    width: 240px;
    height: 240px;
  }
  .crop-overlay::before {
    mask-image: radial-gradient(circle 100px at center, transparent 99px, black 100px);
    -webkit-mask-image: radial-gradient(circle 100px at center, transparent 99px, black 100px);
  }
  .crop-circle {
    width: 200px;
    height: 200px;
  }
}
