/* =========================================================
   Edward Baritello — sito statico
   Stile dark / neon ispirato a Metriks AI
   ========================================================= */

:root {
  --bg:        #06090b;
  --bg-soft:   #0a0f11;
  --surface:   #0f1619;
  --surface-2: #141d1f;
  --border:    rgba(255, 255, 255, 0.08);
  --text:      #e8f0ec;
  --muted:     #95a8a0;
  --muted-2:   #6a7d76;

  --violet:    #10d18e;
  --indigo:    #2dd4bf;
  --cyan:      #5eead4;

  --grad:      linear-gradient(120deg, #10d18e 0%, #2dd4bf 55%, #5eead4 100%);
  --grad-soft: linear-gradient(120deg, rgba(16,209,142,.18), rgba(45,212,191,.10));

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1180px;
  --ease:      cubic-bezier(.22,.61,.36,1);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- ambient background ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60vw 60vw at 75% -10%, rgba(16,209,142,.18), transparent 60%),
    radial-gradient(50vw 50vw at 5% 15%, rgba(45,212,191,.12), transparent 55%),
    radial-gradient(45vw 45vw at 60% 100%, rgba(94,234,212,.12), transparent 60%);
  z-index: -2;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  z-index: -1;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 110px 0; }
.section--tight { padding: 80px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad);
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 18px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; }
p  { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #c4c9dd; max-width: 60ch; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(16,209,142,.7); }
.btn--primary:hover { box-shadow: 0 16px 40px -12px rgba(16,209,142,.9); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(6,7,13,.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--font-head); font-weight: 700; letter-spacing: .02em; font-size: 1.05rem; display: flex; align-items: center; gap: 11px; }
.brand .logo { width: 32px; height: 32px; flex: 0 0 32px; filter: drop-shadow(0 0 10px rgba(16,209,142,.4)); }
.brand .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 16px rgba(16,209,142,.8); transform: rotate(12deg); }

/* ---------- about (chi sono) con ritratto ---------- */
.about-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 48px; align-items: center; }
.portrait {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--grad-soft);
  aspect-ratio: 4/5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -80px 60px -40px rgba(6,9,11,.9), inset 0 0 80px rgba(16,209,142,.12); pointer-events: none; }
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 360px; } }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: .95rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 10px 20px; font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 170px 0 120px; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 5rem); max-width: 16ch; margin-bottom: 26px; }
.hero .lead { font-size: clamp(1.1rem, 1.9vw, 1.35rem); margin-bottom: 38px; max-width: 64ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 54px; }
.tag {
  font-family: var(--font-head); font-size: .82rem; letter-spacing: .04em;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,.03); color: var(--muted);
}

/* ---------- generic card ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(16,209,142,.4); box-shadow: 0 24px 50px -28px rgba(16,209,142,.55); }
.card .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; line-height: 1; margin-bottom: 16px; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- manifesto band (dark quote) ---------- */
.band {
  background:
    radial-gradient(40vw 40vw at 85% 50%, rgba(16,209,142,.22), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.band .quote { font-family: var(--font-head); font-size: clamp(1.6rem, 3.6vw, 2.7rem); font-weight: 700; line-height: 1.2; max-width: 22ch; letter-spacing: -.02em; }
.band .quote .mark { color: var(--violet); }

/* ---------- method steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 28px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.02); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.05rem; margin: 12px 0 8px; }
.step p { font-size: .92rem; }

/* ---------- experience ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.exp .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { font-family: var(--font-head); font-size: .78rem; letter-spacing: .04em; padding: 6px 12px; border-radius: 8px; background: var(--grad-soft); border: 1px solid var(--border); color: #cdd2e6; }

/* ---------- blog cards ---------- */
.post {
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.post:hover { transform: translateY(-6px); border-color: rgba(16,209,142,.4); box-shadow: 0 24px 50px -28px rgba(16,209,142,.55); }
.post .thumb { height: 168px; background: var(--grad); position: relative; }
.post .thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%); }
.post .body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.post .meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--muted); font-family: var(--font-head); letter-spacing: .04em; }
.post .cat { color: var(--violet); }
.post h3 { font-size: 1.15rem; line-height: 1.25; }
.post .more { margin-top: auto; font-family: var(--font-head); font-size: .9rem; color: var(--text); display: inline-flex; gap: 8px; align-items: center; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact-list { display: grid; gap: 14px; }
.contact-list a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.02); transition: border-color .25s, transform .25s; }
.contact-list a:hover { border-color: rgba(16,209,142,.45); transform: translateX(4px); }
.contact-list .ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: var(--grad-soft); border: 1px solid var(--border); display: grid; place-items: center; font-size: 1.1rem; }
.contact-list .k { font-size: .78rem; color: var(--muted); font-family: var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.contact-list .v { color: var(--text); font-weight: 500; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 64px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-bio { max-width: 52ch; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted-2); font-size: .85rem; }

/* ---------- article (blog post page) ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 150px 24px 100px; }
.article h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 20px; }
.article .meta { color: var(--muted); font-family: var(--font-head); letter-spacing: .04em; margin-bottom: 40px; }
.article p { color: #c4c9dd; margin-bottom: 22px; font-size: 1.08rem; }
.article h2 { font-size: 1.6rem; margin: 40px 0 16px; }
.article ul.bullets { margin: 0 0 22px; padding-left: 0; display: grid; gap: 10px; }
.article ul.bullets li { color: #c4c9dd; padding-left: 28px; position: relative; }
.article ul.bullets li::before { content: ""; position: absolute; left: 0; top: .65em; width: 12px; height: 2px; border-radius: 2px; background: var(--grad); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .grid-3, .exp-grid, .steps { grid-template-columns: 1fr 1fr; }
  .contact-grid, .footer-top, .footer-bio { grid-template-columns: 1fr; }
  .contact-grid { gap: 28px; }
}
@media (max-width: 680px) {
  .section { padding: 80px 0; }
  .grid-3, .grid-2, .exp-grid, .steps { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: rgba(6,7,13,.96); backdrop-filter: blur(14px);
    padding: 20px 24px 28px; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform .35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 10px 0; width: 100%; font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
