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

html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: #0f0f0f;
    color: white;
    font-family: 'Inter', sans-serif;
}

body {
    line-height: 1.7;
    font-size: 18px;
    background-image: 
        linear-gradient(rgba(255,90,42,0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,90,42,0.3) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.9) 50%, transparent 20%);
    background-size: 40px 40px, 40px 40px, 100% 4px;
    animation: bgmove 80s linear infinite;
}

@keyframes bgmove {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 400px 400px, 400px 400px, 0 200px; }
}

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    padding-left: 20px;
    z-index: 1000;
    border-bottom: 1px solid #222;
}
.topbar img { height: 80px; width: auto; opacity: 0.95; }

/* HERO SECTION */
.hero { 
    text-align: center; 
    padding: 220px 20px 70px 20px; 
    max-width: 1100px; 
    margin: 0 auto; 
}
.hero .bobbysmazes_logo { 
    width: 100%; 
    max-width: 480px; 
    height: auto; 
    margin-bottom: 20px; 
}

h1, h2, h3 { font-family: 'Press Start 2P', cursive; color: #ff5a2a; letter-spacing: 2px; }
h1 { font-size: 36px; margin-bottom: 20px; }
h2 { font-size: 24px; margin-bottom: 20px; padding-top: 20px; }
h3 { font-size: 18px; margin-bottom: 15px; }
b, strong { color: #ff5a2a; }

/* TEXTOS */
.tagline { font-size: 22px; font-weight: 600; margin-bottom: 30px; color: #eee; }
.undertagline { font-size: 18px; color: #ccc; max-width: 900px; margin: 0 auto; }
.project-text { margin-bottom: 15px; }

/* SEPARATOR */
.separator { border: none;
    height: 3px;
    background: #666;
    margin: 10px auto;
    width: 80%;}

/* PROJECTS */
.projects { max-width: 1100px; margin: auto; padding: 20px; }
.project { 
    background: #1b1b1b; 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.6); 
    margin-bottom: 60px; 
    position: relative; 
}
.featured { border: 2px solid #ff5a2a; }

/* MEDIA */
.media-container { text-align: center; margin-bottom: 20px; width: 100%; overflow: hidden; border-radius: 8px; border: 1px solid #333;}
.media-container iframe { width: 100%; max-width: 800px; height: 450px; border: none; }
.media-container img { width: 100%; max-width: 800px; height: auto; }

.feature-row { display: flex; align-items: center; gap: 40px; margin: 40px 0; }
.feature-media { flex: 1; max-width: 500px; }
.feature-media-little { flex: 1; max-width: 350px; }
.feature-media video, .feature-media-little video, .feature-media img, .feature-media-little img { width: 100%; border-radius: 8px; display: block; }
.feature-text { flex: 1.2; }

/* THUMBNAILS */
.thumbnails { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.thumbnails img { width: 100px; height: 65px; object-fit: cover; cursor: pointer; border-radius: 4px; transition: 0.2s; border: 2px solid transparent; }
.thumbnails img:hover { transform: scale(1.05); border-color: #ff5a2a; }

/* PROGRESS BAR RETRO */
.progress-wrapper { margin: 30px auto; text-align: center; max-width: 600px; }
.progress-label { 
    font-family: 'Press Start 2P', cursive; 
    color: #ff5a2a; 
    font-size: 14px; 
    margin-bottom: 15px; 
    display: block;
}
.progress-bar { width: 100%; height: 30px; background: #111; border: 2px solid #ff5a2a; border-radius: 4px; overflow: hidden; }
.progress-fill { 
    height: 100%; 
    width: 0; 
    background: repeating-linear-gradient(45deg, #ff5a2a, #ff5a2a 10px, #ff7a4a 10px, #ff7a4a 20px); 
    transition: width 2s ease-out; 
}
.progress-fill.active { width: 85%; }

/* STICKY INDEX DESKTOP */
#sticky-index {
    position: fixed; 
    top: 100px; 
    left: 0; 
    right: 0;
    background: rgba(15,15,15,0.98); 
    border-bottom: 2px solid #ff5a2a;
    z-index: 999; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 5px 0; 
    gap: 8px; 
    font-family: 'Press Start 2P', cursive;
}

/* Logo clickable en el índice */
.sticky-logo {
    height: 42px;
    width: auto;
    margin-right: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.sticky-logo:hover { transform: scale(1.1); }

#sticky-index a { color: #ff5a2a; text-decoration: none; font-size: 9px; padding: 5px 8px; transition: 0.2s; white-space: nowrap; }
#sticky-index a.active { background: #ff5a2a; color: black; border-radius: 2px; }

/* MOBILE MENU - OVERLAY */
#sticky-index-toggle {
    display: none; 
    position: fixed; 
    top: 105px; 
    right: 20px; 
    z-index: 1200;
    font-size: 16px; 
    color: #ff5a2a; 
    cursor: pointer; 
    font-family: 'Press Start 2P', cursive;
    background: #0f0f0f; 
    padding: 10px; 
    border: 1px solid #ff5a2a;
}

@media (max-width: 800px) {
    .topbar { height: 80px; }
    .topbar img { height: 60px; }
    #sticky-index-toggle { display: block; top: 90px; }
    
    .sticky-logo { 
        display: block; 
        height: 45px; 
        margin-bottom: 40px; 
        margin-right: 0;
        opacity: 1;
    }

    #sticky-index {
        top: 0; 
        left: 0; 
        width: 280px; 
        height: 100vh;
        position: fixed; 
        flex-direction: column; 
        justify-content: flex-start; 
        align-items: flex-start;
        padding: 140px 30px 40px 30px; 
        transform: translateX(-100%); 
        transition: transform 0.3s ease;
        border-right: 2px solid #ff5a2a; 
        background: #0f0f0f;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }
    #sticky-index.mobile-active { transform: translateX(0); }
    /* Enlaces más grandes en móvil para facilitar el clic táctil */
    #sticky-index a { 
        font-size: 12px; 
        padding: 12px 0; 
        width: 100%; 
        text-align: left; 
        border-bottom: 1px solid #222; /* Separador sutil */
    }
    #sticky-index a:last-child { border-bottom: none; }
    
    .hero { padding-top: 160px; }
    .hero .bobbysmazes_logo { max-width: 320px; }
    .feature-row { flex-direction: column; text-align: center; }
}

/* CONTACT */
.contact { text-align: center; padding: 20px 20px; max-width: 1100px; margin: 0 auto; }
form { max-width: 600px; margin: 30px auto; display: flex; flex-direction: column; gap: 15px; }
input, textarea { padding: 15px; border-radius: 4px; border: 1px solid #333; background: #FFFFFF; color: #333; font-family: 'Inter', sans-serif; }
button { padding: 18px; background: #ff5a2a; color: white; border: none; cursor: pointer; font-family: 'Press Start 2P', cursive; font-size: 14px; transition: 0.2s; }
button:hover { background: #ff7a4a; }

footer { text-align: center; padding: 40px; opacity: 0.6; font-size: 14px; }