/* VARIABLES Y TEMAS */
:root[data-theme="light"] {
    --bg: #ffffff;
    --text: #2c3e50;
    --text-muted: #546e7a;
    --card-bg: #f8f9fa;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --accent: #e67e22;
    --accent-hover: #d35400;
    --border: #e0e0e0;
}

:root[data-theme="dark"] {
    --bg: #121212;
    --text: #eceff1;
    --text-muted: #b0bec5;
    --card-bg: #1e1e1e;
    --nav-bg: rgba(18, 18, 18, 0.98);
    --accent: #f39c12;
    --border: #333333;
}

/* RESET Y COMPORTAMIENTO GLOBAL */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth; /* Animación de desplazamiento suave */
}

body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
    transition: background-color 0.3s, color 0.3s;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }

/* NAVEGACIÓN Y ANIMACIONES DE MENÚ */
#navbar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 8%; 
    height: 80px; 
    background: var(--nav-bg);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.nav-logo-img { 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    border: 2px solid var(--accent);
    transition: transform 0.3s ease;
}

.nav-logo-img:hover {
    transform: rotate(15deg) scale(1.1);
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 2.5rem; 
    align-items: center; 
}

/* AQUÍ RECUPERAMOS LAS ANIMACIONES */
.nav-links a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 600; 
    font-size: 1.05rem;
    position: relative;
    transition: color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.nav-links a:hover { 
    color: var(--accent); 
    transform: scale(1.15); /* Efecto de crecimiento que mencionaste */
}

/* Línea decorativa inferior al hacer hover */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ESTILO PARA EL BOTÓN DE TEMA */
#theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s;
    padding: 5px;
}

#theme-toggle:hover {
    transform: rotate(30deg) scale(1.2);
    color: var(--accent);
}

/* HEADER INICIO */
header#inicio {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('img/arduino-header.jpg');
    background-size: cover; 
    background-position: center;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    text-align: center;
}

/* SOBRE MÍ (LAYOUT INVERTIDO) */
.two-column-profile {
    display: flex; 
    align-items: center; 
    gap: 60px; 
    flex-wrap: wrap;
}

.profile-text { flex: 1; min-width: 320px; }
.profile-image { flex: 1; min-width: 320px; position: relative; text-align: center; }

.profile-image img {
    width: 100%; 
    max-width: 420px; 
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2); 
    z-index: 2; 
    position: relative;
}

.image-border-decor {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 100%; 
    height: 100%;
    border: 2px solid var(--accent); 
    border-radius: 20px; 
    z-index: 1;
}

.accent-title { color: var(--accent); font-size: 2.2rem; margin-bottom: 15px; }

.quote-box {
    border-left: 5px solid var(--accent); 
    padding-left: 20px;
    font-size: 1.25rem; 
    font-style: italic; 
    margin: 25px 0;
    color: var(--text-muted);
}

/* GRID DE TARJETAS (ESTUDIANTES Y DOCENTES) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg); 
    padding: 40px 30px; 
    border-radius: 15px;
    text-align: center; 
    border: 1px solid var(--border);
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, border-color 0.3s;
}

.card:hover { 
    transform: translateY(-15px); 
    border-color: var(--accent); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}

.card i { 
    font-size: 3rem; 
    color: var(--accent); 
    margin-bottom: 20px; 
    transition: transform 0.3s ease;
}

.card:hover i {
    transform: scale(1.2);
}

.highlight-card { 
    border: 1px solid var(--accent); 
    background: rgba(230, 126, 34, 0.03); 
}

/* BOTONES */
.btn-link, .btn-prog {
    background: var(--accent); 
    color: white !important; 
    padding: 12px 30px;
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: bold; 
    display: inline-block;
    transition: background 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
}

.btn-link:hover, .btn-prog:hover { 
    background: var(--accent-hover); 
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

/* FOOTER */
#main-footer {
    padding: 60px 0;
    text-align: center;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
}

/* RESPONSIVIDAD */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Podrías implementar un menú hamburguesa luego */
    .two-column-profile { flex-direction: column-reverse; text-align: center; }
    .quote-box { border-left: none; border-top: 3px solid var(--accent); padding: 20px 0 0 0; }
}

/* Estilos para el botón hamburguesa - Oculto por defecto */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1100;
}

@media (max-width: 768px) {
  .hamburger {
    display: block; /* Se muestra solo en móviles */
  }

  .nav-links {
    display: flex; /* Cambiamos de 'none' a 'flex' para controlarlo con JS */
    flex-direction: column;
    position: fixed;
    top: 80px;
    right: -100%; /* Escondido a la derecha */
    background: var(--nav-bg);
    width: 100%;
    height: calc(100vh - 80px);
    gap: 2rem;
    padding: 40px;
    transition: 0.4s ease-in-out;
    text-align: center;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    right: 0; /* Entra a la pantalla */
  }
}