/* ==========================================================
   Fabio Scialanga — sito personale
   Tema scuro "premium tech". Nessuna dipendenza esterna.
   ========================================================== */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0d1b27;
  --bg-alt: #112332;
  --surface: #172c3d;
  --surface-2: #1d3547;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --text: #f3f7fb;
  --muted: #b4c3d3;
  --dim: #8496aa;
  --teal: #4fe3c1;
  --cyan: #38bdf8;
  --violet: #8f7cf8;
  --grad: linear-gradient(100deg, var(--teal) 0%, var(--cyan) 50%, var(--violet) 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
  background-image:
    radial-gradient(1100px 700px at 12% 22%, rgba(79, 227, 193, .10), transparent 65%),
    radial-gradient(1000px 760px at 92% 48%, rgba(143, 124, 248, .12), transparent 65%),
    radial-gradient(1100px 700px at 30% 82%, rgba(56, 189, 248, .10), transparent 65%);
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
::selection { background: rgba(79, 227, 193, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--teal); color: #04110e; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Barra di avanzamento ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- Navigazione ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 14px var(--gutter); transition: padding .3s var(--ease); }
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; display: flex; align-items: center; gap: 24px;
  padding: 10px 12px 10px 20px; border: 1px solid transparent; border-radius: 999px;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.nav.is-stuck .nav__inner {
  background: rgba(15, 31, 45, .72); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
.brand__mark { display: flex; align-items: center; justify-content: center; white-space: nowrap; width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #04110e; font-weight: 700; font-size: 16px; }
.brand__mark i { font-style: normal; }
.brand__name { font-size: 16px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--muted); transition: color .2s, background .2s; }
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); background: rgba(255, 255, 255, .07); }
.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 24px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15.5px; line-height: 1;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn--sm { padding: 11px 18px; font-size: 14px; }
.btn--primary { background: var(--grad); color: #04110e; box-shadow: 0 8px 30px rgba(56, 189, 248, .22); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(79, 227, 193, .35); }
.btn--ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, .03); }
.btn--ghost:hover { border-color: rgba(79, 227, 193, .6); background: rgba(79, 227, 193, .08); transform: translateY(-2px); }

/* ---------- Tipografia di sezione ---------- */
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 12px; }
.eyebrow b { color: var(--teal); font-weight: 500; }
.eyebrow b::after { content: " /"; color: var(--dim); }
.eyebrow--pill { padding: 8px 16px 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, .03); letter-spacing: .1em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(79, 227, 193, .6); animation: pulse 2.2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(79, 227, 193, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 227, 193, 0); } }

.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); border-block: 1px solid var(--line); }
.head { max-width: 820px; margin-bottom: clamp(40px, 6vw, 72px); }
.head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.04; letter-spacing: -.035em; margin-top: 18px; text-wrap: balance; }
.head__sub { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); margin-top: 20px; max-width: 640px; }
.head--center { margin-inline: auto; text-align: center; }
.head--center .head__sub { margin-inline: auto; }
.head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.head--row > div { max-width: 820px; }

/* ---------- Card con riflesso al passaggio del mouse ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .04)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(79, 227, 193, .13), transparent 60%); }
.spot:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-strong); }

/* ---------- Animazioni di ingresso ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; padding: clamp(110px, 14vh, 150px) 0 clamp(40px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: clamp(36px, 5vw, 64px); overflow: hidden; isolation: isolate; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: .9; }
.hero__glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero__glow--a { width: 620px; height: 620px; left: -180px; top: -200px; background: rgba(79, 227, 193, .26); }
.hero__glow--b { width: 700px; height: 700px; right: -240px; top: 10%; background: rgba(143, 124, 248, .28); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 180px; background: linear-gradient(transparent, var(--bg)); z-index: -1; }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__title { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5vw, 70px); line-height: 1.02; letter-spacing: -.04em; margin-top: 22px; }
.hero__name { display: block; font-family: var(--mono); font-weight: 400; font-size: clamp(14px, 1.3vw, 16px); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; line-height: 1.4; }
.hero__lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 600px; margin-top: 22px; }
.hero__typed { font-family: var(--mono); font-size: 14.5px; color: var(--muted); margin-top: 16px; min-height: 1.6em; }
.hero__prompt { color: var(--teal); margin-right: 6px; }
.typed { color: var(--text); }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--teal); vertical-align: -3px; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Console illustrativa */
.hero__visual { position: relative; perspective: 1200px; }
.console { border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(160deg, rgba(30, 52, 71, .92), rgba(15, 31, 45, .92)); box-shadow: 0 40px 100px rgba(0, 0, 0, .55), 0 0 0 1px rgba(79, 227, 193, .06), inset 0 1px 0 rgba(255, 255, 255, .06); overflow: hidden; transform: rotateY(-9deg) rotateX(5deg); transform-style: preserve-3d; transition: transform .5s var(--ease); }
.console__bar, .mock__bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.console__bar i, .mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.console__bar span, .mock__bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__body { padding: 22px; display: grid; gap: 18px; }
.msg { padding: 14px 16px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.msg--user { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); justify-self: end; max-width: 88%; border-bottom-right-radius: 4px; }
.msg--ai { background: rgba(79, 227, 193, .07); border: 1px solid rgba(79, 227, 193, .22); border-bottom-left-radius: 4px; display: grid; gap: 14px; }
.msg__label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 74px; }
.bars i { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--cyan), rgba(143, 124, 248, .55)); transform-origin: bottom; animation: grow 1.4s var(--ease) both; }
.bars i:nth-child(2) { animation-delay: .1s; } .bars i:nth-child(3) { animation-delay: .2s; } .bars i:nth-child(4) { animation-delay: .3s; } .bars i:nth-child(5) { animation-delay: .4s; } .bars i:nth-child(6) { animation-delay: .5s; }
@keyframes grow { from { transform: scaleY(0); } }
.flow { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; }
.flow__node { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.flow__node--hot { color: #04110e; background: var(--grad); border-color: transparent; font-weight: 600; }
.flow__line { flex: 1; height: 1px; min-width: 12px; background: linear-gradient(90deg, transparent, var(--teal), transparent); background-size: 200% 100%; animation: slide 2.2s linear infinite; }
@keyframes slide { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.chip { position: absolute; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--muted); background: rgba(24, 44, 61, .9); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: float 7s ease-in-out infinite; white-space: nowrap; }
.chip b { color: var(--teal); font-family: var(--mono); font-weight: 500; margin-right: 8px; }
.chip--a { left: -26px; bottom: 18%; }
.chip--b { right: -14px; top: -20px; animation-delay: -3.5s; }
@keyframes float { 50% { transform: translateY(-12px); } }

/* Numeri */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(24, 44, 61, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.stats li { padding: 20px 26px; display: grid; gap: 6px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats strong { font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2vw, 23px); letter-spacing: -.02em; line-height: 1.15; }
.stats li:first-child strong { font-size: clamp(38px, 4.4vw, 54px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stats span { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.stats strong span { color: inherit; font-size: inherit; }

/* Nastro scorrevole */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee 42s linear infinite; }
.marquee__track span { font-family: var(--mono); font-size: 13.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 48px; white-space: nowrap; }
.marquee__track span::after { content: "✦"; color: var(--teal); font-size: 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   PROFILO
   ============================================================ */
.profile { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.profile__text { display: grid; gap: 20px; color: var(--muted); font-size: 18px; }
.profile__text .lead { color: var(--text); font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.5vw, 29px); line-height: 1.3; letter-spacing: -.02em; }
.profile__side { display: grid; gap: 20px; position: sticky; top: 110px; }
.quote { padding: 32px; }
.quote blockquote { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -.02em; }
.quote figcaption { margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.manifesto { padding: 32px; font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.6vw, 31px); line-height: 1.15; letter-spacing: -.03em; border-color: rgba(79, 227, 193, .25); }

/* ============================================================
   COMPETENZE
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill { padding: clamp(26px, 3vw, 38px); display: grid; gap: 14px; align-content: start; }
.skill__n { font-family: var(--mono); font-size: 13px; color: var(--teal); }
.skill h3 { font-family: var(--display); font-weight: 600; font-size: clamp(23px, 2.4vw, 29px); letter-spacing: -.025em; line-height: 1.15; }
.skill p { color: var(--muted); }
.skill--hot { border-color: rgba(79, 227, 193, .3); background: linear-gradient(150deg, rgba(79, 227, 193, .1), rgba(143, 124, 248, .06) 60%, rgba(255, 255, 255, .015)); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li { font-family: var(--mono); font-size: 12px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }

.approach { margin-top: clamp(48px, 6vw, 80px); }
.approach__title { font-family: var(--mono); font-weight: 400; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.steps li { position: relative; padding: 26px 24px 0 0; border-top: 1px solid var(--line-strong); font-family: var(--display); font-weight: 500; font-size: clamp(17px, 1.7vw, 20px); line-height: 1.3; letter-spacing: -.015em; }
.steps li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 16px var(--teal); }
.steps li span { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--teal); margin-bottom: 10px; font-weight: 400; }

/* ============================================================
   PROGETTI
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 14.5px; font-weight: 500; transition: all .25s; display: inline-flex; align-items: center; gap: 8px; }
.filter i { font-style: normal; font-family: var(--mono); font-size: 11.5px; opacity: .7; }
.filter:hover { color: var(--text); border-color: rgba(79, 227, 193, .5); }
.filter.is-active { background: var(--text); color: #0d1b27; border-color: var(--text); }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { display: flex; flex-direction: column; }
.project.is-hidden { display: none; }
.project:hover { transform: translateY(-6px); }
.project__visual { position: relative; aspect-ratio: 16 / 10; padding: 20px; background: radial-gradient(120% 120% at 0% 0%, rgba(56, 189, 248, .14), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(143, 124, 248, .16), transparent 55%), var(--surface); border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.project__visual--img { padding: 18px 18px 0; place-items: end center; }
.project__visual--img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-radius: 10px 10px 0 0; border: 1px solid var(--line-strong); border-bottom: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); transition: transform .6s var(--ease); }
.project:hover .project__visual--img img { transform: translateY(-6px) scale(1.02); }
.project__note { position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 6px; background: rgba(11, 24, 35, .8); color: var(--muted); border: 1px solid var(--line); }
.project__body { padding: 24px; display: grid; gap: 10px; flex: 1; align-content: start; }
.project__kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); display: flex; justify-content: space-between; gap: 12px; }
.project__kicker span { color: var(--dim); }
.project h3 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.project__body > p:not([class]) { color: var(--muted); font-size: 16px; }
.project__meta { margin-top: auto; padding-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-size: 11.5px; }
.status--done { color: var(--teal); border-color: rgba(79, 227, 193, .4); background: rgba(79, 227, 193, .08); }
.status--wip { color: #fbbf24; border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }

/* Mockup illustrativi */
.mock { width: 100%; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(11, 24, 35, .75); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); overflow: hidden; transition: transform .6s var(--ease); }
.project:hover .mock { transform: scale(1.03); }
.mock__bar { padding: 9px 12px; font-size: 10.5px; }
.mock__bar i { width: 7px; height: 7px; }
.mock__chat { padding: 14px; display: grid; gap: 8px; }
.bubble { font-size: 12.5px; line-height: 1.4; padding: 9px 11px; border-radius: 10px; }
.bubble--q { background: rgba(255, 255, 255, .07); justify-self: end; max-width: 90%; }
.bubble--a { background: rgba(79, 227, 193, .1); border: 1px solid rgba(79, 227, 193, .25); justify-self: start; color: var(--teal); }
.mock__route { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.mock__arch { padding: 16px 12px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.node { font-family: var(--mono); font-size: 10.5px; padding: 7px 8px; border-radius: 7px; border: 1px solid var(--line-strong); color: var(--muted); text-align: center; white-space: nowrap; }
.node--hub { background: var(--grad); color: #04110e; border-color: transparent; font-weight: 600; box-shadow: 0 0 30px rgba(79, 227, 193, .35); }
.node__col { display: grid; gap: 6px; }
.mock__pipe { padding: 14px; display: grid; gap: 8px; counter-reset: p; }
.mock__pipe li { counter-increment: p; font-size: 12.5px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); display: flex; align-items: center; gap: 10px; color: var(--muted); }
.mock__pipe li::before { content: counter(p); font-family: var(--mono); font-size: 10.5px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); flex: none; }
.mock__pipe li b { margin-left: auto; font-family: var(--mono); font-size: 10px; font-weight: 500; padding: 2px 6px; border-radius: 5px; background: rgba(143, 124, 248, .2); color: #c4b9ff; }
.mock__pipe li.ok { color: var(--teal); border-color: rgba(79, 227, 193, .3); background: rgba(79, 227, 193, .08); }
.mock__pipe li.ok::before { content: "✓"; background: var(--teal); color: #04110e; }
.mock__cols { padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mock__cols div { display: grid; gap: 6px; align-content: start; }
.mock__cols b { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mock__cols i { height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.mock__cols div:nth-child(2) i:first-of-type { background: rgba(79, 227, 193, .14); border-color: rgba(79, 227, 193, .3); }
.mock__cols div:nth-child(1) i:nth-of-type(2) { background: rgba(56, 189, 248, .14); border-color: rgba(56, 189, 248, .3); }
.mock__cols div:nth-child(3) i:nth-of-type(3) { background: rgba(143, 124, 248, .16); border-color: rgba(143, 124, 248, .3); }

/* Progetti storici */
.legacy { margin-top: clamp(64px, 8vw, 110px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.legacy__head { position: sticky; top: 110px; display: grid; gap: 14px; }
.legacy__head h3 { font-family: var(--display); font-weight: 600; font-size: clamp(27px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.03em; }
.legacy__head > p:last-child { color: var(--muted); font-size: 15.5px; }
.legacy__list li { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); transition: padding .3s var(--ease), background .3s; }
.legacy__list li:last-child { border-bottom: 1px solid var(--line); }
.legacy__list li:hover { padding-left: 14px; background: linear-gradient(90deg, rgba(79, 227, 193, .06), transparent 70%); }
.legacy__list time { font-family: var(--mono); font-size: 13px; color: var(--teal); padding-top: 4px; }
.legacy__list h4 { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.015em; line-height: 1.3; }
.legacy__list h4 span { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--dim); letter-spacing: .04em; margin-left: 10px; white-space: nowrap; }
.legacy__list p { color: var(--muted); font-size: 15.5px; margin-top: 6px; }

/* ============================================================
   PERCORSO
   ============================================================ */
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.journey::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 1px; background: linear-gradient(90deg, var(--line-strong), var(--teal)); }
.journey li { position: relative; padding: 0 22px 0 0; }
.journey__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; color: var(--muted); position: relative; margin-bottom: 24px; }
.journey li.is-now .journey__n { background: var(--grad); color: #04110e; border-color: transparent; font-weight: 600; box-shadow: 0 0 0 6px rgba(79, 227, 193, .12), 0 0 30px rgba(79, 227, 193, .5); }
.journey h3 { font-family: var(--display); font-weight: 600; font-size: clamp(17px, 1.6vw, 20px); letter-spacing: -.015em; line-height: 1.25; }
.journey p { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.journey li.is-now h3 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.people { margin-top: clamp(48px, 6vw, 80px); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.people h3 { font-family: var(--display); font-weight: 600; font-size: clamp(25px, 3vw, 38px); line-height: 1.1; letter-spacing: -.03em; }
.people p { color: var(--muted); font-size: 18px; }

/* ============================================================
   FORMAZIONE
   ============================================================ */
.certs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.certs li { padding: 28px; grid-column: span 2; display: grid; gap: 8px; align-content: start; }
.certs li:nth-child(1), .certs li:nth-child(2) { grid-column: span 3; }
.certs__k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.certs h3 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2vw, 25px); letter-spacing: -.02em; line-height: 1.2; }
.certs p { color: var(--muted); font-size: 15.5px; }

/* ============================================================
   NEWS
   ============================================================ */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news__empty { grid-column: 1 / -1; padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.news__updated { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; }
.news__updated[hidden], #newsMore[hidden] { display: none; }
.news-card { display: flex; flex-direction: column; }
.news-card:hover { transform: translateY(-6px); }
.news-card__cover { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface); }
.news-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.news-card:hover .news-card__cover img { transform: scale(1.05); }
.news-card__art { position: absolute; inset: 0; background:
  radial-gradient(90% 120% at var(--ax, 15%) 0%, hsl(var(--hue, 165) 80% 60% / .5), transparent 60%),
  radial-gradient(90% 120% at calc(100% - var(--ax, 15%)) 100%, hsl(calc(var(--hue, 165) + 70) 80% 65% / .42), transparent 60%),
  var(--surface); }
.news-card__art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.news-card__art::after { content: attr(data-n); position: absolute; right: 18px; bottom: 4px; font-family: var(--display); font-weight: 700; font-size: 96px; line-height: 1; letter-spacing: -.05em; color: rgba(255, 255, 255, .13); }
.news-card__tag { position: absolute; left: 14px; top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 7px; background: rgba(11, 24, 35, .78); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.news-card__body { padding: 24px; display: grid; gap: 12px; flex: 1; align-content: start; }
.news-card time { font-family: var(--mono); font-size: 12px; color: var(--teal); letter-spacing: .06em; text-transform: uppercase; }
.news-card h3 { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.news-card__summary { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.news-card__why { font-size: 14.5px; line-height: 1.55; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(79, 227, 193, .06); border-left: 2px solid var(--teal); color: var(--text); }
.news-card__why b { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.news-card__src { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.news-card__src:hover { color: var(--teal); }
.news__more { display: flex; justify-content: center; margin-top: 36px; }

/* ============================================================
   CONTATTI + FOOTER
   ============================================================ */
.contact { overflow: hidden; }
.contact__glow { position: absolute; left: 50%; top: 0; width: min(900px, 120vw); height: 520px; transform: translate(-50%, -35%); background: radial-gradient(closest-side, rgba(79, 227, 193, .2), rgba(56, 189, 248, .1) 45%, transparent 70%); pointer-events: none; }
.contact .head h2 { font-size: clamp(40px, 7vw, 88px); }
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 980px; margin-inline: auto; }
.contact__item { padding: 26px 28px; display: grid; gap: 6px; }
.contact__item--main { grid-column: 1 / -1; padding: 34px 36px; border-color: rgba(79, 227, 193, .3); }
.contact__item:hover { transform: translateY(-4px); border-color: rgba(79, 227, 193, .55); }
.contact__k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.contact__v { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 1.9vw, 22px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.contact__item--main .contact__v { font-size: clamp(22px, 3.6vw, 42px); }
.contact__go { position: absolute; right: 24px; top: 22px; color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.contact__item:hover .contact__go { transform: translate(4px, -4px); color: var(--teal); }

.footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--dim); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__motto { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.footer a:hover { color: var(--teal); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .projects, .news { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: 1fr; gap: 0; }
  .journey::before { left: 17px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, var(--line-strong), var(--teal)); }
  .journey li { padding: 0 0 30px 60px; }
  .journey li:last-child { padding-bottom: 0; }
  .journey__n { position: absolute; left: 0; top: -6px; margin: 0; }
  .legacy { grid-template-columns: 1fr; }
  .legacy__head, .profile__side { position: static; }
}
@media (max-width: 900px) {
  .nav__links { position: fixed; inset: 78px var(--gutter) auto var(--gutter); flex-direction: column; gap: 2px; padding: 12px; margin: 0; background: rgba(15, 31, 45, .96); border: 1px solid var(--line-strong); border-radius: 22px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 14px 16px; font-size: 17px; border-radius: 14px; }
  .nav__toggle { display: block; }
  .nav__cta { margin-left: auto; }
  .nav__inner { padding-left: 12px; gap: 10px; }
  .hero__grid, .profile, .people { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; }
  .console { transform: none; }
  .chip--a { left: 8px; bottom: -18px; }
  .chip--b { right: 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .certs li, .certs li:nth-child(1), .certs li:nth-child(2) { grid-column: span 3; }
  .certs li:last-child { grid-column: 1 / -1; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand__name { display: none; }
  .bento, .projects, .news { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .certs li, .certs li:nth-child(1), .certs li:nth-child(2) { grid-column: 1 / -1; }
  .stats li { padding: 20px; }
  .legacy__list li { grid-template-columns: 1fr; gap: 6px; }
  .legacy__list h4 span { display: block; margin: 4px 0 0; }
  .hero__cta .btn { flex: 1; }
  .flow { flex-wrap: wrap; }
  .flow__line { display: none; }
  .footer__inner { flex-direction: column; text-align: center; }
  .head--row { align-items: flex-start; }
}

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