/* ============================================================
   Daniela Grande · Archivista — foglio di stile condiviso
   Identità: carta, inchiostro, teal, oro. Display serif editoriale.
   ============================================================ */

/* ---------- Token ---------- */
:root {
  --bg: #F5F0E6;
  --surface: #FBF8F1;
  --surface-2: #FFFDF7;
  --fg: #2A231B;
  --muted: #706659;
  --rule: #E3D9C6;
  --border: rgba(42, 35, 27, 0.12);
  --teal: #1E5F63;
  --teal-deep: #16484C;
  --teal-soft: #DCE8E4;
  --gold: #A9822F;
  --gold-soft: #F0E4C8;
  --cream: #F6F1E4;
  --shadow-sm: 0 1px 2px rgba(42, 35, 27, 0.06);
  --shadow-md: 0 6px 20px rgba(42, 35, 27, 0.09);
  --shadow-lg: 0 18px 44px -18px rgba(42, 35, 27, 0.28);

  --font-display: "Zodiak", "Iowan Old Style", Georgia, serif;
  --font-body: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Liberation Mono", Menlo, monospace;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 22px;
  --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1100px;
  --prose: 720px;

  /* alias di compatibilità per i diagrammi SVG */
  --accent: var(--teal);
  --accent-soft: var(--teal-soft);
  --panel: var(--surface);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131A19;
    --surface: #1B2524;
    --surface-2: #202B2A;
    --fg: #EAE3D3;
    --muted: #A39A8A;
    --rule: #2C3836;
    --border: rgba(234, 227, 211, 0.12);
    --teal: #7FBFB9;
    --teal-deep: #0F4A4E;
    --teal-soft: #24403E;
    --gold: #D2A94E;
    --gold-soft: #3A3222;
    --cream: #E9E2D2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 18px 44px -18px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131A19; --surface: #1B2524; --surface-2: #202B2A;
  --fg: #EAE3D3; --muted: #A39A8A; --rule: #2C3836;
  --border: rgba(234, 227, 211, 0.12);
  --teal: #7FBFB9; --teal-deep: #0F4A4E; --teal-soft: #24403E;
  --gold: #D2A94E; --gold-soft: #3A3222; --cream: #E9E2D2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 44px -18px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth; scroll-padding-top: var(--space-24);
  hanging-punctuation: first last;
}
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
}
img, picture, svg, video, canvas { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
p, li, figcaption { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; }
a { color: inherit; text-decoration-color: color-mix(in oklab, var(--teal) 70%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: var(--radius-sm); }
::selection { background: color-mix(in oklab, var(--teal) 25%, transparent); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal); color: var(--cream);
  padding: var(--space-3) var(--space-5); border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.prose { max-width: var(--prose); }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-6); padding-block: var(--space-4) var(--space-4); }
.brand { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand em { font-style: normal; color: var(--teal); }
.site-header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.site-header nav a { font-size: var(--text-sm); text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 6px; }
@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .site-header nav ul { gap: var(--space-2); }
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 12px 22px; border-radius: 999px;
  font-size: var(--text-sm); font-weight: 500; text-decoration: none;
  border: 1.5px solid var(--teal);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn.primary { background: var(--teal); color: var(--primary-button-text, #F6F1E4); }
.btn.primary:hover { color: #F6F1E4; }
@media (prefers-color-scheme: dark) { :root { --primary-button-text: #131C1A; } }
[data-theme="dark"] { --primary-button-text: #131C1A; }
[data-theme="light"] { --primary-button-text: #F6F1E4; }
.btn.primary:hover { background: var(--teal-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn.ghost { border-color: color-mix(in oklab, var(--fg) 30%, transparent); }
.btn.ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(var(--space-12), 7vw, var(--space-24)) clamp(var(--space-10), 5vw, var(--space-16)); }
.hero .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
.hero h1 {
  font-size: clamp(2.4rem, 1.2rem + 4.2vw, 4.3rem);
  font-weight: 500; line-height: 1.06; margin-block: var(--space-5) var(--space-6);
}
.hero .lead { font-size: var(--text-lg); color: var(--muted); max-width: 34em; margin-bottom: var(--space-8); }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.personal-hero h1 { font-size: clamp(2.1rem, 1.1rem + 3.5vw, 3.8rem); }
.personal-hero .lead { font-size: var(--text-base); max-width: 40em; }
.personal-hero .portrait .tag { font-size: var(--text-xs); letter-spacing: .04em; white-space: nowrap; left: 50%; transform: translateX(-50%); }
.section-title { font-size: var(--text-xl); max-width: 26ch; margin-block: var(--space-4) var(--space-6); }
.section-intro { max-width: 70ch; color: var(--muted); margin-bottom: var(--space-8); }
.profile-more { display: inline-block; margin-top: var(--space-6); font-size: var(--text-sm); }
.profile-prose { max-width: var(--prose); }
.profile-prose p + p { margin-top: var(--space-5); }
.gallery-note { color: var(--muted); font-size: var(--text-xs); margin-top: var(--space-5); max-width: 80ch; }
.banner h2 { font-size: var(--text-xl); max-width: 25ch; margin-top: var(--space-4); }
.education-list { list-style: none; max-width: var(--prose); }
.education-list li { padding-block: var(--space-5); border-bottom: 1px solid var(--rule); }
.education-list h3 { font-family: var(--font-body); font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.education-list p, .profile-register { font-size: var(--text-sm); color: var(--muted); }
.profile-register { max-width: var(--prose); margin-top: var(--space-6); }
.work-index { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-block: var(--space-6) var(--space-10); }
.work-index a { font-size: var(--text-sm); padding-block: var(--space-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .3em; }
.work-index a:hover, .work-index a:focus-visible { text-decoration-color: currentColor; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.work-item { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); gap: var(--space-10); border-top: 1px solid var(--rule); padding-block: var(--space-8) var(--space-10); scroll-margin-top: 10rem; min-width: 0; }
.work-item .eyebrow { margin-bottom: var(--space-3); }
.work-item h3 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.work-item p { font-size: var(--text-base); max-width: 65ch; }
.work-item .work-caption { font-size: var(--text-sm); color: var(--muted); max-width: 30ch; }
.work-copy { min-width: 0; }
.work-copy h4 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.work-copy p + h4 { margin-top: var(--space-5); }
.work-copy p:last-of-type { margin-bottom: 0; }
.work-wide { grid-column: 1 / -1; }
.cards.editorial-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#lavori, #cv-pillole { scroll-margin-top: 9rem; }
@media (max-width: 640px) { .work-grid, .cards.editorial-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .work-item { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } .work-item .work-caption { max-width: 50ch; } }
.career-list { list-style: none; max-width: 900px; }
.career-list li { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: var(--space-6); padding-block: var(--space-6); border-top: 1px solid var(--rule); }
.career-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--teal); padding-top: var(--space-1); }
.career-list h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.career-list p { font-size: var(--text-sm); }
.career-sector { color: var(--muted); margin-bottom: var(--space-3); }
.education-list p + p { margin-top: var(--space-2); }
@media (max-width: 640px) { .career-list li { grid-template-columns: 1fr; gap: var(--space-3); } }

.portrait { position: relative; width: min(320px, 78%); margin-inline: auto; }
.portrait::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--gold); border-radius: 999px 999px var(--radius-md) var(--radius-md);
}
.portrait img {
  position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 999px 999px var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.portrait .tag {
  position: absolute; bottom: 10px; left: -12px;
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; color: var(--muted); box-shadow: var(--shadow-sm);
}
@media (max-width: 760px) {
  .hero .grid { grid-template-columns: 1fr; }
  .portrait { width: min(240px, 60%); order: -1; }
}

/* ---------- Fatti ---------- */
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--rule); margin-top: var(--space-8);
}
.facts > div { padding: var(--space-6) var(--space-6) var(--space-6) 0; }
.facts > div + div { border-left: 1px solid var(--rule); padding-left: var(--space-6); }
.facts .k { font-family: var(--font-display); font-size: clamp(1.5rem, 1rem + 1.5vw, 2.1rem); font-weight: 500; line-height: 1.1; }
.facts .v { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-2); }
@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; }
}

/* ---------- Pannello diagramma ---------- */
.art-panel {
  margin-block: var(--space-12); padding: clamp(var(--space-4), 3vw, var(--space-8));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.art-panel svg { width: 100%; height: auto; }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(var(--space-10), 6vw, var(--space-20)); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-8); }
.section-head h2 { font-size: var(--text-xl); }
.section-head .link-more { font-size: var(--text-sm); }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.cols > div { min-width: 0; }
.cols > div + div { border-left: 1px solid var(--rule); padding-left: var(--space-8); }
.cols h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.cols p { font-size: var(--text-sm); color: var(--fg); margin-bottom: var(--space-3); }
.cols p.detail { color: var(--muted); font-size: var(--text-xs); }

/* ── Galleria "Dalla carta al dato" ───────────────── */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-6); }
.gallery figure { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; display: block; }
.gallery .gallery-finale { grid-column: 1 / -1; }
.gallery .gallery-finale img { aspect-ratio: 2 / 1; }
.gallery figcaption { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-2); letter-spacing: 0.04em; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } .gallery .gallery-finale img { aspect-ratio: 3 / 2; } }
@media (max-width: 760px) {
  .cols { grid-template-columns: 1fr; gap: var(--space-6); }
  .cols > div + div { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: var(--space-6); }
}

/* ---------- Card ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.cards.one { grid-template-columns: minmax(0, 1fr); }
.cards.one .card { max-width: 780px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 2.5vw, var(--space-8));
  display: flex; flex-direction: column; gap: var(--space-3); min-width: 0;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in oklab, var(--teal) 35%, var(--border)); }
.card h3 { font-size: var(--text-lg); line-height: 1.25; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { font-size: var(--text-sm); }
.card p b { font-weight: 600; }
.card .more { margin-top: auto; padding-top: var(--space-2); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.card .more:hover { text-decoration: underline; }
.card .more .arrow { transition: transform var(--transition); display: inline-block; }
.card:hover .more .arrow { transform: translateX(4px); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } .cards.one .card { max-width: none; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--space-5); max-width: 780px; }
.faq h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.faq p { font-size: var(--text-base); color: var(--muted); }

/* ---------- Banner (teal) ---------- */
.banner {
  background: linear-gradient(in oklab, #1E5F63, #16484C);
  color: #F0EAD9; border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3.5vw, var(--space-10));
  box-shadow: var(--shadow-lg);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .banner, :root[data-theme="dark"] .banner { background: linear-gradient(in oklab, #0F4A4E, #0B3A3E); } }
.banner .eyebrow { color: var(--gold-soft); }
.banner p { margin-top: var(--space-3); font-size: var(--text-base); max-width: 60ch; }
.banner p strong { font-weight: 600; color: #FBF6E9; }
.banner .layout { display: grid; grid-template-columns: 1fr auto; gap: var(--space-6); align-items: center; }
.banner .btn { border-color: var(--gold-soft); color: var(--gold-soft); align-self: center; }
.banner .btn:hover { background: color-mix(in oklab, var(--gold-soft) 14%, transparent); transform: translateY(-2px); }
@media (max-width: 640px) { .banner .layout { grid-template-columns: 1fr; } }

/* ---------- Contatti ---------- */
.contacts-list { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-3) var(--space-6); font-size: var(--text-base); }
.contacts-list dt { color: var(--muted); font-size: var(--text-sm); padding-top: 2px; }
.contacts-list dd { user-select: all; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: var(--space-16); padding-block: var(--space-8) var(--space-10); }
.site-footer .payoff { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); margin-bottom: var(--space-3); }
.site-footer p { font-size: var(--text-sm); color: var(--muted); margin-bottom: var(--space-2); max-width: 75ch; }

/* ---------- Portfolio ---------- */
.page-hero { padding-block: clamp(var(--space-10), 6vw, var(--space-20)) var(--space-8); }
.page-hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.5vw, 3.8rem); margin-block: var(--space-4) var(--space-4); }
.page-hero .claim { font-size: var(--text-lg); color: var(--muted); max-width: 44em; }
.page-hero .contacts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-5); }
.page-hero .contacts a { text-decoration: none; }
.page-hero .contacts a:hover { text-decoration: underline; }

.schede-index { margin-block: var(--space-4) var(--space-10); }
.schede-index ol { list-style: none; margin-top: var(--space-4); }
.schede-index li .n { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--teal); }
.schede-index a { text-decoration: none; }
.schede-index li a { color: inherit; }
.schede-index li a:hover { color: var(--teal); }

.scheda { padding-block: clamp(var(--space-10), 6vw, var(--space-16)); border-top: 1px solid var(--rule); scroll-margin-top: var(--space-16); }
.scheda .scheda-head { display: flex; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-4); }
.scheda .num { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--teal); letter-spacing: 0.1em; }
.scheda h2 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.4rem); margin-bottom: var(--space-4); }
.scheda .lead { font-size: var(--text-lg); color: var(--muted); margin-bottom: var(--space-6); max-width: 46em; }
.scheda p { margin-bottom: var(--space-4); max-width: var(--prose); }
.scheda p b { font-weight: 600; }
.scheda ol, .scheda ul { margin: 0 0 var(--space-4); padding-left: 24px; max-width: var(--prose); }
.scheda ol li, .scheda ul li { margin-bottom: var(--space-2); }

.figures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); margin-block: var(--space-8); }
.figures figure { margin: 0; min-width: 0; }
.figures figure.wide { grid-column: 1 / -1; }
.figures img {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.figures figure:hover img { box-shadow: var(--shadow-lg); }
.figures figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-3); line-height: 1.5; }
.figures figcaption .fig { font-family: var(--font-mono); letter-spacing: 0.18em; color: var(--teal); margin-right: var(--space-2); }
@media (max-width: 700px) { .figures { grid-template-columns: 1fr; } }

.closing {
  margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px dashed var(--rule);
  font-size: var(--text-sm); color: var(--muted); max-width: var(--prose);
}
.closing b { font-weight: 600; color: var(--fg); }

/* ---------- Articoli (elenco) ---------- */
.article-list { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.article-list .card h2 { font-size: var(--text-lg); line-height: 1.3; }
.article-list .card h2 a { text-decoration: none; }

/* ── Blog ─────────────────────────────────────────── */
.blog-hero { padding-block: clamp(var(--space-10), 6vw, var(--space-20)) var(--space-8); border-bottom: 3px solid var(--gold); }
.blog-hero h1 { font-size: clamp(2.2rem, 1.2rem + 3.5vw, 3.8rem); margin-block: var(--space-4) var(--space-4); }
.blog-hero .claim { font-size: var(--text-lg); color: var(--muted); max-width: 44em; }
.post-list { display: grid; gap: var(--space-8); margin-top: var(--space-8); }
.post { display: grid; grid-template-columns: 88px 1fr; gap: var(--space-6); padding-block: var(--space-6); border-bottom: 1px solid var(--rule); text-decoration: none; }
.post:hover h2 { color: var(--teal); }
.post-date { font-family: var(--font-display); color: var(--gold); text-align: left; line-height: 1.05; }
.post-date .d { display: block; font-size: 2.4rem; font-weight: 500; }
.post-date .m { display: block; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; }
.post-date .y { display: block; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-1); }
.post-body .eyebrow { margin-bottom: var(--space-2); }
.post-body h2 { font-size: clamp(1.35rem, 1rem + 1.4vw, 1.8rem); line-height: 1.25; margin-bottom: var(--space-2); }
.post-body p { color: var(--muted); max-width: 52em; }
.post-more { display: inline-block; margin-top: var(--space-3); font-size: var(--text-sm); font-weight: 500; color: var(--teal); }
.blog-post .eyebrow a { color: var(--gold); }
@media (max-width: 640px) {
  .post { grid-template-columns: 64px 1fr; gap: var(--space-4); }
  .post-date .d { font-size: 1.8rem; }
}

/* ── Indice schede portfolio ───────────────────────── */
.schede-index ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.schede-index li { display: grid; grid-template-columns: 34px 1fr; gap: var(--space-3); align-items: baseline; font-size: var(--text-sm); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color 200ms ease; }
.schede-index li:hover { border-color: var(--teal); }
@media (max-width: 700px) { .schede-index ol { grid-template-columns: 1fr; } }
.article-list .card h2 a:hover { text-decoration: underline; }
.article-list .card .meta { font-size: var(--text-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: baseline; }
.article-list .card .meta a { font-weight: 500; }

/* ---------- Articolo (pagina) ---------- */
.article-page { max-width: 820px; }
.article-page .byline { font-family: var(--font-mono); font-size: var(--text-xs); color: #6B6257; margin-top: var(--space-5); letter-spacing: 0.04em; }
:root[data-theme="dark"] .article-page .byline { color: #B8AF9F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .article-page .byline { color: #B8AF9F; } }
.article-page h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.2rem); margin-block: var(--space-4) var(--space-4); }
.article-page .standfirst { font-size: var(--text-lg); color: var(--muted); max-width: 42em; margin-bottom: var(--space-4); }

article.body { max-width: var(--prose); }
article.body h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); margin-block: var(--space-10) var(--space-4); }
article.body h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); margin-block: var(--space-6) var(--space-2); }
article.body p { margin-bottom: var(--space-4); }
article.body ul, article.body ol { margin: 0 0 var(--space-4); padding-left: 24px; }
article.body li { margin-bottom: var(--space-2); }
article.body figure { margin-block: var(--space-8); }
article.body figure img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
article.body figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-3); }
article.body figcaption .fig { font-family: var(--font-mono); letter-spacing: 0.18em; color: var(--teal); margin-right: var(--space-2); }

figure.diagram {
  margin-block: var(--space-8); padding: clamp(var(--space-4), 3vw, var(--space-6));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
figure.diagram svg { width: 100%; height: auto; }
figure.diagram figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-4); }
figure.diagram figcaption .fig { font-family: var(--font-mono); letter-spacing: 0.18em; color: var(--teal); margin-right: var(--space-2); }

.table-wrap { overflow-x: auto; margin-block: var(--space-8); }
table.compare { border-collapse: collapse; width: 100%; font-size: var(--text-sm); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
table.compare th, table.compare td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--rule); }
table.compare th { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); font-weight: 500; background: var(--surface-2); }
table.compare td:first-child { font-weight: 600; white-space: nowrap; }
table.compare tr:last-child td { border-bottom: none; }
@media (max-width: 640px) { table.compare td:first-child { white-space: normal; } }

.related { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--rule); max-width: var(--prose); }
.related ul { list-style: none; margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.related a { text-decoration: none; }
.related a:hover { text-decoration: underline; }
.related .k { color: var(--muted); font-size: var(--text-sm); margin-right: var(--space-2); }

/* ---------- Nota LinkedIn / CTA articolo ---------- */
.note-box {
  margin-top: var(--space-10); padding: clamp(var(--space-5), 3vw, var(--space-8));
  background: var(--surface); border: 1px solid var(--border); border-left: none;
  border-radius: var(--radius-lg); max-width: 820px; box-shadow: var(--shadow-sm);
}
.note-box .eyebrow { margin-bottom: var(--space-2); display: block; }
.note-box p { font-size: var(--text-sm); }

/* ---------- Rivelazione allo scroll ---------- */
.reveal { opacity: 1; transform: none; }
.motion-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.motion-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .motion-ready .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Versione di stampa ---------- */
@media print {
  .motion-ready .reveal { opacity: 1; transform: none; }
  .site-header, .btn, .note-box, .site-footer { display: none; }
  body { background: #fff; }
}
