:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --ink: #222222;
  --muted: #6B6B6B;
  --accent: #2A2A2A;   /* grafite scuro */
  --line: #E7E5E2;
  --maxw: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-switch { display: flex; gap: 4px; }
.lang-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
}
.lang-btn:hover { border-color: var(--accent); color: var(--ink); }
.lang-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Hero */
.hero { padding: 64px 0 40px; }
.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hero-photo { flex-shrink: 0; }
.photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: linear-gradient(135deg, #E8E6E2 0%, #D5D2CD 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.photo-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, #C9C6C0 0 22%, transparent 23%),
    linear-gradient(#C6C3BD 0 0) center/48% 10% no-repeat;
  background-position: 50% 60%;
}
.hero-text h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.hero-role {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}
.hero-tagline {
  margin: 6px 0 0;
  color: var(--muted);
}

/* Sections */
.section { padding: 40px 0; }
.section h2 {
  font-size: 1.4rem;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.section p { margin: 0 0 12px; color: #333; }

/* Contatti */
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.contact-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.contact-btn:hover { background: var(--accent); color: #fff; }
.contact-btn.is-revealed {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  cursor: default;
}

/* Progetti */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.card-media {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.card-media img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}
.card-altrarete .card-media {
  background: #555;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }
.card-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-links a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.card-links a:hover { opacity: 0.7; }

/* CTA */
.cta { text-align: center; padding: 64px 0; }
.cta h2 { border-bottom: none; padding-bottom: 0; font-size: 1.7rem; }
.cta p { color: var(--muted); margin: 8px 0 28px; }
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #fff; }
.btn.is-revealed { background: var(--accent); color: #fff; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 40px 0 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
}
