/* ---------- VARIABILI ---------- */
:root {
  --primary-color: #00ffff;
  --secondary-color: #ff00ff;
  --accent-color: #00ff00;
  --bg-dark: #0a0a0a;
  --text-light: #ffffff;
  --text-muted: #a0a0a0;
  --gradient-primary: linear-gradient(135deg, #00ffff, #ff00ff);
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- NAVBAR ---------- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 2s ease-in-out infinite alternate;
  cursor: default;
  user-select: none;
}

@keyframes glow {
  from { filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5)); }
  to   { filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)); }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.nav-links a[aria-current="page"] {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  font-weight: 600;
}

.mobile-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  z-index: 1001; /* Assicura che sia sopra altri elementi */
}

.mobile-menu span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  transition: 0.3s;
}

/* ---------- MAIN CONTENT ---------- */
main {
  max-width: 1200px;
  margin: 100px auto 3rem auto;
  padding: 0 2rem;
}

/* ---------- PAGE HEADER ---------- */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
}
.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}
.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 2rem;
  text-align: center;
}

/* ---------- INDEX CONTENT ---------- */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.profile-text {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: left;
  font-size: 1.1rem;
  line-height: 1.8;
  backdrop-filter: blur(10px);
}

.achievement {
  background: rgba(255, 0, 255, 0.1);
  border: 1px solid rgba(255, 0, 255, 0.3);
  border-radius: 15px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.achievement h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.achievement a {
  display: inline-block;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.achievement a:hover {
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2);
  border-color: var(--primary-color);
}

/* ---------- FOOTER ---------- */
footer {
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(0, 255, 255, 0.2);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  main {
    margin: 80px 1rem 2rem 1rem;
    padding: 0;
  }
  
  .page-header h1 {
    font-size: 2.2rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Stili corretti per il menu mobile */
  .mobile-menu {
    display: flex;
  }
  
  .nav-links {
    display: none; /* Nascosto di default */
    flex-direction: column;
    position: absolute;
    top: 65px; /* Altezza della navbar */
    right: 1rem;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    width: 200px;
  }

  .nav-links.active {
    display: flex; /* Mostra il menu quando ha la classe .active */
  }
}