
:root {
  --bg-color: #050505;
  --text-primary: #e2e8f0;
  --text-highlight: #66fcf1; /* Ciano Neon */
  --text-secondary: #94a3b8;
  --border-color: rgba(102, 252, 241, 0.30);
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* FIX SCROLLBAR */
html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE ed Edge */
}

/* Chrome, Safari, Opera */
html::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* --- BACKGROUND --- */
.background-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; background: #050505;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  width: 35vh;
  height: 35vh;
}

.blob-1 {
  top: -10%;
  left: -10%;
  background: #4f46e5;
  animation: orbit-tl-br 40s infinite ease-in-out;
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  background: #0d9488;
  animation: orbit-br-tl 40s infinite ease-in-out;
}

@keyframes orbit-tl-br {
  0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60vw, 60vh) scale(1.1); } 100% { transform: translate(0, 0) scale(1); }
}
@keyframes orbit-br-tl {
  0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-60vw, -60vh) scale(1.1); } 100% { transform: translate(0, 0) scale(1); }
}

.grid-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px; pointer-events: none; z-index: -1;
}

/* --- NAVIGAZIONE (Stile Profilo) --- */
nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2.5rem 5%;
  width: 100%;
  position: absolute;
  top: 0; left: 0;
  z-index: 200;
  background: transparent;
}
.logo { font-family: var(--font-mono); font-weight: 700; font-size: 1.5rem; color: var(--text-highlight); letter-spacing: -1px; z-index: 201; text-decoration: none; line-height: 1; }

/* Centratura assoluta per i link desktop */
.nav-links {
  list-style: none; display: flex; gap: 2rem; align-items: center;
  position: absolute; left: 50%; transform: translateX(-50%);
}

/* Effetto Hover "Slide Up" */
.nav-links a {
  position: relative; display: inline-block; text-decoration: none;
  color: var(--text-primary); font-size: 1.1rem; font-weight: 400;
  overflow: hidden;
}

.nav-links a span {
  display: inline-block; transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.nav-links a::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 100%; width: 100%;
  color: var(--text-highlight);
  transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.nav-links a:hover span { transform: translateY(-100%); }
.nav-links a:hover::after { transform: translateY(-100%); }

/* --- TASTO LINGUA & CONTENITORE DESTRA --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 201;
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.lang-switch:hover {
  color: var(--text-highlight);
  border-color: var(--text-highlight);
  background: transparent;
  box-shadow: 0 0 15px rgba(102, 252, 241, 0.3);
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; z-index: 201; width: 30px; height: 20px; position: relative; }
.hamburger span { display: block; position: absolute; height: 2px; width: 100%; background: var(--text-highlight); border-radius: 9px; transition: .25s ease-in-out; }
.hamburger span:nth-child(1) { top: 0px; } .hamburger span:nth-child(2) { top: 9px; } .hamburger span:nth-child(3) { top: 18px; }
.hamburger.open span:nth-child(1) { top: 9px; transform: rotate(135deg); }
.hamburger.open span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger.open span:nth-child(3) { top: 9px; transform: rotate(-135deg); }

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(20px); z-index: 200; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.mobile-menu.active { opacity: 1; pointer-events: all; }
.mobile-link { font-family: var(--font-mono); font-size: 2rem; color: var(--text-primary); text-decoration: none; margin: 1.5rem 0; position: relative; }
.mobile-link:hover { color: var(--text-highlight); }
.menu-cursor { display: inline-block; width: 10px; height: 2rem; background-color: var(--text-highlight); vertical-align: middle; animation: blink 1s infinite; opacity: 0; }
.menu-cursor.typing { opacity: 1; }

/* Stile per la pagina attiva su Mobile */
.mobile-link.active-page .text-content { color: var(--text-highlight); }
.mobile-link.active-page .menu-cursor { display: none; }

/* --- HERO SECTION --- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 5%; /* Aumentato il padding verticale per dare respiro */
  min-height: 100vh; /* Forza un'altezza minima, creando lo scroll se necessario */
  position: relative;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem;
  max-width: 1100px;
  width: 100%;
  align-items: center;
}

.hero-text { text-align: left; z-index: 2; }
.hero-image-container { display: flex; justify-content: center; align-items: center; z-index: 2; }

.profile-photo-wrapper {
  position: relative;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--text-highlight), #4f46e5);
  padding: 4px;
  box-shadow: 0 0 60px rgba(102, 252, 241, 0.25);
  animation: floatProfile 6s ease-in-out infinite;
}

.profile-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 5px solid #050505; background-color: #111; display: block; }

@keyframes floatProfile { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

h1 {
  font-family: var(--font-main); font-weight: 800; font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 0.5rem; letter-spacing: -2px;
  background: linear-gradient(to right, #ffffff 0%, #cbd5e1 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  opacity: 0; animation: fadeUp 1s ease-out forwards;
}

.hero-subtitle {
  font-family: var(--font-mono); font-size: clamp(0.9rem, 2vw, 1.1rem); color: var(--text-secondary); margin-bottom: 2rem; font-weight: 400;
  opacity: 0; animation: fadeUp 1s ease-out 0.3s forwards;
}

.dynamic-wrapper {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--text-highlight);
  min-height: 2rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  opacity: 0; animation: fadeUp 1s ease-out 0.6s forwards;
}

/* --- NUOVO FOOTER GENERALE (DESKTOP FIRST) --- */
footer {
  background-color: rgba(11, 12, 16, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 4rem 5%;
  margin-top: auto;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto; /* Questo centra tutto il footer grande perfettamente! */
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: flex-start; /* Tutto allineato a sinistra su PC */
}

.footer-logo { font-family: var(--font-mono); font-weight: 700; font-size: 2.2rem; color: var(--text-highlight); line-height: 1; }
.copyright { font-size: 0.85rem; color: var(--text-secondary); font-family: var(--font-mono); line-height: 1.6; margin-top: 0.5rem; }

.footer-heading { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem; }

.footer-item { display: flex; align-items: center; gap: 0.8rem; color: var(--text-primary); font-family: var(--font-mono); font-size: 0.95rem; }
.footer-item a, .footer-link { display: flex; align-items: center; gap: 0.8rem; color: var(--text-primary); text-decoration: none; transition: color 0.2s; font-family: var(--font-mono); font-size: 0.95rem; }

.footer-item a:hover, .footer-link:hover { color: var(--text-highlight); }

/* Icone Generiche SVG */
.footer-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-primary); /* Base per icone piene come LinkedIn e GitHub */
  transition: all 0.2s;
}

/* Base per icone lineari come Mail e Luogo */
.footer-icon.stroke-icon {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hover per icone piene (LinkedIn/GitHub) */
.footer-item:hover .footer-icon,
.footer-item a:hover .footer-icon {
  fill: var(--text-highlight);
}

/* FIX: Hover per icone lineari (Mail/Luogo) */
.footer-item:hover .footer-icon.stroke-icon,
.footer-item a:hover .footer-icon.stroke-icon {
  fill: none; /* Mantiene l'interno vuoto/trasparente */
  stroke: var(--text-highlight); /* Colora solo il bordo */
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.cta-group { display: flex; gap: 1.5rem; opacity: 0; animation: fadeUp 1s ease-out 0.9s forwards; }

.btn { padding: 0.9rem 2.2rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s ease; font-family: var(--font-mono); white-space: nowrap; position: relative; }
.btn-primary { border: 1px solid var(--text-highlight); color: #050505; background: var(--text-highlight); }
.btn-primary:hover { background: transparent; color: var(--text-highlight); box-shadow: 0 0 20px rgba(102, 252, 241, 0.4); }
.btn-secondary { color: var(--text-primary); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }
/* --- ICONA FRECCIA BOTTONE CTA --- */
.btn {
  /* Assicura che testo e icona siano allineati perfettamente al centro */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* Spazio tra testo e freccia */
}

.btn-arrow {
  width: 20px;
  height: 20px;
  /* Animazione fluida come il resto del sito */
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
/* Quando l'utente passa il mouse sul bottone, la freccia si sposta a destra */
.btn:hover .btn-arrow {
  transform: translateX(4px);
}
/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  nav {
    padding: 1.5rem;
    height: auto;
  }

  /* Modificato per centrare perfettamente su mobile considerando la nav */
  main {
    padding: 80px 1.5rem 2rem; /* Aggiunti 80px in alto per compensare la navbar */
    align-items: center;
    min-height: 100vh;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem; /* Aumentato leggermente per dare più respiro tra foto e testi */
    text-align: center;
    margin-top: 0; /* Rimosso il margine negativo che tirava su tutto */
  }

  .hero-text {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-image-container {
    order: 1;
    margin-bottom: 0;
  }

  .profile-photo-wrapper {
    width: 160px;
    height: 160px;
  }

  h1 {
    text-align: center;
    width: 100%;
    font-size: clamp(2.2rem, 8vw, 3rem);
    margin-bottom: 0.3rem;
  }

  .hero-subtitle {
    text-align: center;
    width: 100%;
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }

  .dynamic-wrapper {
    justify-content: center;
    width: 100%;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
  }

  /* --- NUOVO FOOTER MOBILE --- */
  .footer-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
  }

  .footer-col {
    align-items: flex-start; /* Forza l'allineamento a sinistra */
    text-align: left;
    width: 100%; /* Risolve il problema dello spazio laterale */
  }

  /* Assicura che icone e testo siano incollati a sinistra */
  .footer-item {
    justify-content: flex-start;
    width: 100%;
  }

  .copyright {
    text-align: left; /* Allinea a sinistra anche il copyright */
    margin-top: 0.5rem;
  }
}

/*======STILI BANNER PER I COOKIE=====*/
#cookie-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(8px);
  z-index: 9999; display: none; /* Gestito dal JS */
  align-items: center; justify-content: center;
}

#cookie-banner {
  background: #0b0d10;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  display: flex; flex-direction: column; gap: 1.5rem;
  text-align: center;
  transform: translateY(20px);
  animation: slideUpCookie 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUpCookie {
  to { transform: translateY(0); }
}

.cookie-title {
  color: #fff; font-family: var(--font-mono); font-size: 1.5rem; margin-bottom: 0.8rem;
}

.cookie-text {
  color: var(--text-secondary); font-size: 0.95rem; font-family: var(--font-main); line-height: 1.5;
}

.cookie-text a {
  color: var(--text-highlight); text-decoration: none; border-bottom: 1px dashed var(--text-highlight); padding-bottom: 2px;
}

.cookie-buttons {
  display: flex; flex-direction: column; gap: 1rem; margin-top: 0.5rem;
}

@media (min-width: 600px) {
  .cookie-buttons { flex-direction: row; justify-content: space-between; }
  .btn-cookie { flex: 1; }
}

.btn-cookie {
  padding: 0.9rem 1.2rem; border-radius: 8px; font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; width: 100%;
}

.btn-accept {
  background: var(--text-highlight); color: #050505; border: none;
}
.btn-accept:hover {
  background: #fff; box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
}

.btn-reject {
  background: transparent; color: var(--text-primary); border: 1px solid rgba(255,255,255,0.2);
}
.btn-reject:hover {
  border-color: var(--text-highlight); color: var(--text-highlight);
}
