/* --- Reset Básico y General --- */
* {
    box-sizing: border-box;
    border-radius: 0 !important;
    /* Esquinas cuadradas típicas de la época */
}

body {
    background-color: #008080;
    /* Fondo verde azulado del escritorio (fallback) */
    color: #000000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    /* Necesario para que body::before se posicione respecto a body */
}

body::before {
    content: "";
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: url('fondo2.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(12px);
    /* Difuminado gaussiano */
    z-index: -1;
    pointer-events: none;
}

.site-container {
    width: calc(100% - 24px);
    max-width: 1100px;
    margin: 20px auto;
    /* Flota en el centro con margen vertical */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Los bordes Win95, fondo gris y sombras se heredan de la clase .window de 98.css */
}

/* --- Dynamic Title Banner --- */
.top-banner {
    background: #081078;
    /* Azul marino sólido clásico */
    color: #ffffff;
    padding: 16px 24px;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 38px;
    font-weight: bold;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #000000;
    margin: 0;
    user-select: none;
}

/* --- News Ticker (Marquesina de corrido) --- */
.news-ticker-container {
    padding: 0;
    background-color: #808080;
    border-bottom: 2px solid #000000;
}

.news-ticker {
    overflow: hidden;
    position: relative;
    height: 34px;
    background-color: #808080;
    /* Fondo gris oscuro */
    border: none;
    box-shadow: none;
}

.ticker-wrapper {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: ticker-crawl 120s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding-right: 50px;
    /* Espaciado entre noticias */
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #ffffff;
    /* Texto blanco */
}

@keyframes ticker-crawl {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* --- Menú de Pestañas (98.css overrides) --- */
menu[role="tablist"] {
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    background-color: #808080;
    border-bottom: 2px solid #000000;
}

menu[role="tablist"] li[role="tab"] {
    flex: 1;
    text-align: center;
    margin: 0;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;

    /* Overrides para pestañas inactivas */
    background-color: #b8b8b8;
    border-top: 2px solid #dfdfdf;
    border-left: 2px solid #dfdfdf;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    box-shadow: 1px 1px 0px 0px #000000;
}

menu[role="tablist"] li[role="tab"] u {
    text-decoration: underline;
}

menu[role="tablist"] li[role="tab"][aria-selected="true"] {
    background-color: #c0c0c0 !important;
    border-top: 2px solid #ffffff !important;
    border-left: 2px solid #ffffff !important;
    border-right: 2px solid #808080 !important;
    border-bottom: none !important;
    box-shadow: 1px 0px 0px 0px #000000 !important;
    height: 40px !important;
    margin-top: -2px !important;
    z-index: 10;
}

/* --- Contenedor del Escritorio --- */
.desktop {
    background-color: #008080;
    /* Color turquesa de escritorio clásico original */
    flex-grow: 1;
    padding: 14px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
    border-top: 2px solid #ffffff;
    /* Simula el borde inferior de la barra de pestañas */
    width: 100%;
}

/* --- Sidebar Izquierda (Columna 1) --- */
.sidebar {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: #ffffff;
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
}

.avatar-box {
    width: 180px;
    height: 180px;
    background-color: #e6ceff;
    /* Fondo lavanda del avatar */
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: 1px 1px 0px 0px #000000;
}

.avatar-svg {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.sidebar-name {
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 22px;
    font-weight: bold;
    margin: 5px 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.sidebar-info {
    font-size: 11px;
    line-height: 1.6;
}

.sidebar-info p {
    margin: 5px 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.social-link:hover {
    color: #ffffe1;
}

.social-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Contenedor de Ventana Principal (Columna 2 - Contenido) --- */
.content-window {
    flex: 1;
    min-width: 0;
    box-shadow: 1px 1px 0px 0px #000000;
}

/* --- Columna Derecha (Columna 3 - Vacía) --- */
.right-column-empty {
    flex: 0 0 175px;
}

/* --- Tab Panels (Control de Visibilidad) --- */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* --- Contenidos Específicos de Páginas --- */

/* Pestaña: Overview */
.overview-body {
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    padding: 10px;
}

.overview-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 25px 0;
    width: 100%;
}

.overview-btn {
    width: 240px;
    height: 36px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* Pestaña: About Me */
.aboutme-body {
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 13px;
    line-height: 1.6;
    padding: 10px;
}

.image-container {
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 10px;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 320px;
    height: 200px;
    box-shadow: inset 1px 1px 0px 0px #808080;
}

.image-container.dark-bg {
    background-color: #1a1a1a;
}

.image-container svg {
    max-width: 100%;
    max-height: 100%;
}

/* Pestaña: Skills */
.skills-body {
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 13px;
    padding: 10px;
}

.skills-category {
    margin-bottom: 25px;
}

.skills-category-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #808080;
    padding-bottom: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.skill-button {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    background-color: #c0c0c0;
}

/* Pestaña: Projects */
.projects-body {
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 13px;
    padding: 10px;
}

.project-title {
    font-weight: bold;
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 5px;
}

.project-panel {
    background-color: #ffffe1;
    /* Inset beige tradicional */
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    box-shadow: inset 1px 1px 0px 0px #000000;
    height: 300px;
    margin-bottom: 25px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-panel-placeholder {
    border: 2px dashed #808080;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #808080;
    font-family: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
    font-size: 13px;
    font-weight: bold;
    gap: 10px;
    user-select: none;
    text-align: center;
}

/* --- Adaptabilidad Móvil --- */
@media (max-width: 768px) {
    .desktop {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 12px;
    }

    .sidebar {
        flex: none;
        max-width: none;
        min-width: 0;
        width: 100%;
        align-items: center;
        text-align: center;
        border-bottom: 2px dashed #ffffff;
        padding-bottom: 20px;
    }

    .right-column-empty {
        display: none;
    }

    .avatar-box {
        margin: 0 auto;
    }

    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .top-banner {
        font-size: 22px;
        padding: 10px 15px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
        text-align: center;
    }

    .news-ticker-container {
        padding: 0 !important;
    }

    menu[role="tablist"] {
        margin: 0 !important;
        flex-wrap: wrap;
        height: auto !important;
    }

    menu[role="tablist"] li[role="tab"] {
        flex: 1 1 calc(50% - 4px);
        margin: 2px !important;
        height: 38px !important;
    }

    menu[role="tablist"] li[role="tab"][aria-selected="true"] {
        height: 38px !important;
        margin: 2px !important;
        border-bottom: 2px solid #808080 !important;
        box-shadow: 1px 1px 0px 0px #000000 !important;
        margin-top: 2px !important;
        margin-bottom: 2px !important;
    }

    .aboutme-body,
    .projects-body {
        max-height: none;
        overflow-y: visible;
    }
}

/* --- Styling for tab links --- */
menu[role="tablist"] li[role="tab"] a {
    text-decoration: none;
    color: inherit;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    outline: none;
}