:root {
  --primary: #0f172a;
  --secondary: #38bdf8;
  --accent: #22c55e;
  --background: #020617;
  --text: #f8fafc;
  --muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background: radial-gradient(circle at top, #020617, #000);
  color: var(--text);
  line-height: 1.7;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;

  background-image: url('assets/banner.jpg');
  background-size: cover;
  background-position: center;
  position: center
  relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.7); 
  z-index: 1; 
}

.hero-content {
  position: relative; 
  z-index: 2; 
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  width: 100%;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-text span {
  color: var(--secondary);
}

.hero-text p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-buttons a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.btn-primary {
  background: var(--secondary);
  color: var(--primary);
}

.btn-secondary {
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.hero-buttons a:hover {
  transform: translateY(-4px);
}

/* ===== FOTO PERFIL ===== */
.profile-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-frame {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  padding: 6px;
  animation: float 4s ease-in-out infinite;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background-color: #020617;
}

/* ===== SECCIONES ===== */
section {
  max-width: 1100px;
  margin: auto;
  padding: 4rem 2rem;
}

h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--secondary);
}

/* ===== TECNOLOGÍAS ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.tech-card {
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-8px);
}

.tech-card img {
  width: 48px;
  margin-bottom: 0.75rem;
}

/* ===== PROYECTOS ===== */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease; /* Changed to 'all' to transition the box-shadow */
  width: 100%;
  max-width: 700px;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.4);
}

.project-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.project-card h3 {
  color: var(--accent);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  color: var(--accent);
  border: 1px solid var(--accent);
  background-color: transparent;
  box-shadow: 0 0 2px var(--accent), 0 0 5px rgba(34, 197, 94, 0.7);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  color: var(--primary);
  background-color: var(--accent);
  box-shadow: 0 0 4px var(--accent), 0 0 10px var(--accent), 0 0 15px var(--accent);
}

.btn-repo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.4rem;
  margin-top: 1rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  color: var(--secondary);
  border: 2px solid var(--secondary);
  background-color: transparent;
  transition: all 0.3s ease;
  box-shadow: 0 0 3px var(--secondary), 0 0 8px var(--secondary, 0.8);
}

.btn-repo:hover {
  background-color: var(--secondary);
  color: var(--primary);
  box-shadow: 0 0 5px var(--secondary), 0 0 15px var(--secondary), 0 0 25px var(--secondary);
  transform: translateY(-3px);
}

/* ===== CONTACTO  ===== */
.contact-section {
  padding: 4rem 2rem;
}

.contact-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; /* Reducido */
  max-width: 1100px;
  margin: auto;
}



.contact-left, .contact-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-btn-vertical {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem; 
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted); 
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.3s ease;
}

.contact-btn-vertical:hover {
  background-color: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--secondary);
  transform: translateX(5px);
}

.contact-btn-vertical i {
  font-size: 1.2rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background-color: rgba(0, 217, 255, 0.1);
  color: #00d9ff;
  text-shadow: 0 0 10px #00d9ff, 0 0 2px #fff;
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.3);
  text-align: center;
  transition: all 0.3s ease;
}

hr.info-divider {
  border: none;
  height: 1px;
  background-color: rgba(56, 189, 248, 0.2);
  margin: 1rem 0; 
}

.info-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 20px;
  padding: 1.5rem; 
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.info-box:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.info-icon {
  font-size: 2rem; 
  color: var(--secondary);
  margin-bottom: 1rem; 
}

.info-box h3 {
  color: var(--text);
  margin-bottom: 0.8rem;
  font-size: 1.2rem; 
}

.info-subtitle {
  color: var(--text);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.info-box p {
  color: var(--muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.info-box ul {
  list-style: none;
  padding: 0;
  color: var(--muted);
  text-align: left;
  display: inline-block;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.info-box li {
  margin-bottom: 0.6rem; 
  position: relative;
  padding-left: 1.5rem;
}

.info-box li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--accent);
}

.info-box .btn-primary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  background: var(--secondary);
  color: var(--primary);
  transition: transform 0.3s ease;
}

/* Caja de CTA destacada */
.cta-box {
  background: linear-gradient(145deg, var(--primary), #1e293b);
  border-color: var(--secondary);
}

.cta-box h3 {
  color: var(--secondary);
}

.info-box .btn-primary:hover {
  transform: translateY(-4px);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* ===== SCROLL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ANIMACIONES ===== */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
}

.idea-box {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.15), #131c31);
  border-color: rgba(34, 197, 94, 0.6);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

/* ===== FORMULARIO DE CONTACTO ===== */
#contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

#contact-form .form-group {
    width: 100%;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

#contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

#contact-form button {
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

@media (max-width: 480px) {
    section {
        padding: 3rem 1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .photo-frame {
        width: 200px;
        height: 200px;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .project-card {
        padding: 1.5rem;
    }
}