/* ============================================== */
/* === ESTILOS VIBRANTES Y PROFESIONALES (V3) === */
/* ============================================== */

/* --- 1. CONFIGURACIÓN GENERAL Y VARIABLES --- */
:root {
    --bg-color: #000000; 
    --card-color: rgba(17, 24, 39, 0.7); 
    --text-primary: #ffffff; 
    --text-secondary: #e5e7eb; 
    --accent-color: #22d3ee; 
    --accent-glow: rgba(34, 211, 238, 0.5); 
    --border-color: rgba(55, 65, 81, 0.7);
    --skill-bg: rgba(55, 65, 81, 0.8);
    --skill-hover-bg: rgba(75, 85, 99, 0.9);
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --overlay-text-color: #ffffff;
    --recess-color: #5cb383; /* Color para Recreo */
}
body.light-mode {
    --bg-color: #ffffff;
    --card-color: rgba(255, 255, 255, 0.7); 
    --text-primary: #111827; 
    --text-secondary: #374151; 
    --accent-color: #0891b2; 
    --accent-glow: rgba(8, 145, 178, 0.4); 
    --border-color: rgba(229, 231, 235, 0.9);
    --skill-bg: rgba(229, 231, 235, 0.8);
    --skill-hover-bg: rgba(209, 213, 219, 0.9);
    --overlay-bg: rgba(255, 255, 255, 0.7);
    --overlay-text-color: #111827;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Roboto', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-secondary); 
    margin: 0; 
    transition: background-color 0.3s ease; 
    overflow-x: hidden;
    position: relative;
}

/* --- EFECTO DE FONDO AURORA --- */
.aurora-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}
.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    transition: background 0.5s ease;
}
.aurora-shape1 {
    width: 500px; height: 500px;
    background: #5b21b6; /* Morado */
    top: -150px; left: -150px;
    animation: move1 20s infinite alternate;
}
.aurora-shape2 {
    width: 400px; height: 400px;
    background: #1d4ed8; /* Azul */
    bottom: -100px; right: -100px;
    animation: move2 18s infinite alternate;
}
.aurora-shape3 {
    width: 300px; height: 300px;
    background: #047857; /* Verde/Cian */
    bottom: 50px; left: 100px;
    animation: move3 22s infinite alternate;
}
body.light-mode .aurora-shape1 { background: #f9a8d4; }
body.light-mode .aurora-shape2 { background: #fde047; }
body.light-mode .aurora-shape3 { background: #7dd3fc; }

@keyframes move1 { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(200px, 100px) rotate(90deg); } }
@keyframes move2 { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-200px, -50px) rotate(-90deg); } }
@keyframes move3 { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(100px, -200px) rotate(180deg); } }

main, .header, .footer {
    position: relative;
    z-index: 1;
}

.container { padding: 100px 5%; max-width: 1200px; margin: 0 auto; }
.section-title, .portfolio-subtitle { 
    text-align: center; 
    font-size: 2.5em; 
    color: var(--text-primary);
    margin-bottom: 50px; 
    font-weight: 500;
}
a { color: var(--accent-color); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-primary); }

/* --- 2. BARRA DE NAVEGACIÓN --- */
.header {
    background-color: transparent;
}
.header.scrolled {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
body.light-mode .header.scrolled { background-color: rgba(255, 255, 255, 0.8); }

.header { position: fixed; top: 0; left: 0; width: 100%; box-sizing: border-box; z-index: 100; padding: 1rem 5%; display: flex; align-items: center; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.header-logo { font-weight: 700; font-size: 1.5em; color: var(--text-primary); text-decoration: none; }
.header-nav { margin-left: auto; }
.header-nav a { color: var(--text-secondary); text-decoration: none; margin-left: 1.5rem; font-weight: 500; transition: color 0.3s; white-space: nowrap; }
.header-nav a:hover { color: var(--accent-color); }
.hamburger-button { display: none; font-size: 1.8em; cursor: pointer; color: var(--text-primary); z-index: 1003; padding: 0.5rem; margin-left: auto; }
.mobile-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background-color: var(--card-color); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.5rem; z-index: 1002; transform: translateX(100%); transition: transform 0.3s ease-in-out; box-shadow: -5px 0 15px rgba(0,0,0,0.2); }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a { color: var(--text-primary); font-size: 1.2em; text-decoration: none; }
.page-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); z-index: 1001; }
.page-overlay.active { display: block; }

/* --- 3. SECCIONES --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-title { font-size: 3.8em; font-weight: 700; color: var(--text-primary); }
.hero-subtitle { font-size: 1.8em; margin-top: 1rem; }
.hero-subtitle .typed-text { color: var(--accent-color); font-weight: 500; }
.social-links { margin-top: 2rem; }
.social-links a { color: var(--text-secondary); font-size: 1.8em; margin: 0 1rem; transition: color 0.3s, transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); }
.social-links a:hover { color: var(--accent-color); transform: translateY(-5px) scale(1.1); }
        
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: center; }
.profile-picture-container img { 
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--border-color);
    margin: 0 auto;
}
.skills-container { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.skill-tag { 
    padding: 0.5rem 1rem; border-radius: 20px; font-weight: 500; font-size: 0.9em;
    background-color: var(--skill-bg); color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.skill-tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    background-color: var(--skill-hover-bg);
}
        
.portfolio-subtitle { text-align: center; font-size: 1.5em; color: var(--text-primary); margin-top: 4rem; margin-bottom: 2rem; }
.portfolio-grid { display: grid; gap: 1.5rem; }
.design-engraving-grid { grid-template-columns: repeat(4, 1fr); } 
.apps-grid, .ios-apps-grid { grid-template-columns: repeat(3, 1fr); }

.project-card { 
    position: relative;
    background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; 
    backdrop-filter: blur(5px);
    transition: transform 0.3s, box-shadow 0.3s; 
    transform-style: preserve-3d;
    cursor: pointer;
}
.project-card:hover { 
    transform: translateY(-10px) rotateX(7deg) rotateY(7deg);
    box-shadow: 0 0 25px var(--accent-glow);
}
.project-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background-color: var(--overlay-bg);
    color: var(--overlay-text-color);
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: .5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateZ(20px);
}
.project-card:hover .project-overlay {
    height: 100%;
    opacity: 1;
}
.overlay-text {
    color: var(--overlay-text-color);
    font-size: 1.2em;
    padding: 0.5em 1em;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.overlay-icon {
    font-size: 1.8em;
    color: var(--accent-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}
.project-card:hover .overlay-text,
.project-card:hover .overlay-icon {
    opacity: 1;
    transform: translateY(0);
}

.project-card.non-interactive { pointer-events: none; }
.project-card img, .project-card video { 
    width: 100%; height: 100%; object-fit: cover; display: block;
    backface-visibility: hidden;
}
        
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.contact-info p { font-size: 1.2em; display: flex; align-items: center; margin: 1.5rem 0; }
.contact-info .fa { color: var(--accent-color); margin-right: 1.5rem; font-size: 1.2em; }
.contact-logo img { max-width: 250px; border-radius: 12px; display: block; margin: 0 auto; }
.logo-dark { display: block; }
.logo-light { display: none; }
body.light-mode .logo-light { display: block; }
body.light-mode .logo-dark { display: none; }


.footer { text-align: center; padding: 2.5rem 1rem; background-color: transparent; }
.footer a { display: inline-block; padding: 0.75rem 1.5rem; background-color: var(--card-color); color: var(--text-primary); text-decoration: none; border-radius: 8px; transition: background-color 0.3s, transform 0.3s; }
.footer a:hover { background-color: var(--accent-color); transform: translateY(-3px); }
        
/* --- 4. COMPONENTES Y ANIMACIONES --- */
.theme-toggle { position: fixed; bottom: 1.5rem; right: 1.5rem; background-color: #F9FAFB; color: #111827; border: 1px solid #E5E7EB; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; font-size: 1.2em; display: flex; justify-content: center; align-items: center; transition: all 0.3s ease; z-index: 999; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); }
.theme-toggle .fa-sun-o { display: block; } .theme-toggle .fa-moon-o { display: none; }
body.light-mode .theme-toggle { background-color: #1F2937; color: #F9FAFB; border: 1px solid #374151; }
body.light-mode .theme-toggle .fa-sun-o { display: none; } body.light-mode .theme-toggle .fa-moon-o { display: block; }

.modal { display: none; position: fixed; z-index: 1003; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-content { margin: auto; display: block; max-width: 80%; max-height: 80vh; animation: zoom 0.3s; }
@keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} }
.modal-caption { margin: auto; display: block; width: 80%; text-align: center; color: #ccc; padding: 10px 0; }
.modal-close { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.modal-close:hover { color: #bbb; }

.fade-in, .slide-in-left, .slide-in-right {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.slide-in-left { transform: translateX(-50px); }
.slide-in-right { transform: translateX(50px); }
.fade-in.visible, .slide-in-left.visible, .slide-in-right.visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

/* --- 5. RESPONSIVE --- */
.desktop-schedule { display: block; }
.mobile-schedule-wrapper { display: none; }

@media (max-width: 992px) {
    .header-nav { display: none; }
    .hamburger-button { display: block; }
    .hero-title { font-size: 2.8em; }
    .hero-subtitle { font-size: 1.4em; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-grid .profile-picture-container { margin: 0 auto 2rem auto; }
    .design-engraving-grid { grid-template-columns: repeat(2, 1fr); } 
    .apps-grid, .ios-apps-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; text-align: center; }
    .contact-logo { order: -1; margin-bottom: 2rem; }
}
@media (max-width: 768px) {
    .desktop-schedule { display: none; }
    .mobile-schedule-wrapper { display: block; }
}
@media (max-width: 600px) {
    .design-engraving-grid, .apps-grid, .ios-apps-grid { grid-template-columns: 1fr; }
}

/* --- ESTILOS PARA LA PÁGINA DE HORARIO --- */
.current-class-info { margin-top: 2rem; padding: 1.5rem; background-color: var(--card-color); border: 1px solid var(--border-color); border-radius: 12px; text-align: center; backdrop-filter: blur(5px); }
.current-class-info p { margin: 0.5rem 0; font-size: 1.2em; color: var(--text-secondary); }
.current-class-info .class-name { font-size: 1.5em; font-weight: 500; color: var(--text-primary); }
.current-class-info .class-name span { color: var(--accent-color); }
.current-class-info .professor-name { font-style: italic; }
.quick-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.link-button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.5rem; background-color: var(--card-color); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 50px; text-decoration: none; font-weight: 500; transition: transform 0.3s ease, background-color 0.3s ease; }
.link-button:hover { transform: scale(1.05); background-color: var(--accent-color); color: #ffffff; }
/* Horario de Escritorio */
.schedule-table { width: 100%; border-collapse: collapse; background-color: var(--card-color); backdrop-filter: blur(5px); border-radius: 12px; overflow: hidden; font-size: 0.9em; table-layout: fixed; }
.schedule-table th, .schedule-table td { border: 1px solid var(--border-color); padding: 0.8rem; text-align: center; vertical-align: middle; }
.schedule-table th { background-color: rgba(0,0,0,0.2); color: var(--text-primary); font-weight: 500; }
.schedule-table .time-slot { font-weight: 500; color: var(--text-secondary); }
.schedule-table td strong { color: var(--text-primary); font-size: 1.1em; }
.schedule-table .recreo { font-weight: 500; color: var(--recess-color); }
.schedule-table .sin-clase { color: var(--text-secondary); opacity: 0.6; }
.schedule-table .current-class, .schedule-table .current-time { background-color: var(--accent-color) !important; box-shadow: inset 0 0 15px rgba(0,0,0,0.3); }
.schedule-table .current-class strong, .schedule-table .current-class, .schedule-table .current-time { color: #ffffff !important; opacity: 1; }
.schedule-table .current-class.recreo { color: #ffffff !important; }

/* Selector de Días para Móvil */
.day-selector {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.day-selector button {
    flex-grow: 1;
    padding: 0.75rem 0.5rem;
    font-size: 1em;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}
.day-selector button.active {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

/* Horario Móvil */
.mobile-schedule-entry {
    display: grid;
    grid-template-columns: 100px 1fr; /* Columna de hora fija */
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background-color: var(--card-color);
    overflow: hidden;
}
.mobile-time, .mobile-class {
    padding: 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.mobile-time {
    font-weight: 500;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9em;
}
.mobile-class strong {
    font-size: 1.1em;
    color: var(--text-primary);
}
.mobile-schedule-entry.recreo-row {
    display: block; /* Anula el grid para el recreo */
}
.mobile-schedule-entry.recreo-row .mobile-class.recreo {
    font-weight: 500;
    color: var(--recess-color);
}
.mobile-class.sin-clase { opacity: 0.6; }

.mobile-schedule-entry.current-class {
    background-color: var(--accent-color);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
}
.mobile-schedule-entry.current-class .mobile-time,
.mobile-schedule-entry.current-class .mobile-class,
.mobile-schedule-entry.current-class .mobile-class strong {
    color: #ffffff;
}
.mobile-schedule-entry.current-class .mobile-class.recreo {
    color: #ffffff;
}

/* --- ESTILOS PARA RELOJ Y BUSCADOR --- */
.digital-clock {
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--card-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-left: 2rem;
    white-space: nowrap;
}
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}
.search-container form {
    width: 100%;
}
.search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-secondary);
}
.search-bar {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    font-size: 1em;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--card-color);
    color: var(--text-primary);
    box-sizing: border-box;
    transition: box-shadow 0.3s;
}
.search-bar:focus {
    outline: none;
    box-shadow: 0 0 15px var(--accent-glow);
}

@media (max-width: 992px) {
    .digital-clock { display: none; }
}

/* ============================================== */
/* === ESTILOS PARA PÁGINAS DE ERROR === */
/* ============================================== */
.error-container { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 100vh; padding: 2rem; position: relative; z-index: 1; box-sizing: border-box; }
.error-container .error-code { font-size: 10rem; font-weight: 700; line-height: 1; color: var(--accent-color); text-shadow: 0 0 15px var(--accent-glow); }
.error-container .error-title { font-size: 2.5rem; color: var(--text-primary); margin-top: 0; margin-bottom: 1rem; }
.error-container .error-message { font-size: 1.1rem; color: var(--text-secondary); max-width: 500px; margin-bottom: 2.5rem; }
.error-container .button-home { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.8rem; background-color: var(--card-color); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 50px; text-decoration: none; font-weight: 500; transition: transform 0.3s ease, background-color 0.3s ease; }
.error-container .button-home:hover { transform: scale(1.05); background-color: var(--accent-color); color: #ffffff; }
