@charset "UTF-8";
/* =============================================================================
   MCH · UFFICIO — Corporate Design System
   IBM Plex Sans / Serif / Mono · cobalt blue · clean editorial
   ============================================================================= */

/* ---------------------------------------------------------------- TOKENS --- */
:root {
  /* Background & surface */
  --bg: #FAFBFC;
  --bg-elev: #FFFFFF;
  --bg-tint: #F0F4F8;
  --bg-dark: #0A0F1C;
  --bg-dark-2: #1A2235;

  /* Foreground */
  --fg: #0A0F1C;
  --fg-dim: #4A5568;
  --fg-deep: #718096;
  --fg-muted: #A0AEC0;

  /* Rules */
  --rule: #E5E8EC;
  --rule-soft: #F0F4F8;
  --rule-bright: #CBD5E0;

  /* Brand */
  --primary: #005CE6;
  --primary-deep: #004AC2;
  --primary-soft: #E8F1FE;
  --primary-text: #005CE6;

  /* Accents */
  --accent-red: #D73038;
  --accent-green: #059669;
  --accent-amber: #D97706;

  /* Typography */
  --f-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --f-serif: "IBM Plex Serif", Georgia, serif;
  --f-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  /* Layout */
  --gutter: clamp(1rem, 3vw, 2rem);
  --max-w: 1280px;
  --max-w-read: 880px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(10, 15, 28, .04);
  --sh-sm: 0 2px 8px rgba(10, 15, 28, .06);
  --sh-md: 0 8px 24px -8px rgba(10, 15, 28, .12);
  --sh-lg: 0 20px 60px -20px rgba(10, 15, 28, .18);

  /* Header height (for scroll-margin) */
  --header-h: 72px;
}

/* ---------------------------------------------------------------- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
input, textarea, select { font-family: inherit; font-size: inherit; }
::selection { background: var(--primary); color: #FFF; }

/* Scroll-margin so anchors don't hide behind sticky header */
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* -------------------------------------------------------------- HEADER --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}
.logo {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -.01em;
  color: var(--fg);
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--primary);
  color: #FFF;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--r-sm);
}
.site-nav {
  display: flex; gap: .35rem;
  justify-self: center;
}
.site-nav a {
  position: relative;
  color: var(--fg-dim);
  padding: .5rem .85rem;
  border-radius: var(--r-sm);
  font-size: .92rem;
  font-weight: 500;
  transition: color .15s, background .15s;
}
.site-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.site-nav a.active {
  color: var(--fg);
  font-weight: 600;
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: .85rem;
  right: .85rem;
  bottom: -2px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
.site-header .cta {
  background: var(--primary);
  color: #FFF;
  padding: .55rem 1rem;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--sh-xs);
  transition: background .15s;
}
.site-header .cta:hover { background: var(--primary-deep); }

/* Mobile nav toggle (kept hidden, progressive enhancement) */
.nav-toggle { display: none; }

@media (max-width: 920px) {
  .site-nav { display: none; }
  .site-header-inner { grid-template-columns: 1fr auto; }
}

/* -------------------------------------------------------------- LAYOUT --- */
main { min-height: 50vh; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.container-read { max-width: var(--max-w-read); margin: 0 auto; padding: 0 var(--gutter); }

/* Section */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--fg);
}
.section-head h2 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.section-head p {
  color: var(--fg-dim);
  max-width: 55ch;
  margin-top: .75rem;
  line-height: 1.55;
}
.section-head .eyebrow { margin-bottom: .5rem; }
.section-head .see-all {
  color: var(--primary);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.section-head .see-all:hover { color: var(--primary-deep); }
.section-head .see-all::after { content: " →"; transition: margin-left .2s; display: inline-block; }
.section-head .see-all:hover::after { margin-left: .15rem; }
@media (max-width: 680px) {
  .section-head { grid-template-columns: 1fr; }
}

/* Eyebrow */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow.muted { color: var(--fg-deep); }

/* Pill / badge */
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: .82rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  line-height: 1;
}
.pill .dot {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
}
.pill.neutral { background: var(--bg-tint); color: var(--fg-dim); }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem 1.05rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 500;
  color: var(--fg-dim);
  background: var(--bg-elev);
  transition: all .15s;
  cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--fg);
  border-color: var(--fg);
  color: #FFF;
}
.chip .n {
  opacity: .65;
  font-size: .82em;
  margin-left: .15rem;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.2;
  text-align: center;
  transition: all .15s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--fg);
  color: #FFF;
}
.btn-primary:hover { background: var(--bg-dark-2); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-bright);
}
.btn-secondary:hover { border-color: var(--fg); }
.btn-primary-blue {
  background: var(--primary);
  color: #FFF;
}
.btn-primary-blue:hover { background: var(--primary-deep); }

/* --------------------------------------------------------------- HERO --- */
.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .75fr);
  gap: 3.5rem;
  align-items: start;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 920px) {
  .hero-home { grid-template-columns: 1fr; gap: 2.5rem; }
}
.hero-home h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--fg);
  margin: 1.5rem 0;
}
.hero-home h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.hero-home p.lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: 55ch;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-trust {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.trust-label {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-deep);
  font-weight: 500;
}
.trust-value {
  font-family: var(--f-sans);
  font-size: .92rem;
  line-height: 1.45;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -.005em;
}

.hero-visual {
  aspect-ratio: 1/1;
  max-width: 340px;
  width: 100%;
  margin-left: auto;
  background-image: url('/assets/images/massimo-chirivi-bio.jpg');
  background-size: cover;
  background-position: center 22%;
  border-radius: var(--r-2xl);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
@media (max-width: 920px) {
  .hero-visual { max-width: 280px; margin: 0 auto; aspect-ratio: 1/1; }
}
.hero-visual .badge {
  position: absolute;
  bottom: 1rem; left: 1rem; right: 1rem;
  background: rgba(10, 15, 28, .82);
  backdrop-filter: blur(8px);
  color: #FFF;
  padding: .65rem .9rem;
  border-radius: var(--r-md);
  font-size: .78rem;
  line-height: 1.3;
}
.hero-visual .badge strong { display: block; font-weight: 600; margin-bottom: .1rem; font-size: .88rem; }
.hero-visual .badge span {
  color: #B0B8CC;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: block;
}

/* ---------------------------------------------------------- CARD GRID --- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 920px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* --------------------------------------------- BIO JUMP (home about) --- */
.bio-jump {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.bio-jump-head {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-deep);
  font-weight: 500;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}
.bio-jump ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.bio-jump li a {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .55rem .5rem;
  text-decoration: none;
  color: var(--fg);
  border-radius: 4px;
  transition: background .15s ease, padding-left .15s ease;
}
.bio-jump li a:hover {
  background: var(--primary-soft);
  padding-left: .85rem;
}
.bj-num {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: .04em;
  flex: 0 0 1.6rem;
}
.bj-label {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.3;
}
@media (max-width: 680px) {
  .bio-jump ul { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------- EXTERNAL FEEDS --- */
.feeds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
@media (max-width: 900px) { .feeds-grid { grid-template-columns: 1fr; } }

.feed-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.feed-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.feed-head h3 {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--fg);
  margin: 0;
}
.feed-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.feed-badge-aipsi {
  background: #FEE5E6;
  color: #B0272E;
  border: 1px solid #F6B9BD;
}
.feed-badge-github {
  background: #0A0F1C;
  color: #FFF;
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: -.02em;
  font-weight: 700;
}
/* Placeholder GitHub — under construction */
.feed-card-wip {
  position: relative;
  overflow: hidden;
}
.feed-card-wip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-45deg,
      transparent 0, transparent 20px,
      rgba(10, 15, 28, .02) 20px, rgba(10, 15, 28, .02) 40px);
  pointer-events: none;
}
.feed-wip {
  position: relative;
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  align-items: flex-start;
}
.wip-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .35rem .65rem;
  background: #FFF3CD;
  color: #7A5A00;
  border: 1px solid #FFD966;
  border-radius: 999px;
}
.wip-chip::before {
  content: "▲";
  font-size: .8em;
  color: #C08A00;
}
.wip-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -.01em;
}
.wip-desc {
  color: var(--fg-dim);
  font-size: .92rem;
  line-height: 1.55;
  margin: 0;
  max-width: 42ch;
}
.feed-link {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  flex: 0 0 auto;
}
.feed-link:hover { text-decoration: underline; }

.feed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.feed-list li + li {
  border-top: 1px dashed var(--rule);
}
.feed-list a {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .85rem 0;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.feed-list li:hover a {
  background: linear-gradient(90deg, var(--primary-soft) 0%, transparent 65%);
  padding-left: .6rem;
}
.feed-meta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.feed-date {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-deep);
}
.feed-source {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: .1rem .4rem;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary);
}
.feed-source-in-programma {
  background: #E6F4EA;
  color: #06915A;
}
.feed-source-archivio {
  background: #F0F0F3;
  color: var(--fg-deep);
}
.feed-source-news {
  background: #FEE5E6;
  color: #B0272E;
}
.feed-title {
  font-size: .98rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -.005em;
}
.feed-excerpt {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--fg-dim);
  margin-top: .15rem;
}
.feed-empty {
  color: var(--fg-deep);
  font-style: italic;
  font-size: .9rem;
  padding: 1rem 0;
}

/* Generic card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
  gap: .75rem;
  color: inherit;
}
.card:hover {
  border-color: var(--rule-bright);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

/* Service card */
.card-service .svc-icon {
  width: 44px; height: 44px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.card-service:hover .svc-icon { background: var(--primary); color: #FFF; }
.card-service h3 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.card-service p {
  color: var(--fg-dim);
  font-size: .95rem;
  line-height: 1.55;
  flex: 1;
}
.card-service .svc-link {
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  margin-top: .25rem;
}
.card-service .svc-link::after { content: " →"; transition: margin-left .2s; display: inline-block; }
.card-service:hover .svc-link::after { margin-left: .2rem; }

/* Article card */
.card-article .cat {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: .25rem .7rem;
  border-radius: 999px;
  align-self: flex-start;
}
.card-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--fg);
}
.card-article h3 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
}
.card-article p {
  color: var(--fg-dim);
  font-size: .93rem;
  line-height: 1.55;
  flex: 1;
}
.card-article .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
  font-size: .8rem;
  color: var(--fg-deep);
}
.card-article .foot time {
  font-family: var(--f-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.card-article .foot .read {
  color: var(--primary);
  font-weight: 600;
}
.card-article .foot .read::after { content: " →"; transition: margin-left .2s; display: inline-block; }
.card-article:hover .foot .read::after { margin-left: .2rem; }

/* -------------------------------------------------- FEATURED ARTICLE --- */
.featured-article {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1E3A5F 100%);
  color: #FFF;
  border-radius: var(--r-xl);
  padding: 3rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.featured-article::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(0, 92, 230, .3), transparent 60%);
  pointer-events: none;
}
.featured-article > * { position: relative; }
.featured-article .label {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #63A4FF;
  margin-bottom: 1rem;
}
.featured-article h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #FFF;
}
.featured-article h2 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: #63A4FF;
}
.featured-article p {
  color: #B0B8CC;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.featured-article .meta {
  display: flex; gap: 1rem;
  color: #B0B8CC;
  font-size: .82rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.featured-article .meta strong { color: #FFF; font-weight: 500; }
.featured-article .cta {
  display: inline-flex; gap: .5rem;
  padding: .85rem 1.35rem;
  background: var(--primary);
  color: #FFF;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: .9rem;
}
.featured-article .cta:hover { background: var(--primary-deep); }
.featured-article .visual {
  aspect-ratio: 4/5;
  background: linear-gradient(45deg, #FF6B6B, #C8321A);
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 3rem;
  color: #FFF;
  font-weight: 500;
}
.featured-article .visual.visual-cover {
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 880px) {
  .featured-article { grid-template-columns: 1fr; padding: 2rem; }
}

/* -------------------------------------------------------- ARTICLE PAGE --- */
.article-hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 2rem;
  text-align: center;
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--fg-deep);
  font-weight: 500;
  margin-bottom: 1.75rem;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--rule-bright); }

.article-title {
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: var(--fg);
  margin: 1.25rem 0;
  max-width: 24ch;
  margin-left: auto;
  margin-right: auto;
}
.article-title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.article-deck {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--fg-dim);
  max-width: 60ch;
  margin: 0 auto 2rem;
}
.article-byline {
  display: flex;
  justify-content: center; align-items: center;
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .86rem;
  color: var(--fg-deep);
  flex-wrap: wrap;
}
.article-byline .author { display: flex; align-items: center; gap: .65rem; }
.article-byline .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background-image: url('/assets/images/massimo-chirivi-bio.jpg');
  background-size: cover;
  background-position: center 18%;
}
.article-byline strong { color: var(--fg); font-weight: 600; }
.article-byline .dot { color: var(--rule-bright); }

.article-cover {
  max-width: 1080px;
  margin: 0 auto 3rem;
  padding: 0 var(--gutter);
}
.article-cover figure {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
  display: grid; place-items: center;
  position: relative;
}
.article-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.article-cover .cover-art {
  color: #FFF;
  text-align: center;
}
.article-cover .cover-art .num {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  opacity: .7;
  margin-bottom: .85rem;
}
.article-cover .cover-art .label {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -.02em;
  opacity: .95;
  line-height: 1.05;
}

.article-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 1080px) {
  .article-body { grid-template-columns: 1fr; gap: 2rem; max-width: 720px; }
}

.article-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  font-size: .88rem;
}
.article-aside h4 {
  font-size: .72rem;
  font-weight: 600;
  color: var(--fg-deep);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--rule);
}
.article-aside .block {
  padding: .65rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: .88rem;
}
.article-aside .block:last-child { border-bottom: 0; }
.article-aside .k {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--fg-deep);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}
.article-aside .v { color: var(--fg); font-weight: 500; }
.article-aside .v a { color: var(--primary); }
.article-aside .tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.article-aside .tags span {
  font-family: var(--f-mono);
  font-size: .7rem;
  color: var(--fg-dim);
  background: var(--bg-tint);
  padding: .2rem .5rem;
  border-radius: var(--r-sm);
}

.article-rail {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 500;
}
.article-rail .action {
  padding: .75rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  color: var(--fg-dim);
  display: flex; justify-content: space-between;
  align-items: center;
  transition: border-color .2s, color .2s;
}
.article-rail .action:hover { border-color: var(--primary); color: var(--primary); }

.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1F2937;
  max-width: 64ch;
}
.article-content > p:first-child::first-letter {
  font-family: var(--f-serif);
  font-weight: 500;
  float: left;
  font-size: 3.8em;
  line-height: .85;
  padding: .08em .12em 0 0;
  color: var(--primary);
}
.article-content p { margin-bottom: 1.25rem; }
.article-content p strong { color: var(--fg); font-weight: 600; }
.article-content p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--primary);
}
.article-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--fg);
  margin: 2.25rem 0 .85rem;
  line-height: 1.2;
  counter-increment: h2;
}
.article-content h2::before {
  content: counter(h2, decimal-leading-zero);
  display: block;
  font-family: var(--f-mono);
  font-size: .58em;
  letter-spacing: .12em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: .35rem;
}
.article-content h2 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.article-content h3 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 1.75rem 0 .65rem;
  letter-spacing: -.005em;
}
.article-content code {
  background: var(--bg-tint);
  color: var(--accent-red);
  font-family: var(--f-mono);
  font-size: .9em;
  padding: .12em .4em;
  border-radius: var(--r-sm);
}
.article-content pre {
  background: var(--bg-dark);
  color: #E0E7F1;
  border-radius: var(--r-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: var(--f-mono);
  font-size: .85rem;
  line-height: 1.55;
  position: relative;
}
.article-content pre::before {
  content: "TERMINAL";
  position: absolute;
  top: .65rem; right: 1rem;
  font-size: .62rem;
  letter-spacing: .15em;
  color: #4A5568;
}
.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.article-content blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--fg);
  line-height: 1.45;
}
.article-content blockquote cite {
  display: block;
  margin-top: .5rem;
  font-family: var(--f-sans);
  font-style: normal;
  font-size: .82rem;
  font-weight: 500;
  color: var(--fg-deep);
}
.article-content ul { padding-left: 0; margin: 1.15rem 0; }
.article-content ul li {
  padding: .35rem 0 .35rem 1.5rem;
  position: relative;
  line-height: 1.55;
}
.article-content ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .9em;
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
}
.article-content ol { padding-left: 1.5rem; margin: 1.15rem 0; counter-reset: ol; }
.article-content ol li { counter-increment: ol; padding: .3rem 0 .3rem .5rem; position: relative; line-height: 1.55; }
.article-content ol li::before {
  content: counter(ol) ".";
  position: absolute;
  left: -1.5rem;
  color: var(--primary);
  font-weight: 600;
  font-family: var(--f-mono);
  width: 1.4em;
  text-align: right;
}
.article-content a { color: var(--primary); border-bottom: 1px solid currentColor; }
.article-content hr {
  border: 0;
  margin: 2.25rem 0;
  height: 1px;
  background: var(--rule);
}
.article-content img {
  width: 100%;
  border-radius: var(--r-md);
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.article-content th, .article-content td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.article-content th { background: var(--bg-tint); font-weight: 600; }

/* Prev / next */
.prev-next {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
.pn-link {
  display: flex; flex-direction: column;
  gap: .4rem;
  padding: 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  transition: border-color .2s, transform .2s;
}
.pn-link:hover { border-color: var(--primary); transform: translateY(-2px); }
.pn-next { grid-column: 2; text-align: right; }
.pn-prev { grid-column: 1; }
.pn-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--fg-deep);
}
.pn-title {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--fg);
}
.pn-date {
  font-family: var(--f-mono);
  font-size: .75rem;
  color: var(--fg-deep);
}
@media (max-width: 680px) {
  .prev-next { grid-template-columns: 1fr; }
  .pn-prev, .pn-next { grid-column: 1; text-align: left; }
}

/* Related articles */
.related {
  max-width: 1080px;
  margin: 3rem auto 0;
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--rule);
}
.related h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

/* ----------------------------------------------------------- ARCHIVE --- */
.page-header {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
  align-items: end;
}
@media (max-width: 920px) { .page-header { grid-template-columns: 1fr; gap: 1.5rem; } }
.page-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: .5rem;
}
.page-header h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.page-header p {
  color: var(--fg-dim);
  max-width: 50ch;
  margin-top: .5rem;
  line-height: 1.55;
}

.stats-box {
  display: flex; gap: 2.25rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.stats-box .n {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--fg);
}
.stats-box .n em { font-style: normal; color: var(--primary); }
.stats-box .l {
  font-size: .75rem;
  color: var(--fg-deep);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 500;
  margin-top: .4rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}
@media (max-width: 680px) { .filter-bar { grid-template-columns: 1fr; } }
.search-field {
  display: flex; align-items: center; gap: .75rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: .65rem 1rem;
  transition: border-color .2s;
}
.search-field:focus-within { border-color: var(--primary); }
.search-field input {
  flex: 1;
  border: 0; outline: 0;
  font-size: .95rem;
  color: var(--fg);
  background: transparent;
}
.search-field input::placeholder { color: var(--fg-muted); }
.search-field .icon { color: var(--fg-deep); }
.sort-field {
  display: flex; align-items: center; gap: .5rem;
  font-size: .86rem;
  color: var(--fg-dim);
}
.sort-field select {
  padding: .55rem .85rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--fg);
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
}

.category-chips {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.pagination {
  display: flex; justify-content: center; gap: .35rem;
  margin-top: 2.5rem;
}
.pagination a,
.pagination span {
  padding: .6rem .85rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 500;
  color: var(--fg-dim);
  min-width: 40px;
  text-align: center;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current {
  background: var(--fg);
  border-color: var(--fg);
  color: #FFF;
}
.pagination .sep {
  border: none;
  background: transparent;
  color: var(--fg-muted);
}

/* ----------------------------------------------------------- PROFILE --- */
.profile-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
@media (max-width: 880px) { .profile-hero { grid-template-columns: 1fr; gap: 2rem; } }
.profile-photo {
  aspect-ratio: 4/5;
  background-image: url('/assets/images/massimo-chirivi-bio.jpg');
  background-size: cover;
  background-position: center 18%;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}
.profile-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin-bottom: 1rem;
}
.profile-hero h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.profile-hero .intro {
  color: var(--fg-dim);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 55ch;
}
.profile-hero .intro em { font-family: var(--f-serif); font-style: italic; color: var(--primary); }

.bio-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 880px) { .bio-section { grid-template-columns: 1fr; gap: 1rem; } }
.bio-section .label {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}
.bio-section .label .num {
  display: block;
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.bio-section .label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--fg);
}
.bio-section p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #1F2937;
  margin-bottom: 1rem;
  max-width: 65ch;
}
.bio-section p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--primary);
}
.bio-section p strong { color: var(--fg); font-weight: 600; }

/* Experience list (profile) */
.experience { display: grid; grid-template-columns: 1fr; }
.experience > li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.experience > li:first-child { padding-top: 0; }
.exp-dates {
  display: flex; flex-direction: column;
  gap: .15rem;
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: .04em;
  padding-top: .25rem;
}
.exp-dates .exp-to {
  color: var(--fg-deep);
  font-size: .72rem;
}
/* Highlight: esperienze ancora in corso */
.experience > li.exp-current {
  position: relative;
  background: linear-gradient(90deg, rgba(6,145,90,.06) 0%, transparent 55%);
  border-left: 3px solid #06915A;
  padding-left: 1.25rem;
  margin-left: -1.25rem;
  border-radius: 2px;
}
.exp-dates .exp-to-current {
  display: inline-block;
  color: #06915A;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border: 1px solid #06915A;
  border-radius: 999px;
  background: rgba(6,145,90,.08);
  width: fit-content;
}
.exp-live-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #06915A;
  box-shadow: 0 0 0 0 rgba(6,145,90,.55);
  margin-right: .5rem;
  vertical-align: middle;
  animation: exp-live-pulse 2.2s ease-out infinite;
}
@keyframes exp-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(6,145,90,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(6,145,90,0);   }
  100% { box-shadow: 0 0 0 0 rgba(6,145,90,0);     }
}
@media (prefers-reduced-motion: reduce) {
  .exp-live-dot { animation: none; }
}
.exp-role {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--fg);
  margin-bottom: .35rem;
  line-height: 1.25;
}
.exp-org {
  color: var(--fg-dim);
  margin-bottom: .75rem;
  line-height: 1.45;
}
.exp-location { color: var(--fg-deep); font-size: .9em; }
.exp-summary {
  font-style: italic;
  color: var(--fg-dim);
  margin-bottom: .65rem;
  max-width: 68ch;
}
.exp-bullets { margin: .5rem 0 0; padding: 0; }
.exp-bullets li {
  padding: .2rem 0 .2rem 1.25rem;
  position: relative;
  color: #1F2937;
  font-size: .95rem;
  line-height: 1.55;
  max-width: 68ch;
}
.exp-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: .75em;
  width: 5px; height: 5px;
  background: var(--primary);
  border-radius: 50%;
}
.exp-url {
  display: inline-block;
  margin-top: .5rem;
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--primary);
  border-bottom: 1px solid currentColor;
}
@media (max-width: 720px) {
  .experience > li { grid-template-columns: 1fr; gap: .5rem; }
  .exp-dates { flex-direction: row; gap: .75rem; }
}

/* Timeline (simple chronology in profile) */
.timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.timeline .year {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: .04em;
}
.timeline .event {
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
}
.timeline .event .sub {
  display: block;
  font-weight: 400;
  color: var(--fg-dim);
  font-size: .92rem;
  margin-top: .2rem;
}

/* Credentials grid */
.credentials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem 1.5rem;
  padding: 1.25rem 0;
}
.credentials > div {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.credentials dt {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--fg-deep);
  letter-spacing: .08em;
  text-transform: uppercase;
  min-width: 120px;
}
.credentials dd {
  color: var(--fg);
  font-size: .92rem;
  line-height: 1.4;
  flex: 1;
}
@media (max-width: 680px) { .credentials { grid-template-columns: 1fr; } }

/* Affiliations */
.affiliations > li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.aff-dates {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  color: var(--primary);
}
.aff-body { color: var(--fg); line-height: 1.45; }
.aff-body strong { font-weight: 600; }
.aff-desc { color: var(--fg-dim); font-size: .92rem; display: block; margin-top: .15rem; }
.aff-url { color: var(--primary); padding-left: .25rem; }
.aff-outro {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-tint);
  border-left: 3px solid var(--rule-bright);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--fg-dim);
  font-size: .95rem;
  line-height: 1.65;
  max-width: 75ch;
}
.aff-outro strong { color: var(--fg); font-weight: 600; }
@media (max-width: 680px) { .affiliations > li { grid-template-columns: 1fr; gap: .25rem; } }

/* -------------------------------------------------- PROFILE TABS --- */
.profile-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: rgba(250, 251, 252, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 0 calc(var(--gutter) * -1) 2.5rem;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab-btn {
  padding: .7rem 1.25rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: .92rem;
  font-weight: 600;
  color: var(--fg-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s, box-shadow .15s;
}
.profile-tab-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.profile-tab-btn.active {
  background: var(--fg);
  color: #FFF;
  border-color: var(--fg);
  box-shadow: var(--sh-sm);
}

.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

.profile-section {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}
.profile-section:last-child { border-bottom: 0; }
.profile-section-head { margin-bottom: 2rem; }
.profile-section-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--fg);
}
.profile-section-intro {
  color: var(--fg-dim);
  margin-top: .75rem;
  line-height: 1.6;
  font-size: 1rem;
  max-width: 65ch;
}
.profile-section-body {
  max-width: 880px;
}
.profile-subsection {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px dashed var(--border);
}
.profile-subsection:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.profile-subsection-title {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--fg);
  margin: 0 0 .25rem 0;
}
.profile-subsection .profile-section-intro {
  margin-top: .25rem;
  margin-bottom: 1.5rem;
}

/* Sottotitoli per pagina categoria (es. rassegna stampa · 2 gruppi) */
.subgroup-head {
  margin: 1rem 0 1.5rem 0;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}
.subgroup-head-sec {
  margin-top: 3.5rem;
}
.subgroup-head h2 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--fg);
  margin: 0 0 .3rem 0;
}
.subgroup-head p {
  color: var(--fg-dim);
  font-size: .9rem;
  line-height: 1.55;
  margin: 0;
  max-width: 60ch;
}

/* Timeline unificata Speaker (eventi + video) */
.speaker-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sp-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.5rem;
  padding: 1rem 0 1rem .5rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.sp-row.sp-video {
  background: linear-gradient(90deg, var(--primary-soft) 0%, transparent 70%);
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
  margin-left: -1rem;
  border-radius: 2px;
  transition: background .15s ease;
}
.sp-row.sp-video:hover {
  background: linear-gradient(90deg, #D7E7FE 0%, transparent 70%);
}
.sp-row.sp-video a {
  display: contents;
  text-decoration: none;
  color: inherit;
}
.sp-date {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--primary);
  padding-top: .15rem;
}
.sp-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.sp-badges {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.sp-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .14rem .48rem;
  border-radius: 3px;
  font-weight: 700;
}
.sp-badge-video {
  background: var(--primary);
  color: #fff;
}
.sp-badge-cat {
  background: var(--bg-elev);
  color: var(--fg-deep);
  border: 1px solid var(--rule);
}
.sp-title {
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -.005em;
}
.sp-sub {
  color: var(--fg-dim);
  font-size: .9rem;
  line-height: 1.55;
}
@media (max-width: 640px) {
  .sp-row { grid-template-columns: 1fr; gap: .4rem; }
}
.profile-prose p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1F2937;
  margin-bottom: 1.1rem;
  max-width: 68ch;
}
.profile-prose p strong { color: var(--fg); font-weight: 600; }
.profile-prose p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--primary);
}

/* Override bio-section to work without the old grid inside tabs */
.bio-section {
  display: block;
  grid-template-columns: unset;
  padding: 0;
  border-bottom: 0;
  gap: 0;
}
.bio-section .label { position: static; }

/* ---------------------------------------------------------- SERVICES --- */
.service-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.service-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 1rem 0;
}
.service-hero h1 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}
.service-hero .subtitle {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--fg-dim);
  line-height: 1.45;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.service-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 4rem;
}
@media (max-width: 1000px) { .service-body { grid-template-columns: 1fr; } }

.service-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.service-aside .block {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-soft);
}
.service-aside .block:last-child { border-bottom: 0; padding-bottom: 0; }
.service-aside .k {
  display: block;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--fg-deep);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .3rem;
}
.service-aside .v { color: var(--fg); font-weight: 500; font-size: .92rem; line-height: 1.45; }
.service-aside .v a { color: var(--primary); }
.service-aside .tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.service-aside .tags span {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--fg-dim);
  background: var(--bg-tint);
  padding: .2rem .5rem;
  border-radius: var(--r-sm);
}
.service-aside .aside-cta {
  display: block;
  padding: .75rem 1rem;
  background: var(--primary);
  color: #FFF;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
}
.service-aside .aside-cta:hover { background: var(--primary-deep); }

.service-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #1F2937;
  max-width: 68ch;
}
.service-content h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--fg);
  margin: 2.25rem 0 .75rem;
  letter-spacing: -.01em;
  counter-increment: h2;
}
.service-content h2:first-child { margin-top: 0; }
.service-content h2::before {
  content: counter(h2, decimal-leading-zero);
  display: block;
  font-family: var(--f-mono);
  font-size: .58em;
  letter-spacing: .12em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: .35rem;
}
.service-content p { margin-bottom: 1.15rem; }
.service-content p strong { color: var(--fg); font-weight: 600; }
.service-content p em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--primary);
}
.service-content ul, .service-content ol { margin: 1.15rem 0; padding-left: 0; }
.service-content ul li {
  padding: .35rem 0 .35rem 1.5rem;
  position: relative;
  line-height: 1.55;
}
.service-content ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .9em;
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
}
.service-content ol { padding-left: 1.5rem; counter-reset: ol; }
.service-content ol li { counter-increment: ol; padding: .3rem 0 .3rem .5rem; position: relative; line-height: 1.55; }
.service-content ol li::before {
  content: counter(ol) ".";
  position: absolute;
  left: -1.5rem;
  color: var(--primary);
  font-weight: 600;
  font-family: var(--f-mono);
  width: 1.4em;
  text-align: right;
}
.service-content a { color: var(--primary); border-bottom: 1px solid currentColor; }
.service-content code {
  background: var(--bg-tint);
  color: var(--accent-red);
  font-family: var(--f-mono);
  font-size: .9em;
  padding: .12em .4em;
  border-radius: var(--r-sm);
}

/* Service CTA (big card at end) */
.service-cta {
  margin-top: 3rem;
  padding: 3rem;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1E3A5F 100%);
  color: #FFF;
  border-radius: var(--r-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.service-cta::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(0, 92, 230, .3), transparent 60%);
  pointer-events: none;
}
.service-cta > * { position: relative; }
.service-cta .lead {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.service-cta .lead em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: #63A4FF;
}
.service-cta .note {
  color: #B0B8CC;
  font-size: .88rem;
  margin-top: 1.5rem;
}
.service-cta .note a { color: #63A4FF; border-bottom: 1px solid currentColor; }
.service-cta .email {
  display: inline-block;
  margin: 1rem 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  color: #FFF;
  border-bottom: 1px solid #63A4FF;
  padding-bottom: .15rem;
}
.service-cta .email:hover { color: #63A4FF; }

/* --------------------------------------------------- SERVICES INDEX --- */
.services-category {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.services-category:last-child { border-bottom: 0; }

/* ---------------------------------------------------------- VIDEOS --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.video-card {
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.video-card:hover { border-color: var(--rule-bright); transform: translateY(-2px); box-shadow: var(--sh-md); }
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-dark);
  cursor: pointer;
  overflow: hidden;
}
.video-embed img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s, filter .3s;
}
.video-embed:hover img { transform: scale(1.02); }
.video-embed iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.video-embed .play-button {
  position: absolute; inset: 0;
  margin: auto;
  width: 60px; height: 60px;
  color: #FFF;
  background: rgba(10, 15, 28, .6);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s, color .2s, transform .2s;
}
.video-embed .play-button svg { width: 32px; height: 32px; transform: translateX(2px); }
.video-embed:hover .play-button { background: var(--primary); color: #FFF; transform: scale(1.08); }
.video-embed .video-cat-tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FFF;
  background: var(--primary);
  padding: .25rem .55rem;
  border-radius: var(--r-sm);
}
.video-embed .video-ts-tag {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 500;
  color: #FFF;
  background: rgba(10, 15, 28, .75);
  padding: .25rem .55rem;
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
}
.video-card-body { padding: 1.15rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.video-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--fg);
}
.video-meta {
  display: flex; flex-wrap: wrap;
  gap: .5rem;
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .05em;
  color: var(--fg-deep);
}
.video-event { color: var(--fg); }
.video-desc { color: var(--fg-dim); font-size: .88rem; line-height: 1.55; }
.video-yt-link {
  margin-top: auto;
  padding-top: .7rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--rule-soft);
  padding-top: .75rem;
}
.video-yt-link:hover { color: var(--primary-deep); }
.video-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }

/* ------------------------------------------------------------ FILMS --- */
.film-list > li {
  border-bottom: 1px solid var(--rule-soft);
  transition: background .2s;
}
.film-list > li:hover { background: var(--bg-tint); }
.film-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.35rem .75rem;
}
.film-year {
  font-family: var(--f-mono);
  font-weight: 600;
  color: var(--primary);
  text-align: right;
  font-size: .88rem;
  padding-top: .15rem;
}
.film-title {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--fg);
  margin-bottom: .35rem;
}
.film-original {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--fg-dim);
  font-weight: 400;
  font-size: .88em;
}
.film-meta {
  display: flex; flex-wrap: wrap;
  gap: .65rem;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--fg-deep);
  margin-bottom: .55rem;
}
.film-director { color: var(--fg-dim); }
.film-cat {
  color: var(--primary);
  padding-left: .55rem;
  border-left: 1px solid var(--rule);
}
.film-note {
  font-size: .94rem;
  line-height: 1.55;
  color: #1F2937;
  max-width: 72ch;
}
.film-footer-note {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  text-align: center;
  font-style: italic;
  color: var(--fg-dim);
}
.film-footer-note a { color: var(--primary); border-bottom: 1px solid currentColor; }

/* ------------------------------------------------------------ HOME: article list --- */
.articoli-list { border-top: 1px solid var(--rule); }
.articoli-list > li { border-bottom: 1px solid var(--rule-soft); }
.articoli-list a {
  display: grid;
  grid-template-columns: 56px 1fr auto 32px;
  gap: 1.5rem;
  padding: 1.35rem .5rem;
  align-items: baseline;
  transition: background .2s, padding .25s;
}
.articoli-list a:hover { background: var(--bg-tint); padding-left: 1rem; }
.articolo-num {
  font-family: var(--f-mono);
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .04em;
}
.articoli-list h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--fg);
  margin-bottom: .2rem;
}
.articoli-list h3 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--fg-dim);
}
.articolo-sub {
  font-family: var(--f-mono);
  font-size: .72rem;
  color: var(--fg-deep);
  letter-spacing: .04em;
}
.articolo-sub .cat-tag, .articolo-sub .cat {
  color: var(--primary);
  font-weight: 600;
}
.articolo-date {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.articolo-arrow {
  font-family: var(--f-mono);
  color: var(--fg-muted);
  text-align: right;
  font-size: 1.05rem;
  transition: color .2s, transform .2s;
}
.articoli-list a:hover .articolo-arrow { color: var(--primary); transform: translate(3px, -2px); }
@media (max-width: 680px) {
  .articoli-list a { grid-template-columns: 44px 1fr; gap: 1rem; }
  .articolo-date, .articolo-arrow { display: none; }
}

/* ----------------------------------------------------------- FOOTER --- */
footer.site-footer {
  max-width: var(--max-w);
  margin: 4rem auto 0;
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  font-size: .88rem;
  color: var(--fg-dim);
}
.site-footer h4 {
  color: var(--fg);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: 1rem;
  letter-spacing: .02em;
}
.site-footer a { display: block; padding: .3rem 0; transition: color .15s; }
.site-footer a:hover { color: var(--primary); }
.site-footer .brand {
  font-weight: 700;
  color: var(--fg);
  font-size: 1.05rem;
  margin-bottom: .5rem;
  display: block;
}
.site-footer .brand-desc {
  max-width: 36ch;
  line-height: 1.55;
  margin-bottom: 1rem;
}
.site-footer .footer-contact {
  font-style: normal;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--fg-deep);
  margin-bottom: .9rem;
}
.site-footer .footer-contact strong {
  display: block;
  color: var(--fg);
  font-weight: 600;
  font-size: .86rem;
  margin-bottom: .15rem;
}
.site-footer .footer-contact .fc-kv {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: .7rem;
  margin-right: .75rem;
}
.site-footer .footer-contact .fc-kv em {
  font-style: normal;
  color: var(--fg-deep);
  font-weight: 600;
  margin-right: .25rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.site-footer .footer-contact a {
  display: inline;
  padding: 0;
  color: var(--primary);
}
.site-footer .footer-base {
  grid-column: 1 / -1;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--fg-deep);
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 880px) { footer.site-footer { grid-template-columns: 1fr 1fr; } }

/* Contact block on home */
.contact-block {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1E3A5F 100%);
  color: #FFF;
  border-radius: var(--r-xl);
  padding: 4rem 3rem;
  text-align: center;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.contact-block::before {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(0, 92, 230, .25), transparent 60%);
  pointer-events: none;
}
.contact-block > * { position: relative; }
.contact-block h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  max-width: 24ch;
  margin: 0 auto 1rem;
  color: #FFF;
}
.contact-block h2 em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: #63A4FF;
}
.contact-block p { color: #B0B8CC; max-width: 50ch; margin: 0 auto 2rem; }
.contact-block .btns { display: inline-flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.contact-block .email-link {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #FFF;
  border-bottom: 1px solid #63A4FF;
  padding-bottom: .2rem;
  margin: 1rem auto 1.5rem;
  display: inline-block;
}
.contact-block .email-link:hover { color: #63A4FF; }

/* -------------------------------------------------------------- MISC --- */
/* Reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}
[data-reveal].visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
