:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #141418;
  --surface-2: #1b1b21;
  --line: #2a2a32;
  --text: #f3f1ee;
  --muted: #b3b0aa;
  --accent: #ff6a1a;
  --accent-ink: #1a0b02;
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 650; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .9rem; color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { top: 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 13, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; }
.menu { display: flex; align-items: center; gap: 28px; }
.menu a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 0; }
.menu a:hover { color: var(--text); }
.menu .menu-contact { color: var(--accent-ink); background: var(--accent); padding: 8px 18px; border-radius: 999px; font-weight: 600; }
.menu .menu-contact:hover { color: var(--accent-ink); filter: brightness(1.1); }
.menu-btn { display: none; background: none; color: var(--text); border: 1px solid #6b6b75; border-radius: 10px; padding: 8px 16px; font: inherit; cursor: pointer; }

/* buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: #6b6b75; color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover, .btn-ghost:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); background: radial-gradient(60% 60% at 80% 20%, rgba(255, 106, 26, .13), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.2em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin-bottom: 1.6em; }
.hero-art svg { width: 100%; height: auto; max-width: 440px; margin-inline: auto; }
.ring { fill: none; stroke: var(--line); stroke-dasharray: 3 7; }
.spoke { stroke: var(--line); stroke-width: 1.5; }
.node-bg { fill: var(--surface-2); stroke: var(--tint); stroke-width: 1.5; }
.node-ic { fill: none; stroke: var(--tint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.core-glow { fill: rgba(255, 106, 26, .18); }
.core { fill: var(--accent); }
.sat { fill: var(--muted); opacity: .45; }
/* impulsi e aloni: invisibili da fermi, compaiono solo con l'animazione */
.pulse, .node-halo { opacity: 0; }
.pulse line { stroke: var(--tint); stroke-width: 2; stroke-linecap: round; opacity: .4; }
.pulse circle { fill: var(--tint); }
.node-halo { fill: none; stroke: var(--tint); stroke-width: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  /* entrata: i raggi crescono dal centro, poi i nodi compaiono in sequenza */
  .spoke { transform-origin: 200px 200px; animation: grow .8s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * 70ms) backwards; }
  .node { transform-origin: 12px 12px; animation: pop .6s cubic-bezier(.3, 1.4, .5, 1) calc(.35s + var(--i) * 90ms) backwards; }
  /* regime: respiro dei nodi, orbita lenta, un impulso al secondo che gira tra i sei raggi */
  .node-float { animation: breathe 6s ease-in-out calc(var(--i) * -1.1s) infinite alternate; }
  .orbit { transform-origin: 200px 200px; animation: spin 120s linear infinite; }
  .pulse { animation: travel 6s calc(1.2s + var(--i) * 1s) infinite; }
  .node-halo { transform-origin: 12px 12px; animation: ping 6s ease-out calc(1.2s + var(--i) * 1s) infinite; }
  .core-glow { animation: pulse 3.6s ease-in-out infinite; transform-origin: 200px 200px; }
  .hero-art.is-paused * { animation-play-state: paused; }
  @keyframes pulse { 50% { transform: scale(1.35); opacity: .5; } }
  @keyframes grow { from { transform: scaleX(0); } }
  @keyframes pop { from { transform: scale(.4); opacity: 0; } }
  @keyframes breathe { to { transform: translateY(-3px); } }
  @keyframes spin { to { transform: rotate(360deg); } }
  /* 0-22%: dal bordo del nucleo (16) al bordo del nodo (118); poi pausa fino al giro successivo */
  @keyframes travel {
    0% { transform: translateX(16px); opacity: 0; animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
    4% { opacity: 1; }
    20% { opacity: 1; }
    23%, 100% { transform: translateX(118px); opacity: 0; }
  }
  @keyframes ping {
    0%, 21% { transform: scale(1); opacity: 0; }
    23% { transform: scale(1); opacity: .75; }
    45%, 100% { transform: scale(1.7); opacity: 0; }
  }
}

/* sections */
section { padding: clamp(48px, 7vw, 88px) 0; }
.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2.2em; }
.intro { border-block: 1px solid var(--line); background: var(--surface); }
.intro p { color: var(--muted); font-size: 1.15rem; margin: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.card { --tint: var(--accent); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; isolation: isolate; overflow: hidden; overflow: clip; transition: border-color .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--tint); opacity: .85; transform-origin: left; transition: opacity .25s ease; }
/* bagliore del colore del progetto: sotto il contenuto (isolation), solo opacity */
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--tint) 11%, transparent), transparent 60%); opacity: 0; transition: opacity .35s ease; }
.card:hover, .card:focus-within { border-color: color-mix(in srgb, var(--tint) 60%, var(--line)); }
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card:hover::after, .card:focus-within::after { opacity: 1; }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 14%, var(--surface-2)); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.arr { display: inline-block; transition: transform .25s ease; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-4px); }
  .card:hover .ico, .card:focus-within .ico { transform: rotate(-6deg) scale(1.08); }
  .btn-card:hover .arr, .btn-card:focus-visible .arr { transform: translateX(4px); }
  .card:hover::before { animation: sweep .5s cubic-bezier(.2, .7, .2, 1); }
  @keyframes sweep { from { transform: scaleX(.2); } }
}
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--tint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cat { margin: 0 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--tint); font-weight: 600; }
.value { font-weight: 600; font-size: 1.05rem; line-height: 1.4; }
.card p { color: var(--muted); }
.card .value { color: var(--text); }
.aud { font-size: .95rem; }
.aud span { color: var(--text); font-weight: 600; margin-right: 4px; }
.status { align-self: flex-start; font-size: .8rem; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.card details { margin: 4px 0 22px; border-top: 1px solid var(--line); padding-top: 12px; font-size: .95rem; }
.card summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 4px 0; }
.card details ul { margin: 0 0 1em; padding-left: 1.2em; color: var(--muted); }
.card details li { margin-bottom: .35em; }
.note { font-size: .88rem; border-left: 3px solid var(--tint); padding-left: 12px; }
.btn-card { margin-top: auto; text-align: center; border-color: var(--line); background: var(--surface-2); color: var(--text); }
.btn-card:hover, .btn-card:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* skills */
.skills { background: var(--surface); border-block: 1px solid var(--line); }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 960px) { .skill-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .skill-list { grid-template-columns: 1fr; } }
.skill-list li { border-top: 2px solid var(--accent); padding-top: 14px; }
.skill-list h3 { font-size: 1.1rem; margin-bottom: .4em; }
.skill-list p { color: var(--muted); font-size: .97rem; margin: 0; }

.final-cta { background: radial-gradient(50% 80% at 50% 100%, rgba(255, 106, 26, .14), transparent 70%); }
.final-cta p { color: var(--muted); }
.final-cta .actions { margin-top: 1.5em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-h { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4em; }
.site-footer a { text-decoration: none; color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* consent */
.consent { position: fixed; inset: auto 16px 16px 16px; max-width: 560px; margin-left: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; z-index: 90; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.consent[hidden] { display: none; }
.consent p { font-size: .92rem; color: var(--muted); }
.consent .actions { justify-content: flex-start; }
.consent .btn { padding: 9px 20px; }

/* reveal allo scroll: main.js aggiunge .reveal-on e .reveal solo se c'è IntersectionObserver;
   lo stato nascosto esiste solo con movimento consentito, quindi senza JS o con reduce tutto è visibile */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .reveal:not(.is-in) { opacity: 0; }
  .reveal-on .reveal.is-in { animation: rise .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms) backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}
@media print { .reveal-on .reveal { opacity: 1 !important; animation: none !important; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 300px; margin-inline: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
  .js .menu-btn { display: inline-block; }
  .js .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; }
  .js .menu.open { display: flex; }
  .js .menu a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .js .menu .menu-contact { margin-top: 14px; text-align: center; border: 0; }
  .menu { gap: 16px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* effetti moderni: tutti decorativi, solo con movimento consentito dove animano */
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(243, 241, 238, .09) 1px, transparent 1.2px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(70% 80% at 70% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 70% 30%, #000, transparent 75%); }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -160px; z-index: -1; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 60, .22), transparent 65%); filter: blur(40px); }
.hero h1 { background: linear-gradient(100deg, var(--text) 35%, #ffc299 62%, var(--accent) 92%); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.card::after { background: radial-gradient(380px circle at var(--mx, 0%) var(--my, 0%), color-mix(in srgb, var(--tint) 18%, transparent), transparent 65%); }
.card { background-image: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%); }
.skill-list li { background: var(--surface-2); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 14px; padding: 20px; transition: border-color .25s ease, transform .3s ease; }
.skill-list li:hover { border-color: var(--accent); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #ff9a3d, #ff4d2e); transform: scaleX(0); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { background-size: 200% 100%; animation: shine 9s ease-in-out infinite alternate; }
  @keyframes shine { from { background-position: 0 0; } to { background-position: 100% 0; } }
  .hero::after { animation: drift 14s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translate(-90px, 70px) scale(1.15); } }
  .skill-list li:hover { transform: translateY(-4px); }
  .hero-art { transition: transform .25s ease-out; transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .site-header::after { animation: progress linear both; animation-timeline: scroll(root); }
    @keyframes progress { to { transform: scaleX(1); } }
  }
}

/* pagina privacy e pulsante nel footer */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.legal { padding: clamp(40px, 7vw, 88px) 0; }
.legal .wrap { max-width: 760px; }
.legal h2 { font-size: 1.25rem; margin-top: 2em; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--text); }

/* ---------- anteprime dei progetti ---------- */
.shot { margin: 0 0 20px; }
.shot-frame { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset; transform: perspective(900px) rotateX(var(--sx, 0deg)) rotateY(var(--sy, 0deg)); transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .25s ease; will-change: transform; }
.card:hover .shot-frame, .card:focus-within .shot-frame { border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); }
.shot-bar { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; background: #1f1f26; border-bottom: 1px solid var(--line); font-size: .7rem; color: var(--muted); }
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: #3a3a44; }
.shot-bar i:first-child { background: color-mix(in srgb, var(--tint) 70%, #3a3a44); }
.shot-bar span { margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--bg); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; }
.shot-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
/* riflesso che attraversa il vetro al passaggio del puntatore */
.shot-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .10) 50%, transparent 65%); transform: translateX(-100%); }
/* ImplantaDoc: nessuna schermata pubblica, pannello grafico dichiaratamente non-UI */
.shot-art { position: absolute; inset: 0; display: grid; place-items: center; perspective: 600px; background: radial-gradient(60% 80% at 50% 40%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%), linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 22px 22px, var(--surface-2); }
.shot-art svg { width: 30%; height: auto; fill: none; stroke: var(--tint); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--tint) 55%, transparent)); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover .shot-media img { transform: scale(1.045); }
  .card:hover .shot-media::after { transition: transform .9s ease; transform: translateX(100%); }
  .shot-art svg { animation: turn 9s ease-in-out infinite alternate; }
  @keyframes turn { from { transform: rotateY(-28deg) rotateX(8deg); } to { transform: rotateY(28deg) rotateX(-8deg); } }
}
/* entrata 3D legata allo scroll: la finestra si raddrizza mentre entra nel viewport */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shot { animation: shot-in linear both; animation-timeline: view(); animation-range: entry 5% cover 35%; transform-origin: 50% 100%; }
    @keyframes shot-in { from { transform: perspective(900px) rotateX(32deg) translateY(24px) scale(.94); opacity: .35; } }
  }
}

/* ---------- scena 3D dell'hero (canvas, solo con JS e movimento consentito) ---------- */
.hero-art { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin-inline: auto; display: grid; place-items: center; }
.hero-art svg { transition: opacity .6s ease; }
.hero-3d { position: absolute; inset: -6%; width: 112%; height: 112%; max-width: calc(100vw - 8px); opacity: 0; transition: opacity .8s ease; }
.hero-art.is-3d .hero-3d { opacity: 1; }
.hero-art.is-3d svg { opacity: 0; }
@media (max-width: 860px) { .hero-art { max-width: 320px; } .hero-3d { inset: 0; width: 100%; height: 100%; } }

/* ---------- scene 3D di sezione (canvas creati da main.js) ---------- */
.has-fx { position: relative; isolation: isolate; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.fx.on { opacity: 1; }
.intro.has-fx { padding-bottom: clamp(140px, 18vw, 220px); }
.intro .fx { -webkit-mask-image: linear-gradient(to bottom, transparent 40%, #000 75%); mask-image: linear-gradient(to bottom, transparent 40%, #000 75%); }
.final-cta .fx { -webkit-mask-image: radial-gradient(42% 34% at 50% 50%, rgba(0, 0, 0, .25), #000 100%); mask-image: radial-gradient(42% 34% at 50% 50%, rgba(0, 0, 0, .25), #000 100%); }
.final-cta { padding-block: clamp(80px, 12vw, 160px); }

/* ---------- cubi 3D delle competenze ---------- */
.cube { display: block; width: 34px; height: 34px; margin: 2px 0 18px 4px; perspective: 260px; }
.cube-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(38deg); }
.cube i { position: absolute; inset: 0; border: 1.5px solid var(--accent); border-radius: 5px; background: rgba(255, 106, 26, .08); box-shadow: inset 0 0 12px rgba(255, 106, 26, .25); }
.cube i:nth-child(1) { transform: translateZ(17px); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(17px); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(17px); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(17px); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(17px); background: rgba(255, 106, 26, .22); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(17px); }
@media (prefers-reduced-motion: no-preference) {
  .cube-in { animation: cube 10s linear calc(var(--i, 0) * -2.5s) infinite; }
  .skill-list li:hover .cube-in { animation-duration: 2.4s; }
  @keyframes cube { from { transform: rotateX(-24deg) rotateY(0deg); } 50% { transform: rotateX(30deg) rotateY(180deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
}

/* ---------- entrate 3D legate allo scroll ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .portfolio h2, .skills h2, .final-cta h2 { transform-origin: 50% 100%; animation: h-in linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
    @keyframes h-in { from { opacity: 0; transform: perspective(700px) rotateX(-75deg) translateY(24px); } }
    .card { --cry: 0deg; animation: card-in linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; transform-origin: 50% 100%; }
    .card:nth-child(3n+1) { --cry: 22deg; }
    .card:nth-child(3n) { --cry: -22deg; }
    @keyframes card-in { from { opacity: 0; transform: perspective(1200px) rotateY(var(--cry)) rotateX(16deg) translateY(70px) scale(.9); } }
    .skill-list li { transform-origin: 0 50%; animation: flip-in linear both; animation-timeline: view(); animation-range: entry 0% cover 32%; }
    .skill-list li:nth-child(2) { animation-range: entry 8% cover 38%; }
    .skill-list li:nth-child(3) { animation-range: entry 16% cover 44%; }
    .skill-list li:nth-child(4) { animation-range: entry 24% cover 50%; }
    @keyframes flip-in { from { opacity: 0; transform: perspective(900px) rotateY(-80deg) translateX(-20px); } }
    .final-cta .actions { animation: depth-in linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
    @keyframes depth-in { from { opacity: 0; transform: perspective(600px) translateZ(-260px); } }
  }
}
