@font-face{font-family:'Prova';src:url('fonts/source-sans-3.woff2') format('woff2');font-style:normal;font-weight:200 900;font-display:swap}

/* ============================================================
   Foglio di stile scritto mobile first.
   La base descrive il telefono; le fasce piu larghe aggiungono,
   non correggono. Punti di rottura: 760, 1001, 1450 px.
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #fdfdfb;
  --ink: #282538;
  --muted: #625e70;
  --accent: #5142a6;
  --lilac: #eeedf8;
  --line: #dcd9e7;
  --white: #fff;
  font-family: 'Prova', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
::selection { background: #dcd6ff; color: var(--ink); }
h1,h2,h3,p,figure { margin: 0; }
h1,h2,h3 { font-weight: 650; line-height: 1.08; }
h1 { font-size: clamp(65px, 12vw, 90px); letter-spacing: -.06em; line-height: .98; font-weight: 700; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(36px, 4.1vw, 52px); letter-spacing: -.045em; }
h3 { font-size: 24px; letter-spacing: -.025em; }
p+p { margin-top: 20px; }
img { display: block; width: 100%; height: auto; }

.wrap { width: calc(100% - 40px); margin-inline: auto; }
.skip { position: absolute; top: 10px; left: 12px; z-index: 10; padding: 10px 18px; background: var(--white); transform: translateY(-160%); }
.skip:focus { transform: none; }

/* --- testata --- */
.site-header { background: var(--paper); }
.header-inner { min-height: 92px; display: flex; flex-direction: column; align-items: start; justify-content: space-between; gap: 8px; padding-block: 19px 13px; }
.identity { font-size: 20px; font-weight: 700; letter-spacing: -.7px; text-decoration: none; white-space: nowrap; }
.identity span { color: var(--accent); }
nav { display: flex; align-items: center; width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; font-weight: 550; }
nav a { padding-block: 10px; text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav .nav-contact { padding: 10px 16px; border: 1px solid var(--line); border-radius: 50px; }
nav .lang { margin-left: auto; }

/* --- apertura --- */
.hero { background: var(--lilac); }
.hero-inner { display: grid; grid-template-columns: 1fr; align-items: center; gap: 40px; padding-block: 37px 32px; }
.hello { font-size: 18px; margin-bottom: 13px; }
.role { font-size: 14px; color: var(--muted); margin-top: 19px; }
.intro { max-width: 48ch; margin-top: 22px; font-size: 18px; line-height: 1.6; }
.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 25px; font-size: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 49px; padding: 11px 25px 13px; color: var(--white); background: var(--accent); border-radius: 50px; text-decoration: none; font-weight: 600; }
.button:hover { color: var(--white); background: #3e307f; }
button.button { border: 0; font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.text-link { display: inline-block; color: var(--accent); font-weight: 600; text-decoration-line: underline; text-decoration-color: #b4abd9; text-underline-offset: .32em; }
.portrait { width: min(84%, 360px); justify-self: center; }
.portrait img { border-radius: 180px 180px 14px 14px; aspect-ratio: 1; object-fit: cover; object-position: 50% 28%; }
.portrait figcaption { color: var(--muted); font-size: 14px; padding-top: 15px; text-align: center; }

/* --- biografia --- */
.section-space { padding-block: 55px; }
.about { display: grid; grid-template-columns: 1fr; gap: 25px; }
.about-heading h2 br { display: none; }
.about-copy { max-width: 63ch; font-size: 17px; }
.aside-note { margin-top: 16px; color: var(--accent); font-size: 19px; line-height: 1.45; }

/* --- progetti --- */
.projects { background: #f2f3f1; }
.section-heading { display: block; margin-bottom: 28px; }
.section-heading>p { font-size: 16px; color: var(--muted); padding-bottom: 5px; margin-top: 15px; }
.project-grid { display: grid; grid-template-columns: 1fr; gap: 42px; }
.project { display: flex; flex-direction: column; align-items: start; }
.project-image { display: block; width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.project-image img { aspect-ratio: 1200 / 630; object-fit: cover; }
.project-image-logo { background: var(--lilac); aspect-ratio: 1200 / 630; display: grid; place-items: center; }
.project-image-logo img { width: 58%; height: auto; aspect-ratio: auto; object-fit: contain; }
.project h3 { font-size: 25px; margin-bottom: 12px; }
.project p { font-size: 16px; line-height: 1.7; padding-bottom: 16px; max-width: 55ch; }
.project>.text-link { font-size: 15px; margin-top: auto; }

/* --- blog --- */
.blog { padding-bottom: 78px; }
.blog-panel { background: var(--lilac); border-radius: 18px; padding: 32px 24px; display: grid; grid-template-columns: 1fr; gap: 25px; }
.blog-logo { width: 170px; height: auto; margin-bottom: 18px; }
.blog h2 { font-size: 35px; }
.blog-copy { font-size: 17px; }
.blog-copy .button { margin-top: 26px; font-size: 16px; }

/* --- contatti e chiusura --- */
.contact { display: flex; flex-direction: column; justify-content: space-between; align-items: start; gap: 24px; padding-bottom: 48px; }
.contact h2 { margin-bottom: 17px; }
.contact p { color: var(--muted); font-size: 16px; }
.contact-links { text-align: left; }
.email { font-size: clamp(21px, 2.5vw, 30px); color: var(--accent); font-weight: 550; letter-spacing: -.025em; }
.social-links { display: flex; gap: 25px; justify-content: start; margin-top: 18px; font-size: 15px; }
.footer { border-top: 1px solid var(--line); padding-block: 22px; display: flex; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--muted); }
.footer span { margin-right: auto; }

/* --- pagine di testo (privacy, 404) e selettore di lingua --- */
.lang { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--accent); text-decoration: underline; }
.lang [aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang .sep { color: var(--line); }
.page { padding-block: 42px 58px; }
.page-title { font-size: clamp(38px, 4.4vw, 58px); letter-spacing: -.035em; line-height: 1.04; margin-bottom: 14px; }
.page-date { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.prose { max-width: 66ch; }
.prose h2 { font-size: clamp(21px, 2vw, 25px); letter-spacing: -.02em; margin-top: 42px; margin-bottom: 12px; }
.prose h2:first-of-type { margin-top: 0; }
.prose p { font-size: 17px; line-height: 1.72; color: var(--ink); margin-bottom: 15px; }
.prose a { color: var(--accent); }
.prose .back { display: inline-block; margin-top: 44px; font-weight: 600; }
.notfound { display: grid; gap: 26px; padding-block: 54px 64px; }
.notfound .code { font-size: 15px; color: var(--accent); letter-spacing: .09em; text-transform: uppercase; }
.notfound h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.035em; line-height: 1.06; }
.notfound p { font-size: 18px; color: var(--muted); max-width: 52ch; margin-top: 12px; }
.notfound .altro { border-top: 1px solid var(--line); padding-top: 30px; }
.lang-note { color: var(--muted); font-weight: 400; }

/* --- area toccabile: generosa per il dito, che e il caso di partenza --- */
.text-link, .social-links a, .footer a, .lang a, .email { position: relative; }
.text-link::after, .social-links a::after, .footer a::after, .lang a::after, .email::after {
  content: ""; position: absolute; inset: -12px -8px; border-radius: 8px;
}

/* ============================================================
   Da 760 px: due colonne, respiro maggiore.
   ============================================================ */
@media (min-width: 760px) {
  .wrap { width: min(1120px, calc(100% - 80px)); }
  h1 { font-size: clamp(66px, 7.4vw, 96px); }

  .header-inner { flex-direction: row; align-items: center; gap: 32px; padding-block: 0; }
  .identity { font-size: 21px; }
  nav { width: auto; justify-content: normal; flex-wrap: nowrap; gap: 20px; font-size: 15px; }
  nav .nav-contact { padding: 9px 20px; }
  nav .lang { margin-left: 0; }

  .hero-inner { grid-template-columns: 1.12fr .88fr; gap: 40px; padding-block: 48px; }
  .hello { font-size: 20px; }
  .role { font-size: 16px; margin-top: 23px; }
  .intro { max-width: 46ch; margin-top: 26px; font-size: 19px; }
  .hero-links { gap: 20px 26px; margin-top: 30px; }
  .portrait { width: 100%; max-width: 420px; justify-self: end; }
  .portrait img { border-radius: 210px 210px 16px 16px; aspect-ratio: 4 / 5; object-position: 50% 50%; }

  .section-space { padding-block: 88px; }
  .about { grid-template-columns: .65fr 1.35fr; gap: 50px; }
  .about-heading h2 br { display: revert; }
  .about-copy { font-size: 18px; }
  .aside-note { margin-top: 32px; font-size: 20px; }

  .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 38px; }
  .section-heading>p { margin-top: 0; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .project-image { margin-bottom: 24px; }
  .project h3 { font-size: 24px; margin-bottom: 15px; }
  .project p { padding-bottom: 23px; max-width: none; }

  .blog-panel { grid-template-columns: 1fr 1fr; padding: 40px; gap: 32px; border-radius: 24px; }
  .blog-logo { width: 190px; margin-bottom: 23px; }
  .blog h2 { font-size: clamp(34px, 3.6vw, 46px); }

  .contact { flex-direction: row; align-items: center; gap: 36px; padding-bottom: 76px; }
  .contact-links { text-align: right; }
  .social-links { justify-content: end; }
  .footer { flex-wrap: nowrap; gap: 28px; padding-block: 25px; font-size: 13px; }

  .page { padding-block: 66px 86px; }
  .page-date { margin-bottom: 46px; }
  .notfound { gap: 34px; padding-block: 86px 96px; }
}

/* col mouse l'area sensibile puo tornare stretta: il bersaglio resta sopra i 24 px */
@media (min-width: 760px) and (pointer: fine) {
  .text-link::after, .social-links a::after, .footer a::after, .lang a::after, .email::after {
    inset: -5px -6px;
  }
}

/* ============================================================
   Da 1001 px: le proporzioni piene del disegno.
   ============================================================ */
@media (min-width: 1001px) {
  nav { gap: 30px; }
  .hero-inner { gap: 68px; padding-block: 64px 68px; }
  .about { grid-template-columns: .7fr 1.3fr; gap: 92px; }
  .blog-panel { padding: 55px 52px; gap: 55px; }
}

@media (min-width: 1450px) {
  .hero-inner { padding-block: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
