/* ==========================================================================
   CV super impatto — Giuseppe Pingitore
   ========================================================================== */
:root {
  --bg: #f7f2ed;
  --bg-alt: #f3efe8;
  --surface: #ffffff;
  --text: #1d1a16;
  --muted: #5e5b57;
  --accent: #ff6b35;
  --accent-dark: #e55420;
  --accent-soft: #ffe1d6;
  --ink: #0b2d52;
  --stroke: rgba(11, 45, 82, 0.12);
  --radius: 20px;
  --shadow: 0 18px 45px rgba(20, 18, 15, 0.08);
  --font-heading: "Syne", "Arial Black", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  --container: 1150px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  z-index: -2;
}

.orb-1 {
  background: radial-gradient(circle, #ffe7d6, transparent 60%);
  top: -120px;
  right: -120px;
}

.orb-2 {
  background: radial-gradient(circle, #dfe9ff, transparent 60%);
  bottom: -140px;
  left: -120px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--stroke) 1px, transparent 1px),
    linear-gradient(90deg, var(--stroke) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.18;
  z-index: -3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 242, 237, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(11, 45, 82, 0.08);
  padding: 8px 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  min-height: 56px;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: brand-float 3s ease-in-out infinite;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  color: var(--ink);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px;
  width: auto;
  height: auto;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before {
  position: absolute;
  top: -7px;
}

.nav-toggle-icon::after {
  position: absolute;
  top: 7px;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
  animation: brand-line 2.4s ease-in-out infinite;
}

.hero {
  padding: 80px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 3vw, 3.8rem);
  line-height: 1.05;
  margin: 18px 0;
  color: var(--ink);
}

.hero p {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 520px;
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.25);
}

.btn.primary:hover {
  transform: translateY(-2px);
}

.btn.secondary {
  background: var(--ink);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--ink);
}

.hero-meta {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-meta strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--ink);
}

.hero-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.avatar {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 20px;
}

.hero-card-body h2 {
  font-family: var(--font-heading);
  margin: 0 0 8px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.hero-badges span,
.pill-list span,
.project-tags span {
  background: var(--bg-alt);
  border: 1px solid rgba(11, 45, 82, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink);
}

.section {
  padding: 70px 0;
}

.section.alt {
  background: var(--bg-alt);
}

.section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  margin: 0 0 14px;
  color: var(--ink);
}

.section-head {
  margin-bottom: 32px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.stat-card ul {
  padding-left: 18px;
  margin: 0 0 18px;
  color: var(--muted);
}

.stat-highlight {
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.project-thumb {
  height: 140px;
  border-radius: 16px;
  margin-bottom: 18px;
  background-size: cover;
}

.project-a {
  background: linear-gradient(135deg, #ffe1d6, #ffb38f);
}

.project-b {
  background: linear-gradient(135deg, #d6e6ff, #9fb8ff);
}

.project-c {
  background: linear-gradient(135deg, #f8f2cf, #f2d98a);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(11, 45, 82, 0.08);
  box-shadow: var(--shadow);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.timeline li {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(11, 45, 82, 0.08);
  box-shadow: var(--shadow);
}

.timeline span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

.cv-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.cv-meta {
  margin-top: 20px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-cards {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.contact-cards div {
  background: var(--surface);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.contact-cards strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(11, 45, 82, 0.08);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
}

input,
select,
textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 45, 82, 0.2);
  background: #fff;
}

textarea {
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.site-footer {
  padding: 20px 0 30px;
  border-top: 1px solid rgba(11, 45, 82, 0.1);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    border-radius: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(11, 45, 82, 0.08);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  body.nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.nav-open .nav-toggle-icon {
    transform: rotate(45deg);
  }

  body.nav-open .nav-toggle-icon::before {
    transform: translateY(7px) rotate(90deg);
  }

  body.nav-open .nav-toggle-icon::after {
    opacity: 0;
  }
}

@keyframes brand-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes brand-line {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 24px;
  }

  .hero {
    padding-top: 60px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .nav-links,
  .bg-orb,
  .bg-grid,
  .hero-actions,
  .contact-form {
    display: none !important;
  }

  body {
    background: #fff;
  }
}
