/* ==========================================================================
   THE EDITORIAL — Modern Glassmorphism & Dark Design System
   ========================================================================== */

/* Design Tokens */
:root {
  /* Warm Cream & Editorial Chic Theme Palette */
  --bg: #FAF5EF;
  /* Warm cream off-white background */
  --bg-gradient: linear-gradient(180deg, #FAF5EF 0%, #F3EDE4 100%);
  --surface: rgba(245, 238, 230, 0.85);
  --surface-hover: rgba(238, 230, 220, 0.95);
  --surface-solid: #F3EDE4;

  /* Text / Ink values */
  --ink: #1C1B1A;
  /* Deep charcoal / soft warm black */
  --ink-muted: #635D56;
  /* Warm earthy taupe */
  --border: #E2D8CC;
  /* Soft warm structural border */
  --border-hover: #1C1B1A;
  /* High contrast chic focus border */
  --code-bg: #EFE8DF;

  /* Modern Web Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Core Accents & Gradients */
  --accent: #1C1B1A;
  /* Chic Dark Charcoal Accent */
  --accent-glow: rgba(28, 27, 26, 0.08);
  --gradient-primary: linear-gradient(135deg, #2B2927 0%, #1C1B1A 100%);
  --gradient-text: linear-gradient(135deg, #1C1B1A 0%, #3D3833 100%);
  --gradient-placeholder: linear-gradient(135deg, #EFE8DF 0%, #E0D7C9 100%);

  /* Sizes & Transitions */
  --width-article: 760px;
  --width-container: 1200px;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-premium: 0 10px 30px -5px rgba(28, 27, 26, 0.07), 0 4px 12px -3px rgba(28, 27, 26, 0.04);
  --shadow-glow: 0 0 20px rgba(28, 27, 26, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

body {
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.02em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.font-mono {
  font-family: var(--font-mono) !important;
}

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

/* Containers */
.content-wrapper,
.home-wrapper,
.list-wrapper,
.author-profile-wrapper,
.about-wrapper,
.auth-form-wrapper,
.dashboard-wrapper {
  max-width: var(--width-container);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex-grow: 1;
}

.article-detail-wrapper {
  max-width: var(--width-article);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex-grow: 1;
}

/* Header & Navigation (Glassmorphism) */
.site-header {
  border-bottom: 1px solid var(--border);
  background-color: rgba(250, 245, 239, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.header-inner {
  max-width: var(--width-container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.8px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.site-logo:hover {
  opacity: 0.9;
}

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  color: var(--ink-muted);
  position: relative;
  padding: 0.25rem 0;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Categories Dropdown Container */
.nav-dropdown-wrapper {
  position: relative;
}

.site-nav .nav-dropdown-menu {
  display: none;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--surface-solid);
  border: 1px solid var(--border);
  min-width: 180px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-premium);
  padding: 0.75rem 0;
  z-index: 1000;
  list-style: none;
  gap: 0;
}

/* Invisible bridge to prevent losing hover state when moving mouse to menu */
.site-nav .nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 15px;
  background: transparent;
}

.site-nav .nav-dropdown-menu li {
  margin: 0;
  display: block;
}

.site-nav .nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-muted);
  transition: var(--transition);
  text-align: left;
  border-radius: 0;
}

.site-nav .nav-dropdown-menu a::after {
  display: none !important;
  /* No underline active indicators inside the dropdown */
}

.site-nav .nav-dropdown-menu a:hover,
.site-nav .nav-dropdown-menu a.active {
  color: var(--ink);
  background-color: var(--surface-hover);
}

/* Hover behaviors for desktop */
@media (min-width: 769px) {
  .site-nav .nav-dropdown-wrapper:hover .nav-dropdown-menu {
    display: flex;
    animation: fadeInDropdown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Arrow indicator styles */
.nav-dropdown-trigger .arrow {
  font-size: 0.7rem;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

@media (min-width: 769px) {
  .nav-dropdown-wrapper:hover .nav-dropdown-trigger .arrow {
    transform: rotate(180deg);
  }
}

.nav-divider {
  width: 1px;
  height: 14px;
  background-color: var(--border);
}

.nav-auth-btn {
  background: #1C1B1A;
  color: #FAF5EF !important;
  padding: 0.45rem 1.1rem;
  border-radius: 30px;
  font-weight: 700 !important;
  box-shadow: 0 4px 15px rgba(28, 27, 26, 0.15);
  transition: var(--transition) !important;
}

.nav-auth-btn:hover {
  transform: translateY(-2px);
  background-color: #33312E;
  box-shadow: 0 6px 20px rgba(28, 27, 26, 0.25);
}

.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  color: var(--ink-muted);
  padding: 0.25rem 0;
  transition: var(--transition);
  outline: none;
}

.nav-logout-btn:hover {
  color: #F87171;
}


.rss-link {
  color: #EC4899 !important;
}

/* Nav Burger Button (Mobile 3 Horizontal Lines) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.active .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .burger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: rgba(250, 245, 239, 0.88);
  backdrop-filter: blur(10px);
  margin-top: auto;
  padding: 4rem 1.5rem 3rem;
}

.footer-inner {
  max-width: var(--width-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  row-gap: 3rem;
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.75rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--ink-muted);
  font-size: 0.95rem;
  max-width: 380px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.footer-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

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

.footer-copy {
  grid-column: span 2;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Reading Progress Bar */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  z-index: 101;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.1s ease-out;
}

/* Featured Articles Carousel / Slider */
.featured-carousel-wrapper {
  position: relative;
  margin-bottom: 2.5rem;
}

.featured-slides-container {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.featured-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.featured-slide.active {
  display: block;
  opacity: 1;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--surface-solid);
  color: var(--ink);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-premium);
  transition: var(--transition);
}

.carousel-nav-btn:hover {
  background-color: var(--border-hover);
  color: #FAF5EF;
  transform: translateY(-50%) scale(1.08);
}

.carousel-nav-btn.prev-btn {
  left: -18px;
}

.carousel-nav-btn.next-btn {
  right: -18px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active,
.carousel-dot:hover {
  background-color: var(--ink);
  width: 24px;
  border-radius: 10px;
}

/* Hero Section (Homepage Glassmorphism Grid) */
.hero-block {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: stretch;
  margin-bottom: 0;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  transition: var(--transition);
}

.hero-block:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-premium);
}

.hero-cover-link {
  display: block;
  height: 100%;
}

.hero-cover-container {
  height: 280px;
  overflow: hidden;
  background-color: var(--code-bg);
  position: relative;
}

.hero-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-block:hover .hero-cover {
  transform: scale(1.05);
}

.hero-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-placeholder);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  text-shadow: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-badge {
  background: var(--gradient-primary);
  color: #FAF5EF;
  padding: 0.2rem 0.65rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.7rem;
}

.hero-category,
.card-category,
.detail-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  letter-spacing: 0.5px;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  transition: var(--transition);
}

/* Specific Dark Category Badge Colors */
[data-category="true-crime"] {
  background-color: #F9EBEA !important;
  color: #8B1E1E !important;
  border-color: #E5C4C0 !important;
}

[data-category="cold-cases"] {
  background-color: #EAF2F8 !important;
  color: #1A5276 !important;
  border-color: #C4D9E8 !important;
}

[data-category="investigations"] {
  background-color: #FAF0E6 !important;
  color: #8C4F1A !important;
  border-color: #EAD3BE !important;
}

[data-category="cybercrime"] {
  background-color: #EBF5F0 !important;
  color: #1C6847 !important;
  border-color: #C6E7D8 !important;
}

[data-category="forensics"] {
  background-color: #F4EBF8 !important;
  color: #5B2C6F !important;
  border-color: #DEC4E8 !important;
}

[data-category="unsolved"] {
  background-color: #FCF8E3 !important;
  color: #7D6608 !important;
  border-color: #EFE3AD !important;
}

[data-category="historical"] {
  background-color: #F5EFE8 !important;
  color: #63493A !important;
  border-color: #DDD0C2 !important;
}

.hero-dot {
  color: var(--border-hover);
}

.hero-title {
  font-size: 1.85rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-title a {
  background: inherit;
  -webkit-background-clip: inherit;
  -webkit-text-fill-color: inherit;
}

.hero-excerpt {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.hero-author-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: auto;
}

.hero-author-avatar,
.card-author-avatar,
.detail-author-avatar,
.bio-avatar,
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-hover);
}

.hero-author-avatar-placeholder,
.card-author-avatar-placeholder,
.detail-author-avatar-placeholder,
.bio-avatar-placeholder,
.profile-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--code-bg);
  border: 2px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.hero-author-info {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  line-height: 1.4;
}

.hero-author-name,
.card-author-name,
.detail-author-name,
.bio-name {
  font-weight: 600;
  color: var(--ink);
}

.hero-date,
.card-date,
.detail-meta-text {
  color: var(--ink-muted);
}

.section-divider {
  margin: 3.5rem 0;
  border-top: 1px solid var(--border);
}

/* Article Card Grid */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background-color: var(--border);
  margin-left: 1rem;
}

.article-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.article-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.75rem;
  align-items: start;
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding-bottom: 1.75rem;
  box-shadow: none;
  transition: var(--transition);
}

.article-card:hover {
  transform: none;
  box-shadow: none;
}

.card-cover-link {
  display: block;
  width: 100%;
}

.card-cover-container {
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover .card-cover {
  transform: scale(1.05);
}

.card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-placeholder);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  text-shadow: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-top: 0.75rem;
}

/* Card Category - styled via general badge rule */

.card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.card-title a:hover {
  color: var(--ink-muted);
  opacity: 1;
}

.card-excerpt {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-author-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-author-avatar,
.card-author-avatar-placeholder {
  width: 36px;
  height: 36px;
}

.card-author-avatar-placeholder {
  font-size: 0.95rem;
}

.card-author-info {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Article Detail Page */
.detail-cover-container {
  width: 100%;
  margin-bottom: 3.5rem;
  aspect-ratio: 21/9;
  border-radius: 16px;
  background-color: var(--code-bg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-premium);
}

.detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.detail-category-wrap {
  margin-bottom: 1.25rem;
}

.detail-category {
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
}

.detail-title {
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.8px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.detail-subtitle {
  font-size: 1.35rem;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 90%;
  margin: 0 auto 2.5rem;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.detail-author-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.detail-author-avatar {
  width: 48px;
  height: 48px;
}

.detail-meta-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.draft-badge {
  background-color: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  padding: 0.15rem 0.5rem;
  border-radius: 30px;
}

.detail-share-box {
  display: flex;
  gap: 0.75rem;
}

.share-btn {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  border-color: var(--border-hover);
  background-color: var(--surface-hover);
}

.copy-link-btn.copied {
  background-color: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.detail-divider {
  margin: 3rem 0;
  border-top: 1px solid var(--border);
}

/* Article Body Content Rendering Styles */
.detail-body-content {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--ink);
}

.detail-body-content img {
  display: block;
  margin: 2.5rem auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-premium);
}

.detail-body-content p {
  margin-bottom: 1.75rem;
}

.detail-body-content h2 {
  font-size: 2.1rem;
  margin: 3.5rem 0 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.detail-body-content h3 {
  font-size: 1.6rem;
  margin: 2.75rem 0 1rem;
}

.detail-body-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 1.5rem;
  margin: 2.5rem 0;
  background-color: rgba(108, 93, 242, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--ink-muted);
  font-style: italic;
}

.detail-body-content blockquote.pull-quote {
  border-left: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.5;
  font-weight: 500;
  text-align: center;
  max-width: 90%;
  margin: 3rem auto;
  color: var(--ink);
  background-color: transparent;
}

.detail-body-content pre {
  background-color: var(--code-bg);
  padding: 1.25rem 1.75rem;
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 2.5rem 0;
  border: 1px solid var(--border);
}

.detail-body-content code {
  font-family: var(--font-mono);
  background-color: var(--code-bg);
  padding: 0.2rem 0.5rem;
  font-size: 0.85em;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: #D63384;
}

.detail-body-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
  border: none;
  color: inherit;
}

.detail-body-content figure {
  margin: 3rem 0;
  text-align: center;
}

.detail-body-content figure img {
  max-width: 100%;
  border-radius: 12px;
  height: auto;
  border: 1px solid var(--border);
}

.detail-body-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
  text-transform: uppercase;
}

.detail-body-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: var(--transition);
}

.detail-body-content a:hover {
  color: var(--ink);
  border-bottom-style: solid;
}

.detail-body-content ul,
.detail-body-content ol {
  margin: 0 0 2rem 2rem;
}

.detail-body-content li {
  margin-bottom: 0.75rem;
}

/* Author Bio Card Partial */
.author-bio-card {
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin: 4.5rem 0;
}

.bio-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.bio-avatar-container {
  flex-shrink: 0;
}

.bio-avatar {
  width: 76px;
  height: 76px;
}

.bio-avatar-placeholder {
  width: 76px;
  height: 76px;
  font-size: 2rem;
}

.bio-info {
  display: flex;
  flex-direction: column;
}

.bio-name {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.bio-name a:hover {
  color: var(--accent);
}

.bio-text {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.bio-socials {
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.bio-social-link {
  color: var(--accent);
  font-weight: 600;
}

.bio-social-link.more-posts {
  color: var(--ink);
  margin-left: auto;
}

/* Related Articles Grid */
.article-footer-grids {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

.footer-grid-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
}

.compact-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.compact-card {
  display: flex;
  flex-direction: column;
}

.compact-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.compact-title {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0.35rem 0;
  font-weight: 600;
}

.compact-title a:hover {
  color: var(--accent);
}

.compact-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Article Listing Page */
.list-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.list-page-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.list-count-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.filters-container {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 2.5rem;
  align-items: center;
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 3.5rem;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-input {
  width: 100%;
  padding: 0.65rem 2.25rem 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background-color: var(--surface-solid);
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 10px rgba(225, 29, 46, 0.2);
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-size: 1.3rem;
  line-height: 1;
  transition: var(--transition);
}

.search-clear:hover {
  color: var(--ink);
}

.search-btn {
  background: var(--gradient-primary);
  color: #FAF5EF;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: var(--transition);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(28, 27, 26, 0.2);
}

/* Category pills */
.category-pills-wrapper {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.category-pills {
  display: flex;
  gap: 0.6rem;
}

.pill-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 30px;
  background-color: var(--surface-solid);
  text-transform: uppercase;
  transition: var(--transition);
}

.pill-link:hover,
.pill-link.active-pill {
  background: var(--gradient-primary);
  color: #FAF5EF;
  border-color: transparent;
  opacity: 1;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Specific Pill Active/Hover Magazine Theme Colors */
.pill-link[data-category="true-crime"]:hover,
.pill-link[data-category="true-crime"].active-pill {
  background-color: #8B1E1E !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #8B1E1E !important;
  box-shadow: 0 4px 12px rgba(139, 30, 30, 0.18) !important;
}

.pill-link[data-category="cold-cases"]:hover,
.pill-link[data-category="cold-cases"].active-pill {
  background-color: #1A5276 !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #1A5276 !important;
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.18) !important;
}

.pill-link[data-category="investigations"]:hover,
.pill-link[data-category="investigations"].active-pill {
  background-color: #8C4F1A !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #8C4F1A !important;
  box-shadow: 0 4px 12px rgba(140, 79, 26, 0.18) !important;
}

.pill-link[data-category="cybercrime"]:hover,
.pill-link[data-category="cybercrime"].active-pill {
  background-color: #1C6847 !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #1C6847 !important;
  box-shadow: 0 4px 12px rgba(28, 104, 71, 0.18) !important;
}

.pill-link[data-category="forensics"]:hover,
.pill-link[data-category="forensics"].active-pill {
  background-color: #5B2C6F !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #5B2C6F !important;
  box-shadow: 0 4px 12px rgba(91, 44, 111, 0.18) !important;
}

.pill-link[data-category="unsolved"]:hover,
.pill-link[data-category="unsolved"].active-pill {
  background-color: #7D6608 !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #7D6608 !important;
  box-shadow: 0 4px 12px rgba(125, 102, 8, 0.18) !important;
}

.pill-link[data-category="historical"]:hover,
.pill-link[data-category="historical"].active-pill {
  background-color: #63493A !important;
  background-image: none !important;
  color: #FAF5EF !important;
  border-color: #63493A !important;
  box-shadow: 0 4px 12px rgba(99, 73, 58, 0.18) !important;
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  background-color: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
}

.empty-state p {
  color: var(--ink-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.btn-clear-filters {
  background: var(--gradient-primary);
  color: #FAF5EF;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Pagination */
.pagination-wrapper {
  margin-top: 4.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.pagination-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  background-color: var(--surface);
}

.page-link:hover {
  border-color: var(--border-hover);
  background-color: var(--surface-hover);
}

.disabled-link {
  color: rgba(28, 27, 26, 0.3);
  border-color: var(--border);
  pointer-events: none;
  background-color: transparent;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.page-num:hover {
  background-color: var(--surface-hover);
}

.page-num.active-num {
  background: var(--gradient-primary);
  color: #FAF5EF;
  font-weight: 700;
}

.page-dots {
  color: var(--ink-muted);
}

/* About Page */
.about-header {
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.about-subtitle-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.about-title {
  font-size: 3.5rem;
  margin-top: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-content {
  max-width: 780px;
  font-size: 1.15rem;
  line-height: 1.85;
  margin-left: auto;
  margin-right: auto;
}

.lead-text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.about-heading {
  font-size: 1.8rem;
  margin: 3.5rem 0 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-list {
  margin: 2rem 0 2rem 2.5rem;
}

.about-list li {
  margin-bottom: 1.25rem;
}

.about-action-row {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-action-btn {
  background: #FECACA;
  color: #9F1239 !important;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(225, 29, 46, 0.2);
}

.about-action-btn:hover {
  transform: translateY(-2px);
  background-color: #FCA5A5;
  box-shadow: 0 6px 20px rgba(225, 29, 46, 0.45);
}

.about-action-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--accent);
}

/* Profile / Author details */
.profile-header {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 4rem 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
}

.profile-header-inner {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.profile-avatar-container.large-avatar {
  flex-shrink: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border: 3px solid var(--border-hover);
}

.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--code-bg);
  border: 3px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
}

.profile-bio-info {
  display: flex;
  flex-direction: column;
}

.profile-meta-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1.5px;
}

.profile-name {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-bio-text {
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  max-width: 680px;
}

.profile-socials {
  display: flex;
  gap: 1.25rem;
}

.profile-social-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.03);
}

.profile-social-link:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-hover);
}

/* Authentication Forms (Login / Register Card) */
.auth-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.auth-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  padding: 3.5rem;
  width: 100%;
  max-width: 500px;
}

.register-card {
  max-width: 720px;
}

.auth-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.auth-title {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* Alert Boxes */
.alert-box {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #A7F3D0;
}

/* Form Styling */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.span-2 {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.required {
  color: #EC4899;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: var(--surface-solid);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--border-hover);
  box-shadow: 0 0 12px rgba(225, 29, 46, 0.25);
  background-color: var(--surface);
}

/* ── Password Field with Eye Toggle ────────────────────────────────────────── */
.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field-wrapper .form-input {
  /* Make room for the eye button on the right */
  padding-right: 3rem;
}

.password-toggle-btn {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  line-height: 0;
  flex-shrink: 0;
}

.password-toggle-btn:hover {
  color: var(--ink);
  background-color: rgba(28, 27, 26, 0.06);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-toggle-btn.is-showing {
  color: var(--accent);
}

.eye-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: opacity 0.15s ease;
}


.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  height: 46px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23635d56'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

.form-select option {
  background-color: var(--surface-solid);
  color: var(--ink);
}

.disabled-input {
  background-color: rgba(28, 27, 26, 0.05);
  color: rgba(28, 27, 26, 0.4);
  cursor: not-allowed;
}

.input-tip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* File Input Wrapper */
.file-upload-wrapper {
  position: relative;
}

.file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.file-upload-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-muted);
  background-color: var(--surface);
  text-align: center;
  justify-content: center;
  transition: var(--transition);
}

.file-upload-label:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--ink);
}

.form-actions {
  margin-top: 2rem;
}

.auth-submit-btn {
  background-color: #FECACA;
  color: #9F1239;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  padding: 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 15px rgba(225, 29, 46, 0.2);
  transition: var(--transition);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  background-color: #FCA5A5;
  box-shadow: 0 6px 20px rgba(225, 29, 46, 0.45);
}

.auth-card-footer {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.auth-footer-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-link:hover {
  text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.dash-pretitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.dash-title {
  font-size: 2.8rem;
  margin-top: 0.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: #1C1B1A;
  color: #FAF5EF;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(28, 27, 26, 0.15);
}

.btn-primary:hover {
  background-color: #33312E;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(28, 27, 26, 0.25);
  opacity: 1;
}

.btn-secondary {
  background-color: #EFE8DF;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: #E4DCCF;
  border-color: var(--border-hover);
  opacity: 1;
}

/* Stats Cards Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.stat-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-premium);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dashboard Tables */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dash-section-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.dash-section-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--accent);
}

.dash-table-wrapper {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.dash-table th {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1.25rem 1.5rem;
}

.dash-table td {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.table-article-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.table-edit-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.table-article-slug {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: block;
  margin-top: 0.25rem;
}

.table-category-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  display: inline-block;
}

.status-published {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-draft {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.inline-featured-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #F472B6;
  font-weight: 700;
  text-transform: uppercase;
}

.date-published,
.date-created {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.actions-column {
  width: 260px;
}

.table-actions-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.inline-action-form {
  display: inline-block;
}

.action-btn-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0;
  transition: var(--transition);
}

.edit-btn {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.edit-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.toggle-btn {
  color: #EC4899;
  border-bottom: 2px solid rgba(236, 72, 153, 0.3);
}

.toggle-btn:hover {
  border-color: #EC4899;
}

.delete-btn {
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
}

.delete-btn:hover {
  color: #EF4444;
  border-color: #EF4444;
}

.dash-empty-state {
  text-align: center;
  padding: 6rem 2rem;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background-color: var(--surface);
}

.dash-empty-state p {
  color: var(--ink-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Profile Settings Page layout */
.profile-settings-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 3rem;
}

.settings-section {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
}

.settings-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.profile-avatar.large-avatar,
.profile-avatar-placeholder.large-placeholder {
  width: 90px;
  height: 90px;
}

.avatar-upload-control {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.avatar-tip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* CSS Shimmer Loading Skeleton */
.skeleton-box {
  display: inline-block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--border) 25%, rgba(255, 255, 255, 0.15) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header-inner {
    position: relative;
    padding: 0.9rem 1.25rem;
  }

  .nav-toggle {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none !important;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.25rem 2rem;
    box-shadow: 0 10px 30px rgba(28, 27, 26, 0.12);
    z-index: 999;
  }

  .site-nav.open {
    display: block !important;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  /* Responsive/Mobile Categories Dropdown layout */
  .site-nav .nav-dropdown-menu {
    display: flex !important;
    /* Always render inline inside the drawer */
    flex-direction: column;
    position: static;
    transform: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0.4rem 0 0 1rem;
    /* Indent subcategories for clean nested list view */
    margin: 0;
    min-width: 0;
    z-index: 1;
    gap: 0.35rem;
  }

  .site-nav .nav-dropdown-menu::before {
    display: none;
  }

  .site-nav .nav-dropdown-menu li {
    margin-bottom: 0;
  }

  .site-nav .nav-dropdown-menu a {
    padding: 0.25rem 0;
    font-size: 0.9rem;
    font-family: var(--font-display);
    color: var(--ink-muted);
  }

  .site-nav .nav-dropdown-menu a:hover,
  .site-nav .nav-dropdown-menu a.active {
    color: var(--ink);
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
  }

  .site-logo {
    font-size: 1.4rem;
    flex-shrink: 0;
  }

  .hero-block {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-cover-container {
    height: 90px;
    min-height: 90px;
    max-height: 90px;
  }

  .hero-details {
    padding: 0.75rem 1rem;
  }

  .hero-meta {
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    gap: 0.4rem;
  }

  .hero-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
  }

  .hero-title {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
  }

  .hero-excerpt {
    display: none;
    /* Hide excerpt on mobile for extra vertical space */
  }

  .hero-author-avatar,
  .hero-author-avatar-placeholder {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
  }

  .carousel-dots {
    margin-top: 0.5rem;
  }

  .article-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .filters-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .profile-settings-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-footer-grids {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-links ul {
    align-items: flex-start;
  }

  .dash-stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .detail-cover-container {
    aspect-ratio: 16/9;
  }

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

  .profile-socials {
    justify-content: center;
  }

  /* Responsive Dashboard Articles & Categories */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .dash-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .dash-actions .dash-btn {
    width: 100%;
    text-align: center;
  }

  .dash-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-table th,
  .dash-table td {
    padding: 1rem;
    white-space: nowrap;
  }

  .dash-table td:first-child {
    white-space: normal;
    min-width: 250px;
  }
}

/* ==========================================================================
   Comments & Role Badges Styling
   ========================================================================== */

.comments-section {
  margin: 4rem 0;
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.20rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-count {
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.comment-item {
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-premium);
  transition: var(--transition);
}

.comment-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-premium);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.comment-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-hover);
}

.comment-author-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--code-bg);
  border: 2px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.comment-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.comment-author-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-admin-badge {
  background-color: rgba(225, 29, 46, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(225, 29, 46, 0.3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.comment-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.comment-body {
  font-size: 1rem;
  line-height: 1.7;
  color: #CBD5E1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Comment Form */
.comment-form-wrapper {
  background-color: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-top: 3rem;
  box-shadow: var(--shadow-premium);
}

.comment-form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.comment-textarea {
  width: 100%;
  min-height: 130px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface-solid);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  resize: vertical;
  margin-bottom: 1.25rem;
  outline: none;
  transition: var(--transition);
}

.comment-name-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--surface-solid);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 1rem;
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.comment-name-input:focus {
  border-color: var(--border-hover);
  background-color: var(--surface);
  box-shadow: 0 0 12px rgba(225, 29, 46, 0.2);
}

.comment-textarea:focus {
  border-color: var(--border-hover);
  background-color: var(--surface);
  box-shadow: 0 0 12px rgba(225, 29, 46, 0.2);
}

.comment-submit-btn {
  background-color: #FECACA;
  color: #9F1239;
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 46, 0.2);
  transition: var(--transition);
}

.comment-submit-btn:hover {
  transform: translateY(-1px);
  background-color: #FCA5A5;
  box-shadow: 0 6px 16px rgba(225, 29, 46, 0.45);
}

.comment-login-prompt {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-muted);
}

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

.comments-empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--ink-muted);
  font-size: 1rem;
  background-color: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  margin-bottom: 2.5rem;
}

/* User Role Indicator Badges */
.role-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.role-badge-admin {
  background-color: rgba(225, 29, 46, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(225, 29, 46, 0.3);
}

.role-badge-reader {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.alert-comment-error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Custom Premium Dialogs (Alert & Confirm Glassmorphism Overlay)
   ========================================================================== */
.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(9, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.custom-dialog-overlay.show {
  opacity: 1;
}

.custom-dialog-box {
  background: var(--surface-solid);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-premium);
  border-radius: 16px;
  width: 90%;
  max-width: 460px;
  padding: 2.5rem;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.custom-dialog-overlay.show .custom-dialog-box {
  transform: translateY(0);
}

.custom-dialog-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.2;
}

.custom-dialog-message {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 2.25rem;
}

.custom-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.custom-dialog-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.65rem 1.35rem;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: var(--transition);
  outline: none;
}

.custom-dialog-btn-primary {
  background: #FECACA;
  color: #9F1239;
  border: none;
  box-shadow: 0 4px 12px rgba(225, 29, 46, 0.2);
}

.custom-dialog-btn-primary:hover {
  transform: translateY(-1px);
  background-color: #FCA5A5;
  box-shadow: 0 6px 16px rgba(225, 29, 46, 0.45);
}

.custom-dialog-btn-secondary {
  background-color: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.custom-dialog-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-color: var(--ink-muted);
}

/* Login Page Loading State & Spinner */
.auth-submit-btn.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.auth-submit-btn.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: calc(50% - 10px);
  left: calc(50% - 10px);
  border: 2px solid rgba(159, 18, 57, 0.2);
  border-radius: 50%;
  border-top-color: #9F1239;
  animation: authSpin 0.8s linear infinite;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments for mobile and small screens */
@media (max-width: 768px) {

  .content-wrapper,
  .home-wrapper,
  .list-wrapper,
  .author-profile-wrapper,
  .about-wrapper,
  .auth-form-wrapper,
  .dashboard-wrapper,
  .article-detail-wrapper {
    padding: 1.5rem 1rem;
  }

  .list-page-title {
    font-size: 1.75rem;
  }

  .filters-container {
    padding: 1rem;
    gap: 1rem;
  }

  .category-pills-wrapper::-webkit-scrollbar {
    display: none;
  }

  .category-pills-wrapper {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
}

@media (max-width: 600px) {
  .article-card {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
  }

  .card-cover-container {
    aspect-ratio: 16/9;
  }

  .pagination-inner {
    gap: 0.5rem;
  }

  .page-numbers {
    display: none;
  }

  .page-link {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
  }
}