/* Core theme for Ipermateria */
:root {
  --bg: #0a0b10;
  --bg-alt: #0e1018;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-strong: rgba(255, 255, 255, 0.055);
  --text: #e8e8ec;
  --muted: #9a9eb0;
  --border: rgba(255, 255, 255, 0.1);
  --accent-code: #00e1ff;
  --accent-carne: #e56f4a;
  --accent-cosmo: #a78bfa;
  --accent-mix: linear-gradient(135deg, var(--accent-code) 0%, var(--accent-cosmo) 50%, var(--accent-carne) 100%);
  --mono: "JetBrains Mono", "IBM Plex Mono", "Fira Code", monospace;
  --serif: "Lora", "Iowan Old Style", "Palatino", serif;
  --display: "Space Grotesk", "Inter", sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --radius: 16px;
  --shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 225, 255, 0.06), transparent),
                    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(167, 139, 250, 0.04), transparent);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #ffffff;
  opacity: 1;
}

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

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 22px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 14px 28px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.topbar.scrolled {
  background: rgba(10, 11, 16, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.4);
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  text-transform: uppercase;
}

.brand .logo-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  transition: width 0.3s ease, height 0.3s ease;
}

.brand .logo-wrap svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(0, 225, 255, 0.3));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* Hide tagline on smaller screens to prevent overlap */
@media (max-width: 1100px) {
  .brand-tagline { display: none; }
}

/* Home Header Visibility Logic */
body.home .topbar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease, padding 0.3s ease;
}

body.home .topbar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.nav a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: var(--panel-strong);
}

.nav-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 35% at 50% 40%, rgba(0, 225, 255, 0.08), transparent 70%),
              radial-gradient(ellipse 40% 30% at 60% 60%, rgba(167, 139, 250, 0.06), transparent 60%);
  pointer-events: none;
}

svg.hero-logo {
  width: clamp(140px, 20vw, 240px);
  height: auto;
  margin-bottom: 36px;
  filter: drop-shadow(0 0 50px rgba(0, 225, 255, 0.3));
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 16px;
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.hero-axes {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-style: italic;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 500px;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  animation: bounce 2s infinite;
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: #fff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border-color 0.3s ease, color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  background: var(--panel);
  border-color: var(--accent-cosmo);
}

.button:active {
  transform: translateY(0) scale(0.98);
  background: var(--accent-cosmo);
  color: #0a0b10;
  box-shadow: none;
  border-color: var(--accent-cosmo);
}

.button.accent {
  background: var(--accent-mix);
  border: none;
  color: #0a0a12;
  font-weight: 700;
}

.logo-svg {
  width: 100%;
  height: auto;
}

.tesseract-lines {
  fill: none;
  stroke: url(#grad);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: draw-tesseract 16s ease-in-out infinite;
}

@keyframes draw-tesseract {
  0% { stroke-dashoffset: 240; opacity: 0; }
  10% { opacity: 1; } /* Start drawing later */
  35% { stroke-dashoffset: 0; } /* Construction end */
  85% { stroke-dashoffset: 0; opacity: 1; } /* Hold full for much longer */
  100% { stroke-dashoffset: 240; opacity: 1; } /* Deconstruct fast (reverse) NO FADE */
}

.core-pulse {
  transform-origin: center;
  animation: eye-sequence 16s linear infinite;
}

@keyframes eye-sequence {
  0% { transform: scale(0); opacity: 0; }
  12% { transform: scale(0.9); opacity: 1; filter: none; } /* Arrives slowly (0-12%) */
  
  /* Central Phase (Doubled duration) */
  /* Pulse 1 (Increased glow) */
  25% { transform: scale(1.35); filter: drop-shadow(0 0 25px #fff); } /* Super Glow (25px) */
  38% { transform: scale(0.9); filter: none; }

  /* Pulse 2 */
  53% { transform: scale(1.35); filter: drop-shadow(0 0 25px #fff); } /* Super Glow (25px) */
  65% { transform: scale(0.9); filter: none; }

  /* Pulse 3 */
  80% { transform: scale(1.35); filter: drop-shadow(0 0 25px #fff); } /* Super Glow (25px) */
  90% { transform: scale(0.9); filter: none; }

  /* Still pulsing during deconstruction */
  95% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(0); opacity: 0; } /* Vanish at very end */
}

.hero-visual .label {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 18px;
}

.tracks {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 45%);
  pointer-events: none;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: all 0.3s ease;
}

/* Stili Categorie - "Sintesi Style" (Gradient Text + Soft Background) */
/* Nota: Usiamo background-clip per il testo E un background-color semitrasparente. 
   Per farlo, il background-color deve essere molto leggero o gestito separatamente se vogliamo il testo gradient "vero".
   Tuttavia, un colore solido brillante è spesso più leggibile e pulito per questi badge piccoli.
   Optiamo per un look "Neon Glass": Sfondo colorato tenue, Bordo luminoso, Testo brillante. */

.badge.code {
  border-color: rgba(0, 225, 255, 0.4);
  background: rgba(0, 225, 255, 0.08);
  color: #00e1ff;
  box-shadow: 0 0 15px rgba(0, 225, 255, 0.1);
}

.badge.carne {
  border-color: rgba(229, 111, 74, 0.4); /* Orange */
  background: rgba(229, 111, 74, 0.08);
  color: #ffccbc;
  box-shadow: 0 0 15px rgba(229, 111, 74, 0.1);
}

.badge.cosmo {
  border-color: rgba(167, 139, 250, 0.4); /* Purple */
  background: rgba(167, 139, 250, 0.08);
  color: #d1c4e9; 
  box-shadow: 0 0 15px rgba(167, 139, 250, 0.1);
}

/* Badge Sintesi (Gradiente Master) mantenuto per legacy o usi speciali */
.badge.sintesi {
  border-color: rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 225, 255, 0.1), rgba(167, 139, 250, 0.1), rgba(229, 111, 74, 0.1));
  position: relative;
  z-index: 1;
}

.badge.sintesi::before {
  content: attr(data-label); /* Fallback se vuoto */
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: fit-content;
}

.section {
  margin: 0 0 64px;
  padding-top: 32px;
}

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

.section h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.section .hint {
  color: var(--muted);
  font-size: 0.95rem;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  align-items: start;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.article-card img {
  grid-column: 1 / -1;
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.18);
}

.article-card .content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 16px 28px 32px;
}

.article-card h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.article-card .aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 24px 32px 28px 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.footer {
  margin-top: 0;
  padding: 80px 24px 64px;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  position: relative;
}

/* Override .share-section styles when inside footer */
.footer .share-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-bottom: 64px;
  padding-bottom: 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
}

.footer-content::before { /* Separator visual */
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--panel-strong);
  margin-bottom: 16px;
}

.footer .quote {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-style: italic;
  color: var(--text);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.4;
  opacity: 0.9;
}

.footer .copyright {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.article-page .topbar {
  background: rgba(10, 11, 16, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.article-page .page {
  max-width: 880px;
  padding-top: 100px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--muted);
}

.article-header h1 {
  margin: 6px 0 8px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 2.2rem;
  line-height: 1.2;
}

.article-header .summary {
  color: var(--muted);
  margin: 8px 0 16px;
}

.article-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0px 22px 28px;
  box-shadow: var(--shadow);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.article-content h2 { margin-top: 28px; margin-bottom: 10px; }
.article-content h3 { margin-top: 24px; margin-bottom: 8px; }
.article-content p { 
  color: var(--text); 
  font-size: 1.15rem; /* Increased from default */
  line-height: 1.8;
}

/* Raised Cap (Capolettera rialzato) */
.article-content > p:first-of-type::first-letter {
  float: none; /* Rimuove il "drop" */
  display: inline-block;
  vertical-align: baseline; /* Allinea la base alla lettera successiva */
  font-family: "Cormorant Garamond", serif;
  font-size: 4.8rem;
  line-height: 0.8;
  font-weight: 700;
  margin-right: 4px;
  
  /* Color & Gradient */
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Blockquote - WARM Style (La Carne) */
blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  border-left: 4px solid var(--accent-carne); /* Warm Border */
  background: linear-gradient(to right, rgba(229, 111, 74, 0.05), rgba(229, 111, 74, 0.01)); /* Warm Tint */
  color: #fff;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.7;
  position: relative;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

blockquote::before {
  content: "“";
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--serif);
  font-size: 8rem;
  line-height: 1;
  color: rgba(229, 111, 74, 0.08); /* Warm Quote Mark */
  pointer-events: none;
  z-index: 0;
}

blockquote p {
  position: relative;
  z-index: 1;
  margin: 0;
}


code {
  background: var(--panel-strong);
  padding: 3px 6px;
  border-radius: 6px;
  font-family: var(--mono);
}

.related {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.highlight {
  background: rgba(0, 225, 255, 0.08);
  border: 1px solid rgba(0, 225, 255, 0.2);
  padding: 14px;
  border-radius: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 980px) {
  .article-card { grid-template-columns: 1fr; }
  .article-card .aside { 
    flex-direction: row; 
    align-items: center; 
    padding: 0 32px 28px 32px;
  }
  .article-card .content {
    padding: 24px 32px 12px 32px;
  }
}

@media (max-width: 680px) {
  .page { padding: 24px 18px 44px; }
  .topbar { padding: 12px 18px; }
  .topbar.scrolled { padding: 10px 18px; }
  .brand-tagline { display: none; }
  .nav { display: none; width: 100%; }
  .nav.open { display: flex; flex-direction: column; align-items: flex-start; background: var(--bg-alt); padding: 16px; border-radius: 12px; margin-top: 8px; }
  .nav-toggle { display: inline-flex; }
  .hero { min-height: 100svh; padding: 10px 20px 48px; }
  .hero-logo { width: 140px; }
  .card, .article-content { padding: 20px; }
  .article-card .content { padding: 20px 20px 10px 20px; }
  .article-card .aside { padding: 0 20px 20px 20px; }
}

/* Bibliography Styles */
/* .bibliography {
  margin-top: 32px;
  padding-top: 22px;
} */


.bibliography h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  margin-bottom: 32px;
  color: var(--text);
  letter-spacing: 0.05em;
}

.bib-category {
  margin-bottom: 32px;
}

.bib-category h3 {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Bibliography Accordion Styles */
details.bib-category {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

details.bib-category[open] {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-code);
}

summary.bib-summary {
  list-style: none; /* Remove default triangle */
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

summary.bib-summary::-webkit-details-marker {
  display: none;
}

summary.bib-summary:hover {
  background: rgba(255, 255, 255, 0.05);
}

summary.bib-summary h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.summary-icon {
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.3s ease;
}

details[open] summary .summary-icon {
  transform: rotate(180deg);
  color: var(--accent-code);
}

ul.bib-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px 20px; /* Add padding inside the accordion */
  list-style: none;
  margin: 0;
  border-top: 1px solid transparent;
}

details[open] ul.bib-list {
  border-top-color: var(--border);
  padding-top: 16px;
}

li.bib-item-wrap {
  position: relative;
}

li.bib-item-wrap::before {
  content: none;
}

.bib-item {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
  padding: 12px 16px;
  border-left: 2px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  user-select: text; /* Allow text selection */
}

.bib-item * {
  user-select: text;
}

.bib-item:hover {
  border-left-color: var(--accent-code);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

/* Two-Line Compact Layout */
.bib-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.bib-author {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95em;
  letter-spacing: 0.02em;
}

.bib-sep {
  color: var(--border);
  font-size: 0.8em;
  font-weight: 300;
}

.bib-source {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bib-content {
  display: block;
}

.bib-title {
  font-weight: 400;
  font-size: 1.05em;
  font-style: italic;
  color: #e0e0e0;
  line-height: 1.4;
}

/* Inline Icon follows title naturally */
/* Optimized: Combined with section below */

/* Reference Highlight Animation */
@keyframes highlight-pulse {
  0% { background: rgba(0, 225, 255, 0.15); border-left-color: var(--accent-code); transform: translateX(8px); }
  50% { background: rgba(0, 225, 255, 0.3); border-left-color: #fff; transform: translateX(8px); }
  100% { background: rgba(0, 0, 0, 0.2); border-left-color: var(--border); transform: translateX(0); }
}

.bib-item.highlight-ref {
  animation: highlight-pulse 2s ease-out forwards;
  border-left-color: var(--accent-code); /* Keep accent for a bit */
}

/* Modal Glossary Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000; /* Increased z-index */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close,
.share-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff;
  font-family: var(--sans);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover,
.share-modal-close:hover {
  background: var(--text);
  color: var(--bg);
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--display);
  font-size: 1.5rem;
  margin: 0 0 16px;
  color: var(--text);
  background: var(--accent-mix);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 40px; /* Avoid overlap with close btn */
}

.modal-body {
  font-family: var(--serif);
  line-height: 1.7;
  color: var(--text); /* Increased contrast */
  font-size: 1.1rem;
}

.modal-links {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px; 
  flex-wrap: wrap; 
}

/* Stile bottoni link modale ottimizzato */
.modal-links .button {
  padding: 8px 12px;
  font-size: 0.85rem;
  flex: 1 1 30%;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 600px) {
  .modal-links .button {
    flex: 1 1 100%; /* Stack buttons on mobile */
  }
}

/* Inline citation links & General Article Links */
.article-content a {
  font-weight: 500;
  text-decoration: none;
  background: var(--accent-mix);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent; /* Explicitly set text fill for gradient */
  color: transparent;
  transition: background-position 0.5s ease;
  border-bottom: 1px dotted rgba(167, 139, 250, 0.5); 
}

.article-content a:hover {
  background-position: right center;
  border-bottom-style: solid;
  border-bottom-color: var(--accent-code);
}

/* Glossary Terms Override */
/* Stile "Academic/Editorial": Meno invasivo, segnala definizione */
.article-content a.glossary-term {
  background: none;
  -webkit-text-fill-color: initial;
  color: inherit; /* Mantiene il colore del testo circostante */
  font-weight: 600; /* Bold come richiesto */
  font-style: italic; /* Italic come richiesto */
  border-bottom: 1px dotted var(--muted); /* Standard UX per definizioni */
  cursor: help; /* Cursore "?" */
  padding: 0 2px;
  margin: 0 -2px;
  border-radius: 4px;
}

.article-content a.glossary-term:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-bottom-color: var(--accent-code);
  text-decoration: none;
}

/* Bibliography Items Override - FIX VISIBILITY */
.article-content a.bib-item {
  background: rgba(0, 0, 0, 0.2); /* Reset to card background */
  -webkit-background-clip: border-box; /* Disable text clip */
  background-clip: border-box;
  -webkit-text-fill-color: initial; /* Reset text fill */
  color: var(--text); /* Restore text color */
  border-bottom: none; /* Remove link underline */
  display: block; /* Restore block layout */
  font-weight: normal; 
}

.article-content a.bib-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.article-content a.bib-item .bib-title {
  color: #e0e0e0; /* Internal elements specific colors */
}
.article-content a.bib-item .bib-author {
  color: var(--muted);
}
.article-content a.bib-item .bib-source {
  color: var(--muted);
}

/* Specific citation style (superscript) */
.citation-link {
  font-family: var(--mono);
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 2px;
  border-bottom: none !important; /* No underline for superscripts */
  opacity: 0.9;
}

/* ABSTRACT STYLE (Hybrid - Colored Box, Gray Text) */
.abstract {
  max-width: 680px;
  margin: 44px auto 48px;   /* Increased spacing from top */
  padding: 28px 32px;
  background: rgba(0, 225, 255, 0.03); /* Subtle Cyan Tint */
  border: 1px solid rgba(0, 225, 255, 0.2); /* Colored Border */
  border-radius: 12px;      /* Uniform border radius */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  font-family: var(--sans);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);      /* Text stays Gray */
  position: relative;
  overflow: hidden;
}

.abstract::before {
  content: "ABSTRACT";
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(0, 225, 255, 0.5); /* Colored Label */
  pointer-events: none;
}

.abstract strong {
  font-family: var(--sans);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-right: 12px;
  display: inline-block;
  background: rgba(0, 225, 255, 0.15); /* Colored Background */
  border: 1px solid rgba(0, 225, 255, 0.25);
  padding: 1px 6px;
  border-radius: 6px;
  font-style: normal;
  box-shadow: 0 2px 8px rgba(0, 225, 255, 0.15);
}

.bibliography h2 {
  /* Inherits unified style above */
}

.bib-list .bib-item-wrap .bib-item,
.article-content .bib-list .bib-item-wrap .bib-item {
  background: rgba(0, 0, 0, 0.25) !important;
  color: var(--text) !important;
  border: 1px solid transparent;
  border-left: 2px solid var(--border);
  padding: 14px 18px !important;
  display: block;
  text-decoration: none;
  cursor: pointer;
  
  /* Text Selection Fix */
  user-select: text; 
  -webkit-user-select: text;
  -webkit-user-drag: none;
}

/* Make content wrapper inside link behave nicely */
.bib-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--muted);
}

.bib-content {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: #eee;
}

.bib-author {
  font-weight: 600;
  color: #a0a0a0;
}

.bib-sep {
  opacity: 0.4;
  font-size: 0.8em;
}

.bib-source {
  color: #707070;
  font-style: italic;
}

.bib-title {
  color: #e0e0e0;
  transition: color 0.2s;
}

.bib-link-icon {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.8em;
  color: var(--accent-code);
  opacity: 0.6;
  transform: translateY(-1px);
}

/* Hover States */
.bib-list .bib-item-wrap .bib-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-code);
}

.bib-list .bib-item-wrap .bib-item:hover .bib-title {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 4px;
}

.bib-list .bib-item-wrap .bib-item:hover .bib-link-icon {
  opacity: 1;
  transform: translateY(-1px) translateX(2px);
}

/* Glossary Index Section & Bibliography Box Uniformity */
.glossary-index-section,
.bibliography {
  margin: 50px 0;
  padding: 32px;
  background: linear-gradient(135deg, rgba(8, 12, 20, 0.4), rgba(12, 16, 26, 0.4));
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.glossary-index-section::before,
.bibliography::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-code), transparent);
  opacity: 0.5;
}

.glossary-index-title,
.bibliography h2 {
  font-family: var(--display);
  font-size: 1.6rem; /* Ingrandito */
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.glossary-index-title i,
.bibliography h2 i {
  font-size: 1.4rem;
  color: var(--accent-code);
  opacity: 0.9;
}

.glossary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.glossary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none !important;
}

.glossary-pill:hover {
  background: rgba(0, 225, 255, 0.1);
  border-color: var(--accent-code);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 225, 255, 0.15);
}

.glossary-pill::before {
  content: "●";
  color: var(--accent-code);
  font-size: 0.6em;
  opacity: 0.6;
}

.glossary-pill:hover::before {
  opacity: 1;
  text-shadow: 0 0 8px var(--accent-code);
}

/* --- Article TOC Sidebar --- */
.article-grid {
  display: block; /* Removed grid for floating toc layout */
}

.toc-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  /* Removed grid definition to fix content compression */
  .toc-sidebar {
    display: none;
  }


  .toc-sticky {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
}

.toc-title {
  font-family: var(--display);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

/* Shared TOC Styles */
#toc-nav ul,
#floating-toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

#toc-nav li,
#floating-toc-nav li {
  margin: 0;
}

#toc-nav a,
#floating-toc-nav a {
  display: block;
  padding: 6px 0 6px 16px;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: all 0.2s ease;
}

#toc-nav a:hover,
#floating-toc-nav a:hover {
  color: var(--accent-code);
}

#toc-nav a.active,
#floating-toc-nav a.active {
  color: var(--text);
  border-left-color: var(--accent-code);
  font-weight: 500;
  background: linear-gradient(90deg, rgba(0, 225, 255, 0.05) 0%, transparent 100%);
}

/* --- Shareable Blockquote Enhancements --- */
blockquote:not(.intro-quote) {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

blockquote:not(.intro-quote):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

blockquote:not(.intro-quote)::after {
  content: "Condividi"; /* Simple text as requested */
  font-family: var(--sans); 
  font-weight: 500;
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 6px 14px;
  border-radius: 99px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
}

blockquote:not(.intro-quote):hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* --- Progress Bar --- */
#progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 1001; /* Above topbar */
  pointer-events: none;
}

#progress-bar {
  height: 100%;
  background: var(--accent-mix);
  width: 0%;
  box-shadow: 0 0 10px var(--accent-code);
  transition: width 0.1s linear;
}

/* --- TL;DR Card --- */
.tldr-card {
  margin: 0 0 24px 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-code);
  background: var(--panel);
  border-radius: var(--radius);
  position: relative;
  float: right;
  width: 280px;
  clear: right;
  z-index: 10;
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .tldr-card {
    float: none;
    width: 100%;
    margin: 24px 0;
  }
}

.tldr-title {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-code);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tldr-list {
  margin: 0;
  padding-left: 18px;
}

.tldr-list li {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

/* --- Top Citation Statement --- */
.top-citation-statement {
  margin: 40px 0;
  padding: 32px;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--bg-alt), var(--bg-alt)), var(--accent-mix);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: var(--radius);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  box-shadow: 0 10px 30px rgba(167, 139, 250, 0.1);
  padding-bottom: 30px; /* Space for the absolute button */
  overflow: hidden; /* Ensure button stays inside */
}

.top-citation-statement:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(167, 139, 250, 0.2);
}

.top-citation-statement .citation-text {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(90deg, #fff, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block; /* Fix for background clip */
}

blockquote .citation-text {
  position: relative;
  z-index: 1; /* Match previous p style */
  display: block;
}

/* Common Hint Style for both Blockquote and Citation */
.top-citation-statement::after,
blockquote:not(.intro-quote)::after {
  content: "Condividi \f1e0"; /* Share Node icon */
  font-family: var(--sans), "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 6px 14px;
  border-radius: 99px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-citation-statement:hover::after,
blockquote:not(.intro-quote):hover::after {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  .top-citation-statement::after,
  blockquote:not(.intro-quote)::after {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background: rgba(0,0,0,0.4) !important;
  }
}


/* --- Article Share Logic --- */
/* Optimized: Styles merged into the Share Section below (line ~1913) */

/* --- Share Modal --- */
.share-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 10000; /* Increased z-index */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.share-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.share-modal-content {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.share-modal.open .share-modal-content {
  transform: translateY(0);
}

.share-modal-title {
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 24px;
}

/* Share Modal Buttons Container */
.share-modal-content .share-buttons {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.quote-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px; 
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quote-share-btn:hover {
  background: var(--panel-strong);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.quote-share-btn i {
  font-size: 1.25rem;
}

/* Network Specific Hover Colors */
.quote-share-btn.twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.quote-share-btn.linkedin:hover { border-color: #0a66c2; color: #0a66c2; }
.quote-share-btn.facebook:hover { border-color: #1877f2; color: #1877f2; }
.quote-share-btn.reddit:hover { border-color: #ff4500; color: #ff4500; }

/* --- Floating TOC Sidebar --- */
#floating-toc-btn {
  position: fixed;
  top: 120px;
  right: 0;
  width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  color: var(--muted);
  box-shadow: -4px 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

#floating-toc-btn:hover {
  width: 48px;
  color: var(--accent-code);
  background: var(--panel);
}

#floating-toc-panel {
  position: fixed;
  top: 120px;
  right: -320px; /* Hidden by default */
  width: 300px;
  max-height: calc(100vh - 140px);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 24px;
  z-index: 999;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
  transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  overflow-y: auto;
}

#floating-toc-panel.open {
  right: 0;
}

/* Move button when panel is open */
#floating-toc-panel.open + #floating-toc-btn,
body.toc-open #floating-toc-btn {
  right: 300px;
  border-radius: 50%; /* morph to circle or X */
  background: var(--accent-code);
  color: #000;
  border-color: var(--accent-code);
}


/* --- Revert Abstract/Summary Style to User Preference --- */
/* The user liked the previous .summary style better than the new .abstract box */
.summary {
    font-family: var(--serif);
    font-size: 1.35rem; /* Larger font */
    font-style: italic;
    color: var(--text);
    opacity: 0.9;
    margin: 0.5rem 0 1.5rem;
    line-height: 1.5;
    
    /* Reset abstract box styles if they were applied to p.summary via a class change or just override */
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
}

.summary strong {
    /* Reset badge style inside summary if any */
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
    font-family: var(--display);
    padding: 0;
    margin-right: 0;
}

/* --- FIX: Floating TOC Highlighting --- */
/* Styles merged with #toc-nav above */


/* --- Share Section --- */
.share-section {
  max-width: 680px;
  margin: 4rem auto 2rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.share-title {
  font-family: var(--display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: var(--border);
  transform: translateY(-2px);
  color: #fff;
}

.share-btn.reddit:hover {
  background: #ff4500;
  border-color: #ff4500;
  text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.share-btn.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  text-shadow: 0 0 10px rgba(10, 102, 194, 0.5);
}

.share-btn.twitter:hover { /* X (Twitter) */
  background: #000;
  border-color: #333;
}

.share-btn.email:hover {
  background: var(--accent-code);
  border-color: var(--accent-code);
  color: #000;
}


.share-btn.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  text-shadow: 0 0 10px rgba(24, 119, 242, 0.5);
}

/* --- Refactored Inline Styles (2026-01-09) --- */
.abstract-label {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
}

.occhiello-header {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--accent-code);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.article-header h1.tight-top {
  margin-top: 0.25rem;
}

.summary.compact {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text);
  opacity: 0.9;
  margin: 0.5rem 0 1.5rem;
  line-height: 1.6;
}

.meta.article-meta {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-family: var(--display);
}

.meta-separator {
  opacity: 0.5;
  margin: 0 8px;
}

.tag-list.centered {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  /* margin-bottom inherited from .tag-list */
}

/* Article Hero Figure */
.article-hero-figure {
  margin: 0 -22px 2rem -22px;
  width: calc(100% + 44px);
}

.article-hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
}

.article-hero-figure figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem 1rem 1rem;
  font-style: italic;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

/* Article Inline Figure */
.article-inline-figure {
  margin: 2rem 0;
}

.article-inline-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.article-inline-figure figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* --- Metadata Semantics (2026-01-09) --- */
.author-name {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.author-name:hover {
  color: var(--text);
  border-bottom-color: var(--accent-code);
}

.reading-time {
  font-variant-numeric: tabular-nums;
  cursor: help; /* Suggests hovering for tooltip if implemented, or just semantic hint */
}

/* --- Home Page Specifics (2026-01-09) --- */
.intro-section {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.intro-quote {
  font-family: var(--serif);
  font-size: 1.5rem; /* Increased size as requested */
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  border: none;
  margin: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.newsletter-description {
  margin: 0;
  color: var(--muted);
}

/* --- Author Page Specifics (2026-01-09) --- */
.author-profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%; /* Circular */
    object-fit: cover;
    float: right;
    margin: 2rem 0 1rem 2rem;
    shape-outside: circle(50%);
    border: 2px solid var(--accent-code); /* Optional border */
}

@media (max-width: 768px) {
    .author-profile-img {
        float: none;
        display: block;
        margin: 0 auto 2rem auto;
    }
}

/* --- Intro Quote Override (2026-01-09) --- */
/* Optimized to avoid !important resets provided by specificity elsewhere */
.intro-quote {
    cursor: pointer;
}

/* Revert Footer Share Override to restore functionality/style as requested */
/* Consolidating resets */
