/* Font e reset base */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

header h1 {
  font-weight: 600;
  font-size: 3rem;
  margin: 0;
  color: #6ca0dc;
}

header p {
  margin: 0.5rem 0 1.5rem;
  color: #aab8d3;
  font-weight: 400;
}

nav a {
  color: #6ca0dc;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover,
nav a:focus {
  color: #6ca0dc;
  outline: none;
  text-decoration: underline;
}

/* Box contenuto */
.intro-box {
  max-width: 700px;
  background: rgba(255 255 255 / 0.05);
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.intro-box:hover,
.intro-box:focus-within {
  background: rgba(255 255 255 / 0.1);
}

/* Titoli sezioni */
h2 {
  color: #6ca0dc;
  margin: 1rem 0 1rem;
  font-weight: 600;
  font-size: 1rem;
}

/* Wrapper griglia progetti */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Progetti (unificato) */
.project-card {
  background: rgba(255 255 255 / 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  margin-top: 0;
  color: #6ca0dc;
}

.project-card a {
  color: #6ca0dc;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-top: auto;
}

.project-card a:hover,
.project-card a:focus {
  text-decoration: underline;
  outline: none;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #777;
  margin-top: auto;
  background: rgba(0 0 0 / 0.3);
}

/* Link email */
a[href^="mailto:"] {
  color: #6ca0dc;
  text-decoration: none;
}

a[href^="mailto:"]:hover,
a[href^="mailto:"]:focus {
  text-decoration: underline;
  outline: none;
  cursor: pointer;
}

/* Sezione contatti */
#contact a {
  color: #6ca0dc;
  font-weight: bold;
}

#contact a:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 600px) {
  .intro-box {
    margin: 1rem;
    padding: 1.2rem;
  }

  header h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}
