/* ============================================================
   TawkirJournal — Base Design System
   Modern, performant, beautiful
   ============================================================ */

/* ——— CSS Variables / Tokens ——— */
:root {
  /* Brand */
  --accent: #f97316;
  --accent-dark: #ea580c;
  --accent-light: #fed7aa;
  --accent-glow: rgba(249, 115, 22, 0.2);

  /* Backgrounds */
  --bg: #fafafa;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-hover: #f8fafc;

  /* Text */
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Borders & Shadows */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
  --shadow-xl: 0 24px 48px rgba(0,0,0,0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --nav-height: 64px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration: 250ms;
  --duration-slow: 400ms;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Category Colors */
  --cat-tech: #3b82f6;
  --cat-programming: #8b5cf6;
  --cat-lifestyle: #ec4899;
  --cat-devops: #06b6d4;
  --cat-docker: #0ea5e9;
  --cat-default: #f97316;

  /* Aurora Palette */
  --aurora-1: #00f5ff;
  --aurora-2: #7c3aed;
  --aurora-3: #ff00ff;
  --aurora-4: #00ff88;
  --aurora-5: #f97316;
  --aurora-bg: #07070f;
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0d0d14;
  --bg-surface: #16161f;
  --bg-elevated: #1e1e2a;
  --bg-hover: #1a1a25;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #2a2a3a;
  --border-light: #1e1e2a;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 4px 12px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.2);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration) var(--ease),
              color var(--duration) var(--ease);
  min-height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ——— Scrollbar ——— */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ——— Container ——— */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ——— Reading progress bar ——— */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg-surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease),
              backdrop-filter var(--duration) var(--ease),
              background var(--duration) var(--ease);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(22, 22, 31, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease),
              background var(--duration-fast) var(--ease);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* Nav Right Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Search */
.nav-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: box-shadow var(--duration-fast);
}

.nav-search-form:focus-within {
  box-shadow: 0 0 0 3px var(--accent-glow);
  border-color: var(--accent);
}

.nav-search-form input {
  background: none;
  border: none;
  outline: none;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  font-family: inherit;
  width: 180px;
  transition: width var(--duration) var(--ease);
}

.nav-search-form input::placeholder {
  color: var(--text-muted);
}

.nav-search-form button {
  padding: 0.4rem 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--duration-fast);
}

.nav-search-form button:hover { color: var(--accent); }

/* Dark mode toggle */
.btn-theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: color var(--duration-fast), background var(--duration-fast);
}

.btn-theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* User Dropdown */
.nav-user {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast);
}

.nav-user-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.nav-user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
  animation: dropdownIn var(--duration) var(--ease);
}

.nav-user:hover .nav-user-dropdown,
.nav-user:focus-within .nav-user-dropdown {
  display: block;
}

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

.nav-dropdown-item {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.nav-dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.nav-dropdown-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

[data-theme="dark"] .nav-dropdown-item.danger:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #f87171;
}

/* Mobile Hamburger */
.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
  transform-origin: center;
}

.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.nav-mobile-overlay.open {
  display: block;
  opacity: 1;
}

/* Mobile Drawer */
.nav-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 90vw);
  height: 100vh;
  background: var(--bg-surface);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transition: right var(--duration-slow) var(--ease);
}

.nav-mobile-drawer.open {
  right: 0;
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.nav-drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.nav-drawer-close:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.nav-drawer-links {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: background var(--duration-fast), color var(--duration-fast);
}

.nav-drawer-link:hover,
.nav-drawer-link.active {
  background: var(--bg-elevated);
  color: var(--text);
}

.nav-drawer-link.active { color: var(--accent); }

.nav-drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-drawer-footer .nav-search-form {
  width: 100%;
}

.nav-drawer-footer .nav-search-form input {
  width: 100%;
}

/* ============================================================
   MESSAGES / ALERTS
   ============================================================ */

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

.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  animation: fadeInDown var(--duration-slow) var(--ease);
}

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

.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

[data-theme="dark"] .alert-success { background: rgba(22,163,74,0.1); color: #86efac; border-color: rgba(22,163,74,0.3); }
[data-theme="dark"] .alert-error, [data-theme="dark"] .alert-danger { background: rgba(220,38,38,0.1); color: #fca5a5; border-color: rgba(220,38,38,0.3); }
[data-theme="dark"] .alert-warning { background: rgba(245,158,11,0.1); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
[data-theme="dark"] .alert-info { background: rgba(59,130,246,0.1); color: #93c5fd; border-color: rgba(59,130,246,0.3); }

.alert-close {
  margin-left: auto;
  opacity: 0.6;
  transition: opacity var(--duration-fast);
}

.alert-close:hover { opacity: 1; }

/* ============================================================
   FOOTER — dark premium, works with white logo in both themes
   ============================================================ */

.footer {
  background: linear-gradient(160deg, #0f172a 0%, #1e1b2e 50%, #0f172a 100%);
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  margin-top: 5rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #fb923c, var(--accent), transparent);
  background-size: 200%;
  animation: footerGradientShift 5s ease-in-out infinite;
}

@keyframes footerGradientShift {
  0%, 100% { background-position: 0%; }
  50% { background-position: 100%; }
}

/* subtle glow orb */
.footer::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.footer-brand img { height: 34px; width: auto; }

.footer-brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(148,163,184,0.8);
  max-width: 380px;
  line-height: 1.65;
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
}

.footer-link {
  font-size: 0.85rem;
  color: rgba(148,163,184,0.7);
  text-decoration: none;
  transition: color var(--duration-fast);
  position: relative;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 0.625rem;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(148,163,184,0.7);
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}

.footer-social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(148,163,184,0.4);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */

#back-to-top {
  position: fixed;
  bottom: -80px;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: bottom var(--duration-slow) var(--ease-bounce),
              transform var(--duration-fast),
              background var(--duration-fast);
  z-index: 900;
}

#back-to-top.visible { bottom: 1.5rem; }

#back-to-top:hover {
  transform: translateY(-3px);
  background: var(--accent-dark);
  box-shadow: 0 12px 24px var(--accent-glow);
}

/* ============================================================
   ANIMATIONS (scroll-triggered)
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.fade-in.visible { opacity: 1; }

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.10s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.20s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.30s; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Category badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Tag badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-orange {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

[data-theme="dark"] .badge-orange {
  background: rgba(249,115,22,0.15);
  color: #fb923c;
  border-color: rgba(249,115,22,0.3);
}

/* Btn styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--duration-fast) var(--ease);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

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

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================================
   COOKIE CONSENT
   ============================================================ */

#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.08);
  z-index: 9999;
  display: none;
  animation: slideUpBanner 0.4s var(--ease);
}

@keyframes slideUpBanner {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-search-form { display: none; }
  .btn-theme-toggle { display: none; }
  .nav-user { display: none; }
  .nav-burger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-brand { justify-content: center; }
  .footer-tagline { margin: 0 auto; }
  .footer-links-row { justify-content: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
  :root { --nav-height: 56px; }
  .container { padding: 0 1rem; }
}

/* ============================================================
   AURORA BANNER COMPONENT
   ============================================================ */

@property --aurora-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes aurora-spin {
  to { --aurora-angle: 360deg; }
}

@keyframes aurora-drift {
  0%, 100% { background-position: 0% 50%, 100% 0%, 50% 100%; }
  33%       { background-position: 100% 50%, 0% 100%, 0% 0%; }
  66%       { background-position: 50% 0%, 50% 50%, 100% 50%; }
}

@keyframes aurora-text-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

@keyframes banner-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Outer spinning conic-gradient border */
.page-banner-wrap {
  position: relative;
  padding: 4px;
  border-radius: 22px;
  background: conic-gradient(
    from var(--aurora-angle),
    #ff00ff 0%,
    #7c3aed 14%,
    #00f5ff 28%,
    #00ff88 42%,
    #f97316 56%,
    #ff00ff 70%,
    #7c3aed 84%,
    #00f5ff 100%
  );
  animation: aurora-spin 5s linear infinite;
  margin: 2rem 0;
  isolation: isolate;
}

/* Blurred outer glow — makes the aurora "circulate all around" visibly */
.page-banner-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 32px;
  background: conic-gradient(
    from var(--aurora-angle),
    #ff00ff 0%,
    #7c3aed 14%,
    #00f5ff 28%,
    #00ff88 42%,
    #f97316 56%,
    #ff00ff 70%,
    #7c3aed 84%,
    #00f5ff 100%
  );
  animation: aurora-spin 5s linear infinite;
  filter: blur(18px);
  opacity: 0.5;
  z-index: -1;
}

/* Inner banner */
.page-banner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 4rem 2.5rem 3.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(0, 245, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(124, 58, 237, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(0, 255, 136, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 40% 10%, rgba(255, 0, 255, 0.12) 0%, transparent 45%),
    linear-gradient(145deg, #07070f 0%, #0d0920 40%, #080c1a 70%, #0a0707 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: aurora-drift 12s ease-in-out infinite;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.12) 0%, transparent 70%);
  animation: banner-float 8s ease-in-out infinite;
  pointer-events: none;
}

.page-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -40px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  animation: banner-float 10s ease-in-out infinite reverse;
  pointer-events: none;
}

.banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

.banner-eyebrow a { color: inherit; }

.banner-eyebrow::before,
.banner-eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.banner-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #00f5ff 25%, #ffffff 50%, #ff00ff 75%, #00ff88 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: aurora-text-shimmer 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
}

.banner-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.6);
  max-width: 560px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

.banner-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 2;
}

.banner-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.banner-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s;
  position: relative;
  z-index: 2;
}

.banner-cat-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

/* ============================================================
   COMMENTS — compact stylish design
   ============================================================ */

.comment-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.comment-card:hover {
  border-color: rgba(0, 245, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.07), var(--shadow-sm);
}

[data-theme="dark"] .comment-card { background: var(--bg-elevated); }

.comment-card.reply-card {
  margin-left: 2.5rem;
  border-left: 2px solid var(--accent);
  background: var(--bg-hover);
}

[data-theme="dark"] .comment-card.reply-card {
  border-left-color: #00f5ff;
  background: rgba(0, 245, 255, 0.03);
}

.comment-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #00f5ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}

.comment-body { min-width: 0; }

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.comment-author { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.comment-time   { font-size: 0.73rem; color: var(--text-muted); }

.comment-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  word-break: break-word;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.comment-action-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comment-action-btn:hover { color: var(--accent); }
.comment-action-btn.delete-btn:hover { color: #ef4444; }

.comment-form-wrap {
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
}

[data-theme="dark"] .comment-form-wrap { background: var(--bg-elevated); }

.comment-form-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   EXTRA ANIMATIONS
   ============================================================ */

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.slide-in-left  { animation: slide-in-left  0.5s var(--ease) both; }
.slide-in-right { animation: slide-in-right 0.5s var(--ease) both; }
.scale-in       { animation: scale-in       0.4s var(--ease) both; }
