/* ============================================================
   VARIABILI DESIGN SYSTEM — EVERFOREST / ADWAITA DARK FUSION
   ============================================================ */
:root {
  /* Superfici — warm dark, ispirate a Everforest Dark */
  --bg-base:      #1e2122;   /* sfondo principale */
  --bg-surface:   #252b2c;   /* card, widget */
  --bg-elevated:  #2d3435;   /* hover, dropdown */
  --bg-border:    #3a4244;   /* bordi sottili */
  --bg-subtle:    #313a3b;   /* divisori */

  /* Testo */
  --text-primary:   #d3c6aa; /* bianco sporco caldo */
  --text-secondary: #9da9a0; /* grigio verde medio */
  --text-muted:     #5c6a72; /* placeholder, note */

  /* Accent — Lavender luminoso */
  --accent:         #c3a6ff; /* lavanda principale */
  --accent-dim:     #9d7fd4; /* lavanda scurita */
  --accent-glow:    rgba(195, 166, 255, 0.15);
  --accent-border:  rgba(195, 166, 255, 0.35);

  /* Colori categoria */
  --tag-linux:   #83c092; /* verde acqua */
  --tag-dev:     #7fbbb3; /* ciano freddo */
  --tag-hw:      #e69875; /* arancio ambra */
  --tag-smanet:  #d699b6; /* rosa lilla */
  --tag-info:    #a7c080; /* verde salvia */

  /* Tipografia */
  --font-sans:  'Geist', 'SF Pro Display', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Cascadia Code', monospace;

  /* Border radius — coerente come Adwaita */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;

  /* Transizioni */
  --t-fast:   150ms ease;
  --t-normal: 250ms cubic-bezier(.4,0,.2,1);
  --t-spring: 350ms cubic-bezier(.34,1.56,.64,1);

  /* Shadow */
  --shadow-card: 0 2px 8px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  --shadow-hover: 0 8px 24px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Texture leggera di sfondo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(131,192,146,.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 90%, rgba(195,166,255,.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #d6beff; }

img { display: block; max-width: 100%; }

/* Scrollbar personalizzata */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 33, 34, .85);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--bg-border);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #1e2122;
  letter-spacing: -.5px;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: box-shadow var(--t-normal), transform var(--t-spring);
}

.logo:hover .logo-icon {
  box-shadow: 0 0 20px rgba(195,166,255,.4);
  transform: rotate(-4deg) scale(1.05);
}

.logo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.4px;
}

.logo-name span {
  color: var(--accent);
}

/* Nav links */
nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Search bar */
.search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-wrap i[data-lucide] {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 7px 14px 7px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  width: 200px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), width var(--t-normal);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-glow);
  width: 240px;
}

/* Hamburger — mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}

.menu-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Auth section — Login/Logout */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--bg-border);
}

.nav-user {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-login,
.nav-register {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-login:hover,
.nav-register:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-register {
  background: var(--accent-glow);
  color: var(--accent);
}

.nav-register:hover {
  background: rgba(195, 166, 255, 0.25);
  color: #d6beff;
}

.nav-logout {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-logout:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

/* Griglia di sfondo stile "terminal grid" */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .2;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 80%);
}

/* Blob di luce accent */
.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: 10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(195,166,255,.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

/* Badge terminale */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: 99px;
  padding: 5px 14px 5px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--tag-linux);
  margin-bottom: 28px;
  letter-spacing: .3px;
}

.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--tag-linux);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero h1 .accent-word {
  color: var(--accent);
  position: relative;
}

/* Sottolineatura decorativa */
.hero h1 .accent-word::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 99px;
  opacity: .5;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* Snippet terminale inline */
.hero-sub code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-sm);
  padding: 2px 7px;
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Bottone primario */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #1a1323;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-spring), box-shadow var(--t-normal);
  text-decoration: none;
  letter-spacing: -.2px;
}

.btn-primary:hover {
  background: #d6beff;
  color: #1a1323;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(195,166,255,.35);
}

.btn-primary:active { transform: translateY(0); }

/* Bottone secondario */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--bg-border);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-spring);
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--accent-border);
  background: var(--accent-glow);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Stats veloci nell'hero */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--bg-border);
  flex-wrap: wrap;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   SEZIONE PRINCIPALE — GRIGLIA ARTICOLI + SIDEBAR
   ============================================================ */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 64px 0 80px;
  align-items: start;
}

/* ============================================================
   SEZIONE FEATURED POSTS
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dim));
  border-radius: 99px;
}

.view-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--t-fast);
}

.view-all:hover { color: var(--accent); }

/* Griglia articoli */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* Card articolo */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    transform var(--t-normal),
    box-shadow var(--t-normal),
    border-color var(--t-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Linea accent in hover sulla card */
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--t-normal);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--accent-border);
  border-color: var(--accent-border);
}

.post-card:hover::before { opacity: 1; }

/* Card in evidenza — occupa tutta la larghezza */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 24px;
}

/* Immagine placeholder della card featured */
.card-image {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 64px;
  line-height: 1;
  user-select: none;
}

.card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }

/* Tag categoria */
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--r-sm);
  letter-spacing: .3px;
  text-transform: uppercase;
}

.tag-linux   { color: var(--tag-linux);  background: rgba(131,192,146,.1); border: 1px solid rgba(131,192,146,.2); }
.tag-dev     { color: var(--tag-dev);    background: rgba(127,187,179,.1); border: 1px solid rgba(127,187,179,.2); }
.tag-hw      { color: var(--tag-hw);     background: rgba(230,152,117,.1); border: 1px solid rgba(230,152,117,.2); }
.tag-smanet  { color: var(--tag-smanet); background: rgba(214,153,182,.1); border: 1px solid rgba(214,153,182,.2); }
.tag-info    { color: var(--tag-info);   background: rgba(167,192,128,.1); border: 1px solid rgba(167,192,128,.2); }

.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.3px;
  color: var(--text-primary);
  transition: color var(--t-fast);
}

.post-card:hover .card-title { color: var(--accent); }

.card-excerpt {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: auto;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-meta-item i { width: 12px; height: 12px; }

/* Indicatore "nuovo" */
.badge-new {
  display: inline-flex;
  align-items: center;
  background: rgba(195,166,255,.15);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: 20px;
}

.widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title i { width: 14px; height: 14px; color: var(--accent); }

/* Lista categorie */
.cat-list { display: flex; flex-direction: column; gap: 4px; }

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}

.cat-item:hover { background: var(--bg-elevated); }

.cat-item.active {
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
}

.cat-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 7px;
  border-radius: 99px;
}

/* About widget */
.about-widget {
  text-align: center;
}

.avatar-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-border));
  border: 2px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.about-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.3px;
}

.about-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 6px;
}

.about-desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--bg-elevated);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Stack tecnologico nella sidebar */
.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-sm);
  padding: 3px 9px;
  color: var(--text-secondary);
  transition: border-color var(--t-fast), color var(--t-fast);
}

.tech-chip:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Recenti */
.recent-list { display: flex; flex-direction: column; gap: 14px; }

.recent-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.recent-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--bg-border);
  line-height: 1;
  flex-shrink: 0;
  padding-top: 2px;
  width: 24px;
  text-align: right;
  transition: color var(--t-fast);
}

.recent-item:hover .recent-num { color: var(--accent); }

.recent-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: color var(--t-fast);
}

.recent-item:hover .recent-title { color: var(--text-primary); }

.recent-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================================
   SEZIONE "TUTTI GLI ARTICOLI" (sotto la griglia)
   ============================================================ */
.all-posts-section { padding-bottom: 80px; }

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--bg-border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-sans);
}

.filter-btn:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
  background: var(--accent-glow);
}

.filter-btn.active {
  background: var(--accent);
  color: #1a1323;
  border-color: var(--accent);
  font-weight: 600;
}

/* Lista articoli compatta */
.post-list { display: flex; flex-direction: column; gap: 2px; }

.post-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
}

.post-list-item:hover { background: var(--bg-surface); }

.post-list-tag { width: 72px; flex-shrink: 0; }

.post-list-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -.2px;
  transition: color var(--t-fast);
}

.post-list-item:hover .post-list-title { color: var(--accent); }

.post-list-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.post-list-arrow {
  color: var(--text-muted);
  width: 14px; height: 14px;
  flex-shrink: 0;
  transition: transform var(--t-fast), color var(--t-fast);
}

.post-list-item:hover .post-list-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--bg-border);
  background: var(--bg-surface);
}

.footer-inner {
  padding: 48px 0 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-brand .logo-name { font-size: 18px; margin-top: 4px; }

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}

.footer-tagline span { color: var(--tag-linux); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--t-normal);
  text-decoration: none;
}

.social-link i { width: 16px; height: 16px; }

.social-link:hover {
  background: var(--accent-glow);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.footer-nav-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.footer-nav-links a {
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-nav-links a:hover { color: var(--text-primary); }

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

.built-with {
  display: flex;
  align-items: center;
  gap: 6px;
}

.built-with i { width: 12px; height: 12px; color: var(--tag-linux); }

/* ============================================================
   ANIMAZIONI ENTRATA
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge   { animation: fadeUp .5s ease both; }
.hero h1      { animation: fadeUp .6s .1s ease both; }
.hero-sub     { animation: fadeUp .6s .2s ease both; }
.hero-actions { animation: fadeUp .6s .3s ease both; }
.hero-stats   { animation: fadeUp .6s .4s ease both; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .about-widget { grid-column: 1 / -1; }
}

/* ============================================================
   SEZIONE AUTH — Login, Register, Password Reset
   ============================================================ */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 0;
  position: relative;
}

/* Sfondo decorativo */
.auth-section::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(195,166,255,.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Effetto gloss sulla carta */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
  pointer-events: none;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.auth-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -.5px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.auth-info {
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: 16px 14px;
  margin: 20px 0;
  position: relative;
  z-index: 1;
}

.auth-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.auth-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.auth-info ul {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0 20px;
  padding-left: 0;
}

.auth-info li {
  margin: 4px 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -.2px;
}

.form-control {
  background: var(--bg-base);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 1px solid var(--bg-border);
  border-radius: var(--r-sm);
  background: var(--bg-base);
  cursor: pointer;
  accent-color: var(--accent);
  transition: border-color var(--t-fast);
  flex-shrink: 0;
}

.form-check-input:hover {
  border-color: var(--accent-border);
}

.form-check-input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.form-check-label {
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.form-check-label a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}

.form-check-label a:hover {
  color: #d6beff;
  text-decoration: underline;
}

.text-danger {
  font-size: 12px;
  color: #ff9a9a;
  margin-top: 2px;
}

.alert {
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
}

.alert-danger {
  background: rgba(255, 154, 154, 0.1);
  border: 1px solid rgba(255, 154, 154, 0.2);
  color: #ff9a9a;
}

.alert-success {
  background: rgba(131, 192, 146, 0.1);
  border: 1px solid rgba(131, 192, 146, 0.2);
  color: #83c092;
}

.auth-divider {
  height: 1px;
  background: var(--bg-border);
  margin: 24px 0 20px;
  position: relative;
  z-index: 1;
}

.auth-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-surface);
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.auth-links p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.auth-links a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast);
}

.auth-links a:hover {
  color: #d6beff;
  text-decoration: underline;
}

/* Footer per pagine Auth */
.footer-auth {
  margin-top: 64px;
  padding: 32px 0 20px;
  border-top: 1px solid var(--bg-border);
  background: var(--bg-base);
}

.footer-auth-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-auth-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  font-family: var(--font-mono);
}

.footer-auth-links {
  display: flex;
  gap: 20px;
}

.footer-auth-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.footer-auth-links a:hover {
  color: var(--accent);
}

/* ============================================================
   SEZIONE ADMIN — Dashboard e Gestione
   ============================================================ */

/* Shell a due colonne: sidebar + main */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
}

/* ---- Sidebar ---- */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 50;
  transition: transform var(--t-normal);
}

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.sidebar-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-sm);
  padding: 2px 7px;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  display: block;       /* Annulla: nav { display: flex; align-items: center } */
  margin-left: 0;       /* Annulla: nav { margin-left: auto } */
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  padding: 16px 16px 6px;
  font-family: var(--font-mono);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--t-fast);
  margin: 1px 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.sidebar-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-left-color: var(--bg-border);
}

.sidebar-link.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-left-color: var(--accent);
}

.sidebar-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--bg-border);
  margin: 8px 16px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 32px;
  border-radius: var(--r-md);
  border: 1px solid var(--bg-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
}

.sidebar-logout:hover {
  background: rgba(255, 154, 154, 0.12);
  border-color: rgba(255, 154, 154, 0.3);
  color: #ff9a9a;
}

/* Backdrop per sidebar mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 150;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--t-normal);
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

body.sidebar-open {
  overflow: hidden;
}

/* Hamburger toggle (solo mobile) */
.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Main area ---- */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Topbar */
.admin-topbar {
  height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-topbar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-md);
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  text-decoration: none;
  transition: all var(--t-fast);
}

.topbar-action-btn:hover {
  background: var(--accent);
  color: #1e2122;
  border-color: var(--accent);
}

/* Content scrollabile */
.admin-content {
  flex: 1;
  padding: 28px 28px 40px;
  overflow-y: auto;
}

.admin-header {
  margin-bottom: 28px;
}

.admin-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.admin-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-search {
  flex: 1;
  min-width: 200px;
}

.admin-search input {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  transition: border-color var(--t-fast);
}

.admin-search input::placeholder {
  color: var(--text-muted);
}

.admin-search input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Tabella Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.admin-table thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-border);
}

.admin-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: var(--font-mono);
}

.admin-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-top: 1px solid var(--bg-border);
}

.admin-table tbody tr {
  transition: background var(--t-fast);
}

.admin-table tbody tr:hover {
  background: var(--bg-elevated);
}

.admin-table .badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: .3px;
}

.badge-primary {
  background: rgba(195, 166, 255, 0.15);
  color: var(--accent);
  border: 1px solid rgba(195, 166, 255, 0.3);
}

.badge-success {
  background: rgba(131, 192, 146, 0.15);
  color: #83c092;
  border: 1px solid rgba(131, 192, 146, 0.3);
}

.badge-warning {
  background: rgba(230, 152, 117, 0.15);
  color: #e69875;
  border: 1px solid rgba(230, 152, 117, 0.3);
}

.badge-danger {
  background: rgba(255, 154, 154, 0.15);
  color: #ff9a9a;
  border: 1px solid rgba(255, 154, 154, 0.3);
}

.admin-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  height: 32px;
  border-radius: var(--r-md);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.action-btn.danger {
  color: #ff9a9a;
  border-color: rgba(255, 154, 154, 0.3);
  background: rgba(255, 154, 154, 0.08);
}

.action-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent-border);
  color: var(--accent);
}

.action-btn.danger:hover {
  background: rgba(255, 154, 154, 0.25);
  border-color: rgba(255, 154, 154, 0.5);
  color: #ff9a9a;
}

.action-btn:disabled,
.action-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .about-widget { grid-column: 1 / -1; }

  .auth-card {
    padding: 32px;
  }

  /* Admin sidebar su tablet: si nasconde, toggle visibile */
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: 4px 0 20px rgba(0,0,0,.5);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .admin-content {
    padding: 20px 16px 32px;
  }

  .admin-topbar {
    padding: 0 16px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search {
    min-width: 100%;
  }

  .admin-table {
    font-size: 13px;
  }

  .admin-table th,
  .admin-table td {
    padding: 12px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding-block: 12px;
    gap: 10px;
  }

  nav { display: none; width: 100%; }
  nav.open { display: flex; flex-wrap: wrap; margin-left: 0; }

  .search-wrap { order: 3; width: 100%; }
  .search-input { width: 100%; }
  .search-input:focus { width: 100%; }

  .menu-toggle { display: flex; align-items: center; margin-left: auto; }

  .hero { padding: 56px 0 48px; }

  .posts-grid { grid-template-columns: 1fr; }

  .post-card.featured {
    flex-direction: column;
  }

  .card-image { width: 100%; }
  .card-image-placeholder { min-height: 120px; }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links { align-items: flex-start; }

  .post-list-date { display: none; }

  .hero-stats { gap: 20px; }

  .auth-card {
    padding: 24px;
    max-width: 100%;
    margin: 16px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  .admin-table {
    font-size: 12px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }

  .admin-actions-cell {
    gap: 4px;
  }

  .action-btn {
    height: 28px;
    padding: 4px 10px;
    font-size: 12px;
  }
}

/* ============================================================
   PANNELLO IMMAGINI POST
   ============================================================ */
.images-panel {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.images-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--bg-border);
}

.images-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--text-muted);
  text-align: center;
}

.images-empty p {
  margin: 0;
  font-size: 14px;
}

.img-thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--bg-border);
  background: var(--bg-elevated);
}

.badge-cover {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
}

.upload-status {
  margin: 0 24px 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
}

.upload-status-ok {
  background: rgba(167, 192, 128, 0.15);
  border: 1px solid rgba(167, 192, 128, 0.3);
  color: #a7c080;
}

.upload-status-error {
  background: rgba(255, 154, 154, 0.15);
  border: 1px solid rgba(255, 154, 154, 0.3);
  color: #ff9a9a;
}

/* ── Dropzone dark theme ──────────────────────────────────── */
.dz-upload-area.dropzone {
  background: var(--bg-base);
  border: 2px dashed var(--bg-border);
  border-radius: var(--r-md);
  margin: 0 24px 24px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dz-upload-area.dropzone:hover,
.dz-upload-area.dropzone.dz-drag-hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.dz-upload-area.dropzone .dz-message {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
}
.dz-upload-area.dropzone .dz-message strong {
  color: var(--accent);
}
.dz-upload-area.dropzone .dz-preview {
  display: none;
}

/* ============================================================
   POST CONTENT — stili per l'HTML generato da TinyMCE
   ============================================================ */
.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  max-width: 740px;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  font-family: var(--font-sans);
  color: var(--text-primary);
  margin: 2em 0 .6em;
  line-height: 1.3;
}
.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.25em; }
.post-content h4 { font-size: 1.1em; }
.post-content p  { margin: 0 0 1.2em; }
.post-content a  {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
.post-content a:hover { color: #fff; }
.post-content ul,
.post-content ol {
  margin: 0 0 1.2em 1.4em;
}
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 1.6em 0;
  background: var(--bg-elevated);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}
.post-content pre {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 16px 20px;
  overflow-x: auto;
  margin: 1.4em 0;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  color: var(--accent);
}
.post-content pre code {
  background: transparent;
  padding: 0;
  color: var(--text-primary);
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 1em 0;
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--bg-border);
  margin: 2em 0;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.4em 0;
}
.post-content th,
.post-content td {
  padding: 10px 14px;
  border: 1px solid var(--bg-border);
  text-align: left;
}
.post-content th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

