/* Reset base */
* {
    box-sizing: border-box;
}

body {
    background-color: #121417;
    color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background-color: #1c1f26;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.7);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
    color: #ffffff;
}

nav a {
    color: #f5f5f5;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: #ffa10a;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('img/hero.jpg') center/cover no-repeat;
    color: white;
    height: 80vh;  /* Altezza: 80% della finestra del browser */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(10, 132, 255, 0.8);
}

.hero p {
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 0 0 6px rgba(0,0,0,0.8);
}

/* About Section */
.about {
    background-color: #1c1f26;
    padding: 3rem 1rem;
    border-radius: 8px;
    margin: 2rem 0;
    margin: 0 auto;
} 

.about h2 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 2rem;
}

.about p {
    margin-bottom: 1rem;
    color: #c0c0c0;
    font-size: 1.1rem;
}

/* CTA Section */
.cta {
    background-color: #ffa10a;
    color: #fff;
    text-align: center;
    padding: 2.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.cta h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.button {
    background-color: #10B981;
    color: white;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.button-portfolio {
    background-color: #993D00;
    color: white;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #003f8a;
}

/* Contact Section */
.contact {
    background-color: #1c1f26;
    padding: 3rem 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.contact h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.contact form {
    display: flex;
    flex-direction: column;
}

.contact input[type="text"],
.contact input[type="email"],
.contact textarea {
    background-color: #121417;
    border: 1px solid #333841;
    color: #f5f5f5;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.contact input[type="text"]:focus,
.contact input[type="email"]:focus,
.contact textarea:focus {
    border-color: #ffa10a;
    outline: none;
}

.contact button {
    align-self: flex-start;
}

/* Animazioni fade-in */
.anim {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.anim.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    background-color: #1c1f26;
    color: #888c9b;
    text-align: center;
    padding: 1.25rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid #333841;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav a {
        margin-left: 1rem;
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about h2,
    .cta h2,
    .contact h2 {
        font-size: 1.5rem;
    }
}


/******* SEZIONE PER IL PORTFOLIO */
#portfolio-page .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 2rem; /* Maggiore spazio tra celle sia orizzontalmente che verticalmente */
}

#portfolio-page .portfolio-item {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;

  /* Rettangolo 2:1 */
  aspect-ratio: 1 / 2;

  /* Padding interno per il contenuto */
  padding: 0.75rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#portfolio-page .portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Mostra l’immagine intera con padding */
}

#portfolio-page .portfolio-item h3 {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  margin: 0;
  padding: 0.5rem;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  #portfolio-page .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #portfolio-page .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #portfolio-page .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* SEZIONE DEL PORTFOLIO DETTAGLIO */
.portfolio-detail-images {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.portfolio-detail-images img {
    width: 100%;
    max-width: 300px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
    padding: 0.5rem;
}

.platform-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.platform-links img {
    width: 150px;
    height: auto;
}


/* SEZIONE DI ANIMAZIONE DELLA HERO */
.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid white;
  animation: typing 3s steps(30, end), blink-caret 0.75s step-end infinite;
  font-size: 2.5rem;
  color: white;
  max-width: 24ch; 
}

@keyframes typing {
  from { width: 0; }
  to { width: 24ch; }
}

@keyframes blink-caret {
  50% { border-color: transparent; }
  100% { border-color: white; }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s ease forwards;
  color: white;
  font-size: 3rem;
  text-align: center;
  margin-bottom: 2rem;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wave-effect {
  font-size: 3rem;
  color: white;
  display: inline-block;
}

.wave-effect span {
  display: inline-block;
  animation: wave 1.5s infinite;
  animation-delay: calc(var(--i) * 0.1s);
}

@keyframes wave {
  0%, 60%, 100% {
    transform: translateY(0);
    color: white;
  }
  30% {
    transform: translateY(-10px);
    color: #ffa500; 
  }
}


.hero h2 {
    color: white;
    font-size: 3rem;
    animation: zoomGlow 2s ease forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}


.hero p {
    color: white;
    font-size: 1.5rem;
    animation: zoomGlow 2s ease forwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

@keyframes zoomGlow {
    from {
        opacity: 0;
        transform: scale(0.9);
        text-shadow: none;
    }
    to {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    }
}

/*  SEZIONE HIGH TEC */
/*
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

.hero.hightech {
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    color: #fff;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero.hightech h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #00c8ff;
    animation: neonGlow 3s ease-in-out infinite alternate;
    text-shadow: 0 0 10px #00c8ff, 0 0 20px #00c8ff, 0 0 40px #00c8ff;
}

.hero.hightech .subtext {
    margin-top: 1.5rem;
    font-size: 1.3rem;
    color: #ccc;
    animation: fadeInUp 2s ease forwards;
}

@keyframes neonGlow {
    0% {
        text-shadow: 0 0 5px #00c8ff, 0 0 15px #00c8ff, 0 0 30px #00c8ff;
    }
    100% {
        text-shadow: 0 0 15px #00c8ff, 0 0 30px #00c8ff, 0 0 60px #00c8ff;
    }
}

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

@media (max-width: 768px) {
    .hero.hightech h2 {
        font-size: 2.2rem;
    }
    .hero.hightech .subtext {
        font-size: 1rem;
    }
} */
