* {
    box-sizing: border-box;
    user-select: none;
}


/* =========================
   BODY
========================= */

body {
    margin: 0;
    overflow: hidden;

    font-family:
        "MS Sans Serif",
        Tahoma,
        sans-serif;

    font-size: 13px;

    background: #008080;
}


/* =========================
   ESCRITORIO
========================= */

.desktop {
    width: 100vw;
    height: calc(100vh - 40px);

    position: relative;

    padding: 18px;
}


/* ICONOS */

.desktop-icon {
    width: 82px;

    margin-bottom: 22px;

    text-align: center;

    color: white;

    cursor: pointer;
}


.desktop-icon img {
    width: 42px;
    height: 42px;

    image-rendering: pixelated;
}


.desktop-icon .emoji {
    font-size: 38px;

    display: block;

    margin-bottom: 4px;
}


.desktop-icon span {
    display: inline-block;

    padding: 2px 3px;
}


.desktop-icon:hover span {
    background: #000080;
}


/* =========================
   VENTANAS WINDOWS 95
========================= */

.window {
    position: absolute;

    width: 560px;

    min-height: 300px;

    background: #c0c0c0;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid #000;
    border-bottom: 2px solid #000;

    box-shadow:
        inset -1px -1px #808080,
        inset 1px 1px #dfdfdf;

    display: none;
}


.window.active {
    display: block;
}


/* =========================
   HEADER VENTANA
========================= */

.window-header {
    height: 28px;

    background: #000080;

    color: white;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        3px
        4px
        3px
        7px;

    cursor: move;

    font-weight: bold;
}


.window-title {
    display: flex;

    align-items: center;

    gap: 6px;
}


.window-buttons {
    display: flex;

    gap: 2px;
}


/* =========================
   BOTONES VENTANA
========================= */

.win-btn {
    width: 22px;
    height: 20px;

    padding: 0;

    background: #c0c0c0;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid #000;
    border-bottom: 2px solid #000;

    font-weight: bold;

    cursor: pointer;
}


.win-btn:active {
    border-top: 2px solid #000;
    border-left: 2px solid #000;

    border-right: 2px solid white;
    border-bottom: 2px solid white;
}


/* =========================
   MENU VENTANAS
========================= */

.menu-bar {
    height: 25px;

    display: flex;

    align-items: center;

    gap: 18px;

    padding: 0 8px;

    border-bottom: 1px solid #808080;
}


/* =========================
   CONTENIDO VENTANAS
========================= */

.window-content {
    margin: 8px;

    padding: 15px;

    background: white;

    border-top: 2px solid #808080;
    border-left: 2px solid #808080;

    border-right: 2px solid white;
    border-bottom: 2px solid white;

    height: 340px;

    overflow-y: auto;

    color: black;

    user-select: text;
}


/* =========================
   TEXTOS
========================= */

h1 {
    font-size: 23px;

    margin-top: 0;
}


h2 {
    font-size: 17px;

    border-bottom: 1px solid #999;

    padding-bottom: 5px;
}


p,
li {
    line-height: 1.5;
}


a {
    color: #000080;
}


/* =========================
   BOTONES WINDOWS 95
========================= */

.button95 {
    display: inline-block;

    padding: 6px 12px;

    background: #c0c0c0;

    color: black;

    text-decoration: none;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid black;
    border-bottom: 2px solid black;

    margin-right: 5px;

    cursor: pointer;
}


.button95:active {
    border-top: 2px solid black;
    border-left: 2px solid black;

    border-right: 2px solid white;
    border-bottom: 2px solid white;
}


/* =========================
   PROYECTOS
========================= */

.project {
    background: #efefef;

    padding: 12px;

    margin-bottom: 12px;

    border: 2px inset white;
}


.project h3 {
    margin-top: 0;
}


/* TAGS */

.tag {
    display: inline-block;

    padding: 3px 6px;

    background: #000080;

    color: white;

    margin: 2px;

    font-size: 11px;
}


/* =========================
   BARRA DE TAREAS
========================= */

.taskbar {
    position: fixed;

    left: 0;
    bottom: 0;

    width: 100%;

    height: 40px;

    background: #c0c0c0;

    border-top: 2px solid white;

    display: flex;

    align-items: center;

    padding: 4px;

    gap: 5px;

    z-index: 99999;
}


/* =========================
   BOTON INICIO
========================= */

.start-button {
    height: 31px;

    padding: 0 9px;

    display: flex;

    align-items: center;

    gap: 6px;

    font-family:
        "MS Sans Serif",
        Tahoma,
        sans-serif;

    font-weight: bold;

    background: #c0c0c0;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid black;
    border-bottom: 2px solid black;

    cursor: pointer;
}


.start-button:active {
    border-top: 2px solid black;
    border-left: 2px solid black;

    border-right: 2px solid white;
    border-bottom: 2px solid white;
}


/* =========================
   APLICACIONES ABIERTAS
========================= */

.task-items {
    flex: 1;

    display: flex;

    gap: 4px;

    overflow: hidden;
}


.task-item {
    min-width: 140px;

    max-width: 180px;

    height: 30px;

    background: #c0c0c0;

    border: 2px outset white;

    padding: 5px;

    cursor: pointer;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================
   BOTON IDIOMA
========================= */

.language-button {
    height: 30px;

    padding: 4px 9px;

    font-family:
        "MS Sans Serif",
        Tahoma,
        sans-serif;

    font-size: 12px;

    font-weight: bold;

    background: #c0c0c0;

    color: black;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid black;
    border-bottom: 2px solid black;

    cursor: pointer;
}


.language-button:active {
    border-top: 2px solid black;
    border-left: 2px solid black;

    border-right: 2px solid white;
    border-bottom: 2px solid white;
}


/* =========================
   RELOJ
========================= */

.clock {
    border: 2px inset white;

    padding: 6px 12px;

    min-width: 75px;

    text-align: center;
}


/* =========================
   MENU INICIO
========================= */

.start-menu {
    display: none;

    position: fixed;

    bottom: 40px;

    left: 3px;

    width: 230px;

    background: #c0c0c0;

    border-top: 2px solid white;
    border-left: 2px solid white;

    border-right: 2px solid black;
    border-bottom: 2px solid black;

    z-index: 999999;
}


.start-menu.open {
    display: flex;
}


.start-side {
    width: 35px;

    background: #808080;

    color: #c0c0c0;

    writing-mode: vertical-rl;

    transform: rotate(180deg);

    font-size: 22px;

    font-weight: bold;

    padding: 8px 5px;
}


.start-options {
    flex: 1;

    padding: 4px;
}


.start-option {
    padding: 10px;

    cursor: pointer;

    display: flex;

    gap: 10px;

    align-items: center;
}


.start-option:hover {
    background: #000080;

    color: white;
}


/* =========================
   CV
========================= */

.cv-section {
    margin-bottom: 20px;
}


.cv-item {
    background: #efefef;

    border: 2px inset white;

    padding: 10px 12px;

    margin-bottom: 10px;
}


.cv-item h3 {
    margin: 0 0 4px;

    font-size: 14px;
}


.cv-meta {
    color: #555;

    font-size: 12px;

    margin-bottom: 6px;
}


.cv-actions {
    margin-top: 14px;
}


/* =========================
   CONTACTO
========================= */

input,
textarea {
    width: 100%;

    margin: 5px 0 12px;

    padding: 5px;

    font-family: inherit;

    border: 2px inset white;
}


textarea {
    min-height: 90px;

    resize: vertical;
}


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

@media (max-width: 650px) {

    .window {
        width: calc(100vw - 20px) !important;

        left: 10px !important;

        top: 10px !important;
    }


    .window-content {
        height: calc(100vh - 160px);
    }


    .task-item {
        display: none;
    }


    .language-button {
        padding: 4px 6px;

        font-size: 11px;
    }


    .clock {
        min-width: 65px;

        padding-left: 6px;

        padding-right: 6px;
    }

}

/* Buscaminas: estilos aislados del resto del escritorio. */
#minesweeper { min-height: 0; padding: 2px; width: max-content; max-width: calc(100vw - 20px); }
#minesweeper .window-header { height: 18px; padding: 1px 2px; font-size: 11px; }
#minesweeper .window-title { gap: 3px; white-space: nowrap; }
#minesweeper .win-btn { width: 16px; height: 14px; font: bold 11px/10px Arial, sans-serif; }
#minesweeper .win-btn:nth-child(2) { color: #808080; cursor: default; }
#minesweeper .minesweeper-content { height: auto; margin: 0; padding: 6px; border: 0; border-top: 2px solid white; border-left: 2px solid white; background: #c0c0c0; overflow: auto; }
#minesweeper .minesweeper-panel { display: flex; align-items: center; justify-content: space-between; height: 37px; padding: 4px 5px; margin-bottom: 6px; border: 2px solid; border-color: #808080 white white #808080; }
#minesweeper .mine-led { display: flex; width: 41px; height: 25px; padding: 1px; background: black; border: 1px solid; border-color: #808080 white white #808080; }
#minesweeper .mine-led svg { width: 13px; height: 21px; }
#minesweeper .minesweeper-reset { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; background: #c0c0c0; border: 2px solid; border-color: white #808080 #808080 white; outline: 1px solid #808080; }
#minesweeper .minesweeper-reset:active { border-color: #808080 white white #808080; padding: 1px 0 0 1px; }
#minesweeper svg { display: block; shape-rendering: crispEdges; pointer-events: none; }
#minesweeper .minesweeper-board { display: grid; width: max-content; border: 3px solid; border-color: #808080 white white #808080; background: #c0c0c0; touch-action: manipulation; }
#minesweeper .mine-cell { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 2px solid; border-color: white #808080 #808080 white; border-radius: 0; background: #c0c0c0; color: black; font: bold 14px/14px monospace; }
#minesweeper .mine-cell.revealed, #minesweeper .mine-cell:active:not(.flagged) { border: 0; border-top: 1px solid #808080; border-left: 1px solid #808080; }
#minesweeper .mine-cell.exploded { background: #f00; }
#minesweeper button:focus-visible, #minesweeper summary:focus-visible { outline: 1px dotted black; outline-offset: -3px; }
#minesweeper .mine-menu { display: flex; height: 20px; gap: 0; font: 11px/16px Tahoma, sans-serif; }
#minesweeper details { position: relative; }
#minesweeper summary { padding: 1px 6px; cursor: default; list-style: none; }
#minesweeper summary::-webkit-details-marker { display: none; }
#minesweeper details[open] summary { background: #000080; color: white; }
#minesweeper .mine-menu-popup { position: absolute; top: 20px; left: 0; z-index: 5; width: 170px; padding: 2px; background: #c0c0c0; border: 2px solid; border-color: white black black white; box-shadow: 1px 1px #808080; }
#minesweeper .mine-menu-popup button { display: flex; justify-content: space-between; width: 100%; border: 0; background: transparent; padding: 3px 8px 3px 20px; text-align: left; font: inherit; position: relative; color: black; }
#minesweeper .mine-menu-popup button[aria-checked="true"]::before { content: "✓"; position: absolute; left: 4px; }
#minesweeper .mine-menu-popup button:hover, #minesweeper .mine-menu-popup button:focus-visible { background: #000080; color: white; }
#minesweeper .mine-menu-popup hr { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid white; margin: 3px 0; }
#minesweeper .mine-instructions { width: 220px; padding: 8px; left: -45px; }
#minesweeper .mine-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 650px) { #minesweeper { width: max-content !important; } }
