/* =============================================
   PORTAFOLIO AUDIOVISUAL - Aaron Gafet Ordenes
   style.css - Todos los estilos del portafolio
   ============================================= */

:root {
    --bg-main: #0f172a;
    --bg-sidebar: #020617;
    --accent: #0ea5e9;
    --accent-hover: #38bdf8;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #1e293b;
    --card-bg: #1e293b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* SCROLLBAR CUSTOMIZATION */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body {
    font-family: 'Outfit', sans-serif;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    overflow: hidden;
}

/* ===================
   LAYOUT PRINCIPAL
   =================== */

.cv-wrapper {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-main);
    display: flex;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

/* ===================
   SIDEBAR
   =================== */

.sidebar {
    width: 300px;
    flex-shrink: 0;
    background-color: var(--bg-sidebar);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.profile-pic {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    background-color: var(--card-bg);
    border: 2px solid var(--accent);
    margin: 0 auto 20px auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.15);
    flex-shrink: 0;
}

.profile-pic::before {
    content: "\f030";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 40px;
    color: var(--accent);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.section-title-side {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin: 20px 0 12px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    font-weight: 800;
}

.contact-list { list-style: none; font-size: 12.5px; color: var(--text-secondary); }
.contact-list li { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.contact-list i { color: var(--accent); font-size: 14px; width: 16px; text-align: center; }
.contact-list a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s; word-break: break-word; }
.contact-list a:hover { color: var(--accent); }

.skills-container { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tag {
    background-color: var(--card-bg);
    color: var(--accent);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #334155;
}

/* ===================
   ÁREA DE CONTENIDO PRINCIPAL
   =================== */

.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 30px 40px;
    position: relative;
}

.main-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14,165,233,0.08) 0%, rgba(15,23,42,0) 70%);
    pointer-events: none;
    z-index: 0;
}

header { margin-bottom: 25px; position: relative; z-index: 1; flex-shrink: 0; }

.name {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.name span { color: var(--accent); }

.role {
    font-size: 16px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Grid de dos columnas: la izquierda sticky, la derecha con scroll natural */
.content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 35px;
    align-items: start;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Columna izquierda: se mantiene fija mientras scrollea la derecha */
.col-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 30px;
    align-self: start;
    overflow: visible;
}

/* Columna derecha: flujo natural, pasa por encima del lado izquierdo */
.col-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow: visible;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 6px;
}
.section-title i { color: var(--accent); }

/* ===================
   REPRODUCTOR TIPO ROCOLA (VIMEO)
   =================== */

.jukebox-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.video-title-bar {
    background-color: var(--accent);
    color: #020617;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 13px;
    border-radius: 6px 6px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===================
   CARRUSEL DE MINIATURAS (VIDEOS)
   =================== */

.carousel-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.carousel-btn {
    background-color: var(--border-color);
    border: 1px solid #334155;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 13px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.carousel-btn:hover {
    background-color: var(--accent);
    color: #020617;
    border-color: var(--accent);
    transform: scale(1.1);
}

.carousel-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px;
    flex-grow: 1;
    min-width: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.thumbnail {
    flex: 0 0 130px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: #000;
}
.thumbnail.active {
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.thumbnail:hover img { opacity: 1; }
.thumbnail.active img { opacity: 1; }

.thumbnail .thumb-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    font-size: 9.5px;
    padding: 12px 4px 4px 4px;
    text-align: center;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* ===================
   VISOR DE FOTOGRAFÍAS (BACKSTAGE)
   =================== */

.photo-viewer {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.photo-main-wrapper {
    width: 100%;
    max-height: 70vh;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.photo-main-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
    display: block;
}

.photo-watermark {
    position: absolute;
    bottom: 12px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-secondary);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.photo-counter {
    position: absolute;
    top: 12px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-nav-btn {
    background-color: var(--border-color);
    border: 1px solid #334155;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.photo-nav-btn:hover {
    background-color: var(--accent);
    color: #020617;
    border-color: var(--accent);
    transform: scale(1.1);
}

/* ===================
   LIGHTBOX 
   =================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    display: flex;
    opacity: 1;
}

.lightbox__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lightbox__img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10001;
    border-radius: 4px;
    transition: background 0.3s;
}

.lightbox__nav:hover { 
    background: var(--accent); 
    color: #020617; 
}

.lightbox__prev { left: 30px; }
.lightbox__next { right: 30px; }

.lightbox__counter {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ===================
   TEXTOS, TIMELINE Y FORMACIÓN
   =================== */

.profile-text { font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); text-align: justify; }

.timeline { border-left: 2px solid var(--border-color); padding-left: 20px; margin: 10px 0 0 8px; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute; left: -27px; top: 4px; width: 9px; height: 9px;
    background-color: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent);
}
.timeline-date { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-bottom: 3px; letter-spacing: 1px; }
.timeline-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.timeline-company { font-size: 12.5px; color: #fff; margin-bottom: 6px; font-style: italic; }
.timeline-desc { list-style: none; font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.timeline-desc li { position: relative; padding-left: 12px; margin-bottom: 4px; }
.timeline-desc li::before { content: "•"; color: var(--accent); position: absolute; left: 0; top: 0; font-size: 14px; }

.edu-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
    padding: 12px;
    border-radius: 0 6px 6px 0;
    margin-top: 10px;
}

/* ===================
   CERTIFICACIONES Y DIPLOMAS
   =================== */

.subsection-title {
    font-size: 15px;
    color: var(--text-primary);
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.certs-container { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    padding: 7px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #334155;
    transition: all 0.2s;
    background-color: rgba(30, 41, 59, 0.5);
}
.cert-btn:hover {
    background-color: var(--accent);
    color: #020617;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}
.cert-btn i { color: var(--accent); font-size: 14px; }
.cert-btn:hover i { color: #020617; }

/* ===================
   RESPONSIVE DESIGN
   =================== */

@media screen and (max-width: 1200px) {
    body { overflow: auto; height: auto; }
    .cv-wrapper { height: auto; min-height: 100vh; }
    .main-wrapper { overflow: visible; }
    .content-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        overflow: visible;
    }
    .col-left {
        position: static;
        overflow: visible;
    }
    .col-right {
        overflow: visible;
    }
}

@media screen and (max-width: 768px) {
    .cv-wrapper { flex-direction: column; height: auto; }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        overflow: visible;
    }
    .main-wrapper { padding: 20px; overflow: visible; }
    .profile-pic { width: 180px; }
    .name { font-size: 30px; }
    .role { font-size: 14px; }
}