/*
Theme Name: Andrea Lucini
Theme URI: https://www.andrealucini.com/
Author: Andrea Lucini
Description: Profilo executive di Andrea Lucini con menu laterale: profilo, ambiti, esperienza, competenze e contatti. Dati strutturati schema.org, pronto per ospitare articoli.
Version: 2.1.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: andrealucini
License: GPL-2.0-or-later
*/

/* ---------- Font ospitati in locale (nessuna chiamata a servizi esterni) ---------- */
@font-face { font-family: "Figtree"; src: url("assets/fonts/figtree-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+FEFF; }
@font-face { font-family: "Figtree"; src: url("assets/fonts/figtree-latin-ext.woff2") format("woff2"); font-weight: 300 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }

/* Colonna di navigazione fissa a sinistra, pagina bianca, blu istituzionale, angoli netti. */
:root {
	--ink: #1A2233;
	--ink-2: #222C40;
	--paper: #FFFFFF;
	--soft: #F5F6F8;
	--line: #DFE2E8;
	--text: #1C2333;
	--muted: #535C6E;
	--accent: #1F4E79;
	--accent-strong: #163A5C;
	--accent-soft: #E8EEF5;
	--on-dark: #F1F3F7;
	--on-dark-muted: #AEB6C6;
	--accent-on-dark: #9DBBDB;
	--side: 300px;
	--wrap: 1080px;
	--font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(28px, 3vw, 38px); }
h3 { font-size: 19px; }
p { margin: 0; }
.icon { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.wrap--text { max-width: 780px; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow--light { color: var(--accent-on-dark); }
.eyebrow--light::before { background: var(--accent-on-dark); }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 22px; border-radius: 2px; font-weight: 600; font-size: 15px; letter-spacing: .01em; text-decoration: none; line-height: 1.2; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--accent-strong); }
.btn--light:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn--lg { min-height: 54px; padding: 14px 26px; font-size: 16px; }

/* ---------- Testata: barra in alto su schermi piccoli, colonna fissa su desktop ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--on-dark); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-dark); text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 2px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 17px; font-weight: 600; line-height: 1.2; }
.brand-role { font-size: 13px; color: var(--on-dark-muted); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--on-dark-muted); text-decoration: none; font-size: 15px; padding: 10px 12px; }
.site-nav a:hover { color: #fff; }
.site-nav .nav-cta { margin-left: 8px; padding: 10px 18px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 2px; color: #fff; }
.site-nav .nav-cta:hover { background: #fff; color: var(--ink); }
.nav-toggle { display: none; }

@media (min-width: 1101px) {
	html { scroll-padding-top: 24px; }
	.site-header { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); overflow-y: auto; }
	.header-inner { flex-direction: column; align-items: stretch; justify-content: flex-start; max-width: none; min-height: 100%; padding: 48px 36px 36px; gap: 44px; }
	.brand { flex-direction: column; align-items: flex-start; gap: 18px; }
	.brand-mark { width: 56px; height: 56px; font-size: 18px; }
	.brand-name { font-size: 22px; }
	.brand-role { margin-top: 6px; font-size: 14px; }
	.site-nav { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
	.site-nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); transition: padding-left .2s ease, color .2s ease; }
	.site-nav a:hover { padding-left: 6px; }
	.site-nav .nav-cta { margin: 28px 0 0; padding: 13px 0; text-align: center; border: 1px solid rgba(255, 255, 255, .35); }
	.site-nav .nav-cta:hover { padding-left: 0; }
	main, .site-footer { margin-left: var(--side); }
}
@media (max-width: 860px) {
	.brand-role { display: none; }
	.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 2px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark); cursor: pointer; }
	.site-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px max(24px, env(safe-area-inset-right, 0px)) 20px max(24px, env(safe-area-inset-left, 0px)); background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .08); }
	.site-nav.is-open { display: flex; }
	.site-nav a { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 17px; }
	.site-nav .nav-cta { margin: 16px 0 0; text-align: center; }
}

/* ---------- Apertura ---------- */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 56px; align-items: center; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(44px, 5.4vw, 72px); letter-spacing: -0.03em; line-height: 1.02; }
.hero-headline { margin-top: 20px; font-size: clamp(17px, 1.6vw, 20px); font-weight: 600; line-height: 1.45; color: var(--accent); }
.hero-lead { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 36em; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.portrait { margin: 0; width: 100%; max-width: 380px; justify-self: end; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--soft); border: 1px solid var(--line); }
.portrait picture { display: block; width: 100%; height: 100%; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait-fallback { display: grid; place-items: center; width: 100%; height: 100%; font-size: 120px; font-weight: 600; letter-spacing: -0.04em; color: rgba(26, 34, 51, .12); }
@media (max-width: 900px) {
	.hero { padding: 48px 0 56px; }
	.hero-grid { grid-template-columns: 1fr; gap: 40px; }
	.portrait { justify-self: start; max-width: 320px; }
}

/* ---------- Numeri chiave ---------- */
.facts { background: var(--soft); border-bottom: 1px solid var(--line); }
.facts-row { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 36px 28px 36px 0; }
.fact + .fact { padding-left: 28px; border-left: 1px solid var(--line); }
.fact dt { font-size: clamp(32px, 3vw, 42px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--accent); }
.fact dd { margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
@media (max-width: 900px) {
	.facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fact, .fact + .fact { padding: 24px 0; border-left: 0; }
	.fact:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
	.fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sezioni ---------- */
.section { padding: 96px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section--dark h2 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; align-items: start; }
.split > * { min-width: 0; }
.split-head { position: sticky; top: 32px; }
.split-head .muted { margin-top: 18px; }
@media (max-width: 900px) {
	.section { padding: 72px 0; }
	.split { grid-template-columns: 1fr; gap: 32px; }
	.split-head { position: static; }
}

.prose p { font-size: 18px; color: #2A3247; }
.prose p + p { margin-top: 18px; }
.leadership { margin: 32px 0 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--accent); }
.leadership p { font-size: 19px; font-weight: 500; color: var(--ink); line-height: 1.55; }

/* Ambiti */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--paper); }
.card { grid-column: span 2; padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card:hover { background: var(--accent-soft); }
.card-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 2px; background: var(--accent-soft); color: var(--accent); }
.card h3 { font-size: 18px; }
.card p { color: var(--muted); }
@media (max-width: 1000px) {
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.card, .card:nth-child(4) { grid-column: span 1; }
	.card:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 640px) {
	.cards { grid-template-columns: 1fr; }
	.card:nth-child(5) { grid-column: span 1; }
}

/* Risultati */
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.results li { display: flex; gap: 20px; align-items: flex-start; padding: 24px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.results-n { padding-top: 3px; font-size: 15px; font-weight: 700; color: var(--accent-on-dark); font-variant-numeric: tabular-nums; }
.results p { font-size: 19px; line-height: 1.5; color: var(--on-dark); }

/* Esperienza */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 44px 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; background: var(--paper); border: 1px solid #B8C0CE; }
.tl-item.is-current::before { background: var(--accent); border-color: var(--accent); }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.tl-place::before { content: "·"; margin-right: 14px; }
.badge { padding: 3px 10px; border-radius: 2px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 600; }
.tl-item h3 { font-size: 20px; }
.tl-company { margin: 4px 0 12px; font-weight: 600; color: var(--accent); }
.tl-points { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.tl-points li { position: relative; padding-left: 20px; font-size: 16px; color: var(--muted); }
.tl-points li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 2px; background: var(--accent); }

/* Competenze */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.skill-group { padding: 28px; background: var(--paper); border: 1px solid var(--line); }
.skill-group h3 { margin-bottom: 18px; font-size: 17px; }
.skill-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group li { padding: 7px 14px; border-radius: 2px; border: 1px solid var(--line); background: var(--paper); font-size: 15px; font-weight: 500; }

/* Articoli */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.posts li { padding: 24px 0; border-bottom: 1px solid var(--line); }
.posts h2, .posts h3 { margin: 6px 0 8px; font-size: 22px; line-height: 1.3; }
.posts h2 a, .posts h3 a { color: var(--ink); text-decoration: none; }
.posts h2 a:hover, .posts h3 a:hover { color: var(--accent); }
.post-date { font-size: 14px; color: var(--muted); }
.posts p:last-child { color: var(--muted); }
.posts-more { margin-top: 24px; font-weight: 600; }

/* Contatti */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; padding: 56px; border-radius: 2px; background: var(--accent); color: var(--on-dark); }
.contact-copy { min-width: 0; }
.contact h2 { color: #fff; }
.contact-lead { margin-top: 14px; font-size: 18px; color: #D6E1EE; }
.contact-topics { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; max-width: 640px; }
.contact-topics li { position: relative; padding-left: 28px; font-size: 17px; line-height: 1.5; color: #fff; }
.contact-topics li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.contact-actions { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ---------- Articolo singolo e pagine ---------- */
.article, .page { padding: 72px 0 96px; }
.article h1, .page h1 { margin-bottom: 18px; font-size: clamp(34px, 4.2vw, 48px); line-height: 1.12; }
.article-meta { color: var(--muted); font-size: 15px; }
.article-image { margin: 32px 0 0; }
.article-body { margin-top: 32px; }
.article-body h2, .page .prose h2 { margin: 40px 0 12px; font-size: 26px; }
.article-body h3 { margin: 28px 0 10px; }
.article-body ul, .article-body ol, .page .prose ul, .page .prose ol { margin: 16px 0; padding-left: 24px; }
.article-body li + li { margin-top: 6px; }
.author-box { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.block { padding: 72px 0 96px; }
.overline { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.overline a { color: inherit; text-decoration: none; }
.page .btn--primary { margin-top: 16px; }
.nav-links { display: flex; gap: 24px; margin-top: 32px; }

/* ---------- Piè di pagina ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--muted); }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .card, .site-nav a { transition: none; } }
@media print { .site-header, .hero-actions, .contact-actions { display: none; } main, .site-footer { margin-left: 0; } }

/* ---------- Menu mobile: sidebar laterale (sostituisce la tendina in alto) ---------- */
.nav-drawer-head, .nav-backdrop { display: none; }
@media (max-width: 860px) {
	.site-nav {
		position: fixed; top: 0; bottom: 0; left: 0; right: auto; z-index: 60;
		width: min(84vw, 320px); height: 100%; height: 100dvh;
		display: flex; flex-direction: column; align-items: stretch; gap: 0;
		padding: 0 28px max(28px, env(safe-area-inset-bottom, 0px)) max(28px, env(safe-area-inset-left, 0px));
		background: var(--ink); border-top: 0; border-right: 1px solid rgba(255, 255, 255, .08);
		box-shadow: 0 0 48px rgba(0, 0, 0, .35);
		overflow-y: auto; overscroll-behavior: contain;
		transform: translateX(-100%); visibility: hidden;
		transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .3s;
	}
	.site-nav.is-open { display: flex; transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
	.nav-drawer-head {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		padding: max(22px, env(safe-area-inset-top, 0px)) 0 22px; margin-bottom: 8px;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}
	.nav-drawer-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
	.nav-drawer-brand .brand-mark { flex: none; }
	.nav-drawer-name { display: block; font-weight: 600; font-size: 17px; color: #fff; }
	.nav-drawer-role { display: block; margin-top: 2px; font-size: 13px; color: var(--on-dark-muted); }
	.nav-close {
		display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 2px;
		background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark); cursor: pointer;
	}
	.site-nav a { padding: 15px 0; font-size: 17px; }
	.site-nav .nav-cta { margin: 24px 0 0; padding: 13px 0; text-align: center; }
	.nav-backdrop {
		display: block; position: fixed; inset: 0; z-index: 55;
		background: rgba(10, 14, 24, .55); opacity: 0; visibility: hidden;
		transition: opacity .3s ease, visibility 0s linear .3s;
	}
	.nav-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
	html.nav-locked, html.nav-locked body { overflow: hidden; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
	.site-nav, .site-nav.is-open, .nav-backdrop, .nav-backdrop.is-open { transition: none; }
}
