/* ==========================================================================
   GT Onepage — mobile first. Accento: il giallo dello scuolabus.
   ========================================================================== */

:root {
	color-scheme: dark;
	--bg: #0b1020;
	--bg-alt: #0e1530;
	--surface: #141c3a;
	--surface-2: #1b2548;
	--line: rgb(255 255 255 / 0.09);
	--text: #e9edf8;
	--muted: #9ba7c6;
	--accent: #ffb21e;
	--accent-ink: #1a1200;
	--accent-2: #6d8dff;
	--shadow: 0 20px 50px -20px rgb(0 0 0 / 0.6);
	--radius: 18px;
	--header-h: 68px;
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
	color-scheme: light;
	--bg: #f6f7fb; --bg-alt: #eef0f8; --surface: #ffffff; --surface-2: #f1f3fb;
	--line: rgb(15 23 42 / 0.1); --text: #0f172a; --muted: #55607a;
	--accent: #f0a000; --accent-ink: #1a1200; --accent-2: #3457e6;
	--shadow: 0 20px 45px -22px rgb(15 23 42 / 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

.gt-container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.gt-container--narrow { width: min(760px, 100% - 40px); }
.gt-accent { color: var(--accent); }
.gt-icon { flex: none; }
.gt-top-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; scroll-margin-top: 200px; }
.gt-skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top .2s; }
.gt-skip:focus { top: 12px; }

/* Tema: scuro di default per tutti; chiaro solo se scelto col pulsante (data-theme="light") */
.gt-only-light { display: none; }
:root[data-theme="light"] .gt-only-light { display: block; }
:root[data-theme="light"] .gt-only-dark { display: none; }

/* ---------- Progress + header ---------- */
.gt-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.gt-progress span { display: block; height: 100%; width: 100%; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.gt-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); }
/* Il vetro sfocato sta su ::before e NON sull'header: backdrop-filter su un elemento lo rende
   "contenitore" dei figli position:fixed, e il menu mobile a tutto schermo ci finirebbe schiacciato dentro. */
.gt-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.gt-header.is-stuck::before, .gt-header:has(.gt-nav.is-open)::before { opacity: 1; }
.gt-header:has(.gt-nav.is-open)::before { background: var(--bg); }
.gt-header__in { height: 100%; display: flex; align-items: center; gap: 16px; }
.gt-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; margin-right: auto; }
.gt-brand:hover { color: inherit; }
.gt-brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: .9rem; font-weight: 800; transition: transform .4s var(--ease); }
.gt-brand:hover .gt-brand__mark { transform: rotate(-8deg) scale(1.06); }
.gt-brand__name { display: none; }
@media (min-width: 480px) { .gt-brand__name { display: block; } }

.gt-header__tools { display: flex; align-items: center; gap: 6px; }
.gt-iconbtn, .gt-burger { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: transparent; transition: background .2s, transform .2s; }
.gt-iconbtn:hover, .gt-burger:hover { background: var(--surface); }
.gt-burger { gap: 0; position: relative; }
.gt-burger span { position: absolute; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.gt-burger span:nth-child(1) { transform: translateY(-6px); }
.gt-burger span:nth-child(3) { transform: translateY(6px); }
.gt-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.gt-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.gt-burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

/* Menu: pannello a tutto schermo su mobile, inline su desktop */
.gt-nav { position: fixed; inset: var(--header-h) 0 0 0; height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
	background: var(--bg); padding: 12px 24px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column;
	opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.gt-nav.is-open { opacity: 1; visibility: visible; }
.gt-nav ul { counter-reset: nav; display: flex; flex-direction: column; margin: auto 0; }
.gt-nav li { counter-increment: nav; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.gt-nav li:last-child { border-bottom: 0; }
.gt-nav.is-open li { opacity: 1; transform: none; }
.gt-nav.is-open li:nth-child(1) { transition-delay: .05s; } .gt-nav.is-open li:nth-child(2) { transition-delay: .10s; } .gt-nav.is-open li:nth-child(3) { transition-delay: .15s; }
.gt-nav.is-open li:nth-child(4) { transition-delay: .20s; } .gt-nav.is-open li:nth-child(5) { transition-delay: .25s; } .gt-nav.is-open li:nth-child(6) { transition-delay: .30s; }
.gt-nav a { display: flex; align-items: baseline; gap: 16px; padding: 20px 4px; font-size: clamp(1.7rem, 8vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; text-decoration: none; }
.gt-nav a::before { content: counter(nav, decimal-leading-zero); font: 600 .8rem/1 var(--mono); letter-spacing: .1em; color: var(--accent); min-width: 2ch; }
.gt-nav a::after { content: "→"; margin-left: auto; font-weight: 400; font-size: 1.4rem; color: var(--muted); opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .25s var(--ease); }
.gt-nav a:active::after, .gt-nav a.is-active::after { opacity: 1; transform: none; color: var(--accent); }
.gt-nav a.is-active { color: var(--accent); }
html:not(.js) .gt-nav { position: static; height: auto; padding: 0; opacity: 1; visibility: visible; background: none; }
html:not(.js) .gt-nav ul { flex-direction: row; flex-wrap: wrap; margin: 0; }
html:not(.js) .gt-nav li { opacity: 1; transform: none; border: 0; }
html:not(.js) .gt-nav a::before, html:not(.js) .gt-nav a::after { content: none; }
html:not(.js) .gt-nav a { font-size: .95rem; padding: 8px 10px; }
html:not(.js) .gt-burger { display: none; }

@media (min-width: 860px) {
	.gt-burger { display: none; }
	.gt-nav { position: static; inset: auto; height: auto; overflow: visible; background: none; padding: 0; display: block; opacity: 1; visibility: visible; }
	.gt-nav ul { flex-direction: row; gap: 2px; margin: 0; }
	.gt-nav li { border: 0; opacity: 1; transform: none; transition: none; }
	.gt-nav a { position: relative; display: block; font-size: .93rem; font-weight: 500; letter-spacing: 0; line-height: inherit; padding: 9px 14px; color: var(--muted); transition: color .2s; }
	.gt-nav a::before { content: none; }
	.gt-nav a:hover, .gt-nav a.is-active { color: var(--text); }
	.gt-nav a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; margin: 0; height: 2px; border-radius: 2px; background: var(--accent); opacity: 1; transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
	.gt-nav a.is-active::after { transform: scaleX(1); }
}

/* ---------- Bottoni ---------- */
.gt-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .97rem; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, background .2s, border-color .2s; }
.gt-btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 28px -12px var(--accent); }
.gt-btn--primary:hover { color: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--accent); }
.gt-btn--primary .gt-icon { transition: transform .25s var(--ease); }
.gt-btn--primary:hover .gt-icon { transform: translateX(3px); }
.gt-btn--ghost { border-color: var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.gt-btn--ghost:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.gt-btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Hero ---------- */
.gt-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 28px) 0 84px; overflow: hidden; isolation: isolate; }
.gt-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.gt-hero__glow { position: absolute; inset: 0; z-index: -2; filter: blur(70px); opacity: .4; }
.gt-hero__glow i { position: absolute; border-radius: 50%; animation: gt-float 16s ease-in-out infinite alternate; }
.gt-hero__glow i:nth-child(1) { width: 42vmax; height: 42vmax; left: -12vmax; top: -14vmax; background: color-mix(in srgb, var(--accent-2) 55%, transparent); }
.gt-hero__glow i:nth-child(2) { width: 34vmax; height: 34vmax; right: -10vmax; top: 10vmax; background: color-mix(in srgb, var(--accent) 40%, transparent); animation-duration: 20s; animation-delay: -6s; }
.gt-hero__glow i:nth-child(3) { width: 26vmax; height: 26vmax; left: 30%; bottom: -14vmax; background: color-mix(in srgb, #b26bff 35%, transparent); animation-duration: 24s; animation-delay: -12s; }
@keyframes gt-float { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); } }

.gt-hero__grid { display: grid; gap: 40px; align-items: center; }
.gt-hero__photo { order: -1; justify-self: center; width: min(60vw, 300px); }
.gt-kicker { font: 600 .8rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.gt-kicker__n { opacity: .55; margin-right: 6px; }
.gt-hero__title { font-size: clamp(2.6rem, 8.5vw, 5.4rem); font-weight: 800; letter-spacing: -0.045em; }
.gt-hero__headline { font-size: clamp(1.2rem, 2.8vw, 1.7rem); font-weight: 600; margin: 18px 0 10px; color: var(--text); text-wrap: balance; }
.gt-typed { font: 500 1rem/1.4 var(--mono); color: var(--muted); margin: 0 0 18px; min-height: 1.5em; }
.gt-typed__prompt { color: var(--accent); margin-right: 6px; }
.gt-typed__caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--accent); animation: gt-blink 1s steps(2) infinite; }
@keyframes gt-blink { 50% { opacity: 0; } }
.gt-hero__lead { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
.gt-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 26px; }

.gt-portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 32% 32% 30% 30% / 26% 26% 24% 24%; padding: 5px; background: conic-gradient(from var(--a, 0deg), var(--accent), var(--accent-2), #b26bff, var(--accent)); animation: gt-spin 9s linear infinite; box-shadow: var(--shadow); }
.gt-portrait picture, .gt-portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; background: var(--surface); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes gt-spin { to { --a: 360deg; } }

@media (min-width: 860px) {
	.gt-hero__grid { grid-template-columns: 1.25fr .75fr; gap: 56px; }
	.gt-hero__photo { order: 0; width: min(100%, 380px); justify-self: end; }
}

.gt-social { display: flex; flex-wrap: wrap; gap: 10px; }
.gt-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 60%, transparent); transition: transform .25s var(--ease), color .2s, border-color .2s; }
.gt-social a:hover { transform: translateY(-3px); color: var(--accent); border-color: var(--accent); }

.gt-scrollcue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; opacity: .7; }
.gt-scrollcue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: gt-cue 1.8s var(--ease) infinite; }
@keyframes gt-cue { 0% { transform: translateY(0); opacity: 1; } 80%, 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- Sezioni ---------- */
.gt-section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
.gt-section--alt { background: var(--bg-alt); }
.gt-section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.gt-section__title { font-size: clamp(2rem, 5.2vw, 3.3rem); font-weight: 800; letter-spacing: -0.035em; }
.gt-section__intro { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 16px 0 0; }
.gt-h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.gt-h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gt-h3:not(:first-child) { margin-top: 44px; }
.gt-prose { color: var(--muted); font-size: 1.05rem; }
.gt-prose > :last-child { margin-bottom: 0; }
.gt-prose h3 { color: var(--text); font-size: 1.15rem; margin: 1.4em 0 .5em; }
.gt-prose strong, .gt-prose a { color: var(--text); }
.gt-prose--narrow { max-width: 70ch; margin-bottom: 44px; }

/* About */
.gt-banner { position: relative; margin: 0 0 clamp(36px, 5vw, 60px); border-radius: calc(var(--radius) + 8px); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: var(--surface); }
@media (min-width: 860px) { .gt-banner { aspect-ratio: 21 / 9; } }
.gt-banner picture, .gt-banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.gt-banner img { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); will-change: transform; }
.gt-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .55)); pointer-events: none; }
.gt-banner figcaption { position: absolute; left: 20px; bottom: 16px; z-index: 1; color: #fff; font: 500 .8rem/1.3 var(--mono); letter-spacing: .04em; }
.gt-about__grid { display: grid; gap: 36px; }
@media (min-width: 860px) { .gt-about__grid { grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: start; } }
.gt-infos { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gt-infos__row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.gt-infos__row:last-child { border-bottom: 0; }
.gt-infos dt { font: 600 .72rem/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.gt-infos dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

/* Resume */
.gt-resume__grid { display: grid; gap: 52px; }
@media (min-width: 860px) { .gt-resume__grid { grid-template-columns: 1.2fr 1fr; gap: 72px; } }
.gt-timeline { position: relative; padding-left: 26px; }
.gt-timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--line)); border-radius: 2px; }
.gt-timeline__item { position: relative; padding-bottom: 30px; }
.gt-timeline__item:last-child { padding-bottom: 0; }
.gt-timeline__item::before { content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--accent); transition: background .3s, box-shadow .3s; }
.gt-timeline__item:hover::before { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); }
.gt-timeline__years { font: 600 .78rem/1.4 var(--mono); color: var(--accent); margin: 0 0 6px; letter-spacing: .06em; }
.gt-timeline__title { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
.gt-timeline__title span { color: var(--muted); font-weight: 500; }
.gt-timeline__text { color: var(--muted); margin: 8px 0 0; }

.gt-skills { display: grid; gap: 16px; }
.gt-skill { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.gt-skill__name { font-weight: 600; }
.gt-skill__val { font: 500 .8rem/1.9 var(--mono); color: var(--muted); }
.gt-skill__bar { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.gt-skill__bar i { display: block; height: 100%; width: var(--level); border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: 0 50%; }
.js .gt-skill__bar i { transform: scaleX(0); transition: transform 1.1s var(--ease) calc(var(--i, 0) * 60ms + 150ms); }
.js .gt-skill.is-in .gt-skill__bar i { transform: none; }

.gt-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.gt-tags li { padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600; transition: transform .25s var(--ease), border-color .2s, color .2s, background .2s; }
.gt-tags li:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
/* Il primo gruppo (AI) è quello che conta di più: pieno, col colore d'accento */
.gt-h3:first-child + .gt-tags li { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gt-h3:first-child + .gt-tags li:hover { color: var(--accent-ink); }

/* My personal work: una card per app, con i link agli store */
.gt-apps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.gt-app { display: flex; }
.gt-app__in { position: relative; display: flex; flex-direction: column; gap: 18px; width: 100%; padding: clamp(22px, 3vw, 30px); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: transform .4s var(--ease), border-color .25s, box-shadow .4s; }
.gt-app__in::before { content: ""; position: absolute; inset: 0; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.gt-app__in:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.gt-app__in:hover::before { opacity: 1; }
.gt-app__in > * { position: relative; }
.gt-app__head { display: flex; align-items: center; gap: 16px; }
.gt-app__icon { flex: none; width: 76px; height: 76px; border-radius: 22.5%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .55); transition: transform .4s var(--ease); }
.gt-app__in:hover .gt-app__icon { transform: scale(1.06) rotate(-3deg); }
.gt-app__icon img { width: 100%; height: 100%; object-fit: cover; }
.gt-app__letter { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.gt-app__title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.gt-app__tag { font: 500 .74rem/1.4 var(--mono); color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 0; }
.gt-app__text { color: var(--muted); margin: 0; flex: 1; }
.gt-app__stores { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.gt-store { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: .88rem; font-weight: 600; text-decoration: none; transition: border-color .2s, color .2s, transform .25s var(--ease); }
.gt-store:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Contact: solo e-mail, grande e centrale */
.gt-contact__in { text-align: center; }
.gt-contact .gt-section__head { margin-bottom: 20px; }
.gt-contact .gt-kicker { justify-content: center; }
.gt-contact__text { max-width: 52ch; margin: 0 auto 36px; font-size: 1.12rem; }
.gt-mail { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 0; }
.gt-mail__link { display: inline-flex; align-items: center; gap: 16px; max-width: 100%; padding: clamp(16px, 2.6vw, 24px) clamp(20px, 4vw, 40px); border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: clamp(1.05rem, 3.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere; transition: transform .35s var(--ease), border-color .25s, color .2s; }
.gt-mail__link .gt-icon { color: var(--accent); transition: transform .35s var(--ease); }
.gt-mail__link:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.gt-mail__link:hover .gt-icon { transform: rotate(-8deg) scale(1.1); }
.gt-mail__copy { padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font: 600 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .2s, border-color .2s; }
.gt-mail__copy:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
.gt-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .92rem; }
.gt-footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.gt-footer p { margin: 0; }
.gt-footer .gt-social a { width: 38px; height: 38px; border-radius: 12px; }
.gt-totop { text-decoration: none; font-weight: 600; }

/* Pagine singole / 404 */
.gt-single { padding: calc(var(--header-h) + 56px) 0 96px; min-height: 70vh; }
.gt-single h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.gt-back { margin-bottom: 30px; font-weight: 600; }
.gt-back a { text-decoration: none; color: var(--muted); }
.gt-404 { text-align: center; }
.gt-404 h1 { margin-bottom: 28px; }

/* ---------- Reveal ----------
   Hero: ingresso a tempo, solo CSS.
   Sezioni: CSS scroll-driven dove supportato; altrimenti IntersectionObserver (main.js) aggiunge .is-in. */
@keyframes gt-enter { from { opacity: 0; transform: translateY(26px); } }
.gt-hero [data-reveal] { animation: gt-enter .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }

.js .gt-section [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .gt-section [data-reveal].is-in { opacity: 1; transform: none; }

@supports (animation-timeline: view()) {
	@keyframes gt-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
	@keyframes gt-parallax { from { transform: translate3d(0, -7%, 0) scale(1.16); } to { transform: translate3d(0, 7%, 0) scale(1.16); } }
	@keyframes gt-stuck { from { opacity: 0; } to { opacity: 1; } }

	.gt-progress span { animation: gt-grow linear both; animation-timeline: scroll(root block); }
	.gt-header:not(:has(.gt-nav.is-open))::before { animation: gt-stuck linear both; animation-timeline: scroll(root block); animation-range: 0 140px; }

	.js .gt-section [data-reveal] { opacity: 1; transform: none; transition: none; animation: gt-enter linear both; animation-timeline: view(); animation-range: entry 0% entry 42%; }
	.js .gt-skill__bar i { transition: none; transform: none; animation: gt-grow linear both; animation-timeline: view(); animation-range: entry 20% entry 90%; }
	.gt-banner img { animation: gt-parallax linear both; animation-timeline: view(); }
}

/* Transizione nativa tra home e pagina di un progetto (navigazione tra documenti) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
	[data-reveal], .js .gt-section [data-reveal], .js .gt-skill__bar i, .gt-banner img, .gt-progress span { animation: none !important; opacity: 1; transform: none; }
	.gt-hero__canvas { display: none; }
}

@media print {
	.gt-header, .gt-progress, .gt-hero__canvas, .gt-hero__glow, .gt-scrollcue, .gt-mail__copy, .gt-totop { display: none !important; }
	body { background: #fff; color: #000; }
	[data-reveal], .js .gt-section [data-reveal] { animation: none !important; opacity: 1; transform: none; }
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Barra admin di WordPress (visibile solo da loggati): l'header fisso le sta sotto */
.admin-bar .gt-header, .admin-bar .gt-progress { top: 32px; }
.admin-bar .gt-nav { top: calc(var(--header-h) + 32px); height: calc(100dvh - var(--header-h) - 32px); }
html:has(body.admin-bar) { scroll-padding-top: calc(var(--header-h) + 44px); }
@media (max-width: 782px) { .admin-bar .gt-header, .admin-bar .gt-progress { top: 46px; } .admin-bar .gt-nav { top: calc(var(--header-h) + 46px); height: calc(100dvh - var(--header-h) - 46px); } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }
@media (min-width: 860px) { .admin-bar .gt-nav { top: auto; height: auto; } }
