@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=Press+Start+2P&display=swap");

/* ===== Shader Overlay (static, no movement) ===== */
/*
    Adds a soft-light blended gradient overlay to the bg-pattern to give
    subtle life without moving the icon grid. The pulse is a very slow
    hue rotation + slight opacity change, which does not translate or pan.
*/
.bg-pattern {
    position: relative;
    animation: none !important; /* ensure previous panning is disabled */
}

.bg-pattern::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* layered gradients for a gentle aurora-like tint */
    background:
        radial-gradient(1200px 800px at 20% 20%, rgba(233, 32, 79, 0.05), transparent 60%),
        radial-gradient(1000px 700px at 80% 70%, rgba(255, 217, 61, 0.04), transparent 60%),
        conic-gradient(from 180deg at 50% 50%, rgba(62, 219, 129, 0.04), rgba(233, 32, 79, 0.04), rgba(62, 219, 129, 0.04));
    mix-blend-mode: soft-light;
    opacity: 0.08;
    filter: hue-rotate(0deg) saturate(115%);
    transition: opacity 400ms ease-out;
    animation: shaderPulse 45s linear infinite;
}

/* Pattern más intenso para modo claro */
:root[data-theme="light"] .bg-pattern::after {
    background:
        radial-gradient(1200px 800px at 20% 20%, rgba(233, 32, 79, 0.18), transparent 60%),
        radial-gradient(1000px 700px at 80% 70%, rgba(255, 217, 61, 0.15), transparent 60%),
        conic-gradient(from 180deg at 50% 50%, rgba(62, 219, 129, 0.12), rgba(233, 32, 79, 0.14), rgba(62, 219, 129, 0.12));
    opacity: 0.22;
    filter: hue-rotate(0deg) saturate(130%);
}

@keyframes shaderPulse {
    0%   { filter: hue-rotate(0deg) saturate(115%); opacity: 0.07; }
    50%  { filter: hue-rotate(180deg) saturate(120%); opacity: 0.10; }
    100% { filter: hue-rotate(360deg) saturate(115%); opacity: 0.07; }
}

@media (prefers-reduced-motion: reduce) {
    .bg-pattern::after {
        animation: none;
        opacity: 0.08;
        filter: hue-rotate(0deg) saturate(110%);
    }
}
/* =====================
   BitfoxOriginal
    Palette: #1b1b1b / #e9204f / #f3f3f3
   ===================== */
*,
/* =====================================================
     BITFOXORIGINAL DESIGN SYSTEM
     Minimal, Professional, Scott Pilgrim Energy
     ===================================================== */

/* ====== CORE DESIGN TOKENS ====== */
:root {
    /* Brand Colors */
    --color-crimson: #A4133C;
    --color-shadow-black: #1A1A1A;
    --color-milk: #EC5E27;
    --color-gray-blue: #2B323F;
  
    /* Shared Tokens */
    --color-accent: var(--color-crimson);
    --color-accent-soft: var(--color-milk);
  
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
  
    /* Shadows */
    --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.35);
    --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-focus: 0 0 0 3px rgba(164, 19, 60, 0.25);
  
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 220ms ease-out;
    --transition-slow: 350ms ease-out;
  
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Tipografías (ajusta a las nuevas que tengas) */
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    --font-heading: "Space Grotesk", system-ui, sans-serif;
    --font-display: "Press Start 2P", monospace;
  
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
  
    /* Legacy compatibility */
    --card-radius: var(--radius-xl);
    --card-padding: clamp(16px, 2.4vw, 24px);
    --card-gap: clamp(14px, 2.0vw, 22px);
    --panel-width: 320px;
    --glow-accent: 0 0 14px rgba(164, 19, 60, 0.25);
    --glow-soft: var(--shadow-soft);

    /* Text on accent surfaces */
    --text-on-accent: #ffffff;
}

/* Tema oscuro (por defecto) */
:root,
:root[data-theme="dark"] {
    --bg-main: var(--color-shadow-black);
    --bg-elevated: var(--color-gray-blue);
    --bg-subtle: #22252E;
    --bg-hover: #2F3441;
    --bg-deep: #141414;
  
    --text-primary: #F5F5F5;
    --text-secondary: #D0D3DC;
    --text-muted: #B4B7C2;
    --text-disabled: #6B6E7A;
  
    --border-subtle: #333843;
    --border-medium: #454B5C;
    --border-strong: #5A6179;
  
    --accent: var(--color-accent);
    --accent-soft: var(--color-accent-soft);
    --accent-hover: #C51A4F;
    --accent-subtle: rgba(164, 19, 60, 0.12);
  
    /* Component-specific */
    --card-bg: rgba(43, 50, 63, 0.85);
    --card-border: var(--border-subtle);
    --input-bg: rgba(34, 37, 46, 0.7);
    --input-border: var(--border-medium);
    --overlay-bg: rgba(26, 26, 26, 0.92);
  
    /* Legacy aliases */
    --panel: rgba(43, 50, 63, 0.86);
    --panel-2: rgba(34, 37, 46, 0.72);
    --border: var(--border-subtle);
    --text: var(--text-primary);
    --text-soft: var(--text-secondary);
    --text-dim: var(--text-muted);
}

/* Tema claro */
:root[data-theme="light"] {
    --bg-main: #f6f7fb;
    --bg-elevated: #ffffff;
    --bg-subtle: #eef2f7;
    --bg-hover: #e6ecf4;
    --bg-deep: #dfe6f1;

    --text-primary: #0f172a;
    --text-secondary: #1f2937;
    --text-muted: #4b5563;
    --text-disabled: #9ca3af;

    --border-subtle: #d5d9e3;
    --border-medium: #c7ccd8;
    --border-strong: #adb5c6;

    --accent: #e9204f;
    --accent-soft: #ffd5e0;
    --accent-hover: #c31745;
    --accent-subtle: rgba(233, 32, 79, 0.12);

    --card-bg: rgba(255, 255, 255, 0.92);
    --card-border: #dbe1ec;
    --input-bg: #ffffff;
    --input-border: #c7ccd8;
    --overlay-bg: rgba(255, 255, 255, 0.94);

    --panel: rgba(255, 255, 255, 0.94);
    --panel-2: rgba(245, 247, 252, 0.92);
    --border: var(--border-subtle);
    --text: var(--text-primary);
    --text-soft: var(--text-secondary);
    --text-dim: var(--text-muted);
}

/* ====== SMOOTH THEME TRANSITIONS ====== */
:root.theme-transitioning,
:root.theme-transitioning * {
    transition: 
        background-color var(--transition-normal),
        color var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal) !important;
}

/* ====== RESET ====== */
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
        font-family: var(--font-body);
        background: var(--bg-main);
        color: var(--text-primary);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: default;
}

* {
    cursor: inherit;
}

a, button, input, select, textarea, [role="button"] {
    cursor: pointer;
        -webkit-tap-highlight-color: var(--accent-subtle);
}

/* Mejorar scroll en dispositivos táctiles */
* {
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}

/* Evitar zoom accidental en inputs en iOS */
input, select, textarea {
    font-size: 16px !important;
}

@media (min-width: 768px) {
    input, select, textarea {
        font-size: inherit !important;
    }
}

/* Skip link (accesibilidad) */
.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 999;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
        font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-elevated);
    transform: translateY(-180%);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Focus visible global (teclado) */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-subtle);
    outline-offset: 4px;
}

/* Fallback for browsers without :focus-visible */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Subtle grit (poster vibe) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0 1px, transparent 2px) 0 0 / 48px 48px,
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px) 0 0 / 56px 56px,
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 2px 7px);
    opacity: 0.08;
    mix-blend-mode: overlay;
}

img {
    max-width: 100%;
    height: auto;
}

/* ====== SHARED COMPONENT STYLES ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}

/* Input Fields */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-focus);
    background: var(--bg-elevated);
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}

.card-compact {
    padding: var(--space-md);
}

/* ====== SCOTT PILGRIM / VHS / CASSETTE UTILITIES ====== */
.bg-texture-vhs {
    position: relative;
    overflow: hidden;
}

.bg-texture-vhs::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/img/textures/vhs-noise-01.png");
    background-size: 200px 200px;
    opacity: 0.08;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.bg-texture-film {
    position: relative;
    overflow: hidden;
}

.bg-texture-film::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/img/textures/film-grain-01.png");
    background-size: 300px 300px;
    opacity: 0.06;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 1;
}

.border-ink-frame {
    position: relative;
    border: none !important;
}

.border-ink-frame::after {
    content: "";
    position: absolute;
    inset: -4px;
    background-image: url("/img/textures/ink-frame-01.png");
    background-size: 100% 100%;
    opacity: 0.7;
    pointer-events: none;
    z-index: 2;
}

.cassette-accent {
    position: relative;
    padding-left: var(--space-lg);
}

.cassette-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-soft) 100%);
    border-radius: 2px;
}

.text-comic-pop {
    text-shadow: 
        2px 2px 0 var(--accent),
        -1px -1px 0 rgba(0, 0, 0, 0.3);
    font-family: var(--font-heading);
    font-weight: 700;
}

/* ====== CINEMATIC PAGE TRANSITIONS ====== */
.page-transition {
    position: fixed;
    left: 0;
    width: 100%;
    height: 8px;                /* barra fina */
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    z-index: 9999;
    pointer-events: none;
    transition: transform 260ms cubic-bezier(0.85, 0, 0.15, 1);
    will-change: transform;
}

.page-transition--top {
    top: 0;
    transform: translateY(-100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.page-transition--bottom {
    bottom: 0;
    transform: translateY(100%);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.18);
}

.page-transition.is-active {
    transform: translateY(0);
}

.is-loading .page-transition {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .page-transition {
        transition-duration: 0ms;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: clamp(1.5rem, 5vw, 1.85rem);
    }

    h2 {
        font-size: clamp(1.3rem, 4.5vw, 1.55rem);
    }

    h3 {
        font-size: clamp(1.15rem, 4vw, 1.35rem);
    }

    h4 {
        font-size: clamp(1.05rem, 3.6vw, 1.2rem);
    }
}

/* ====== RESPONSIVE ADJUSTMENTS ====== */
@media (max-width: 767px) {
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: var(--text-sm);
    }
  
    .card {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }
  
    .page-transition {
        height: 6px;
    }
}

/* ====== BACKGROUND ====== */
.bg-wrap {
    position: fixed;
    inset: 0;
    z-index: -5;
    overflow: hidden;
    background: radial-gradient(1200px 700px at 20% 10%, var(--accent-subtle), transparent 60%),
                radial-gradient(900px 600px at 80% 90%, rgba(255, 255, 255, 0.04), transparent 62%),
                linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-main) 55%, var(--bg-deep) 100%);
}

.bg-pattern {
    position: absolute;
    inset: 0;
    display: block;
    background-image: url("img/bg-pattern.png");
    background-repeat: repeat;
    background-size: auto;
    opacity: 0.80;
    mix-blend-mode: overlay;
    pointer-events: none;
    /* Sutil movimiento del patrón para una sensación viva */
    animation: bgPatternPan 60s linear infinite;
}

/* Tema claro: invertir patrón */
:root[data-theme="light"] .bg-pattern {
    filter: invert(1);
}

.bg-gradient {
    position: absolute;
    inset: -20%;
    background:
           radial-gradient(circle at 0% 0%, var(--accent-subtle) 0, transparent 58%),
           radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.08) 0, transparent 62%),
           radial-gradient(circle at 55% 60%, var(--accent-subtle) 0, transparent 55%);
    opacity: 0.14;
    filter: blur(26px);
    mix-blend-mode: normal;
    animation: bgDrift 14s ease-in-out infinite;
    pointer-events: none;
}

/* Tema claro: invertir gradiente */
:root[data-theme="light"] .bg-gradient {
    filter: blur(26px) invert(1);
}


@keyframes bgDrift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-2.5%, 2%, 0) scale(1.02); }
}

/* Panning suave del patrón de fondo (Nintendo-like micro motion) */
@keyframes bgPatternPan {
    0% {
        background-position: 0 0;
        opacity: 0.80;
    }
    25% {
        background-position: 120px 80px;
        opacity: 0.78;
    }
    50% {
        background-position: 240px 160px;
        opacity: 0.80;
    }
    75% {
        background-position: 120px 200px;
        opacity: 0.82;
    }
    100% {
        background-position: 0 0;
        opacity: 0.80;
    }
}

/* ====== PAGE ====== */
.page {
    padding: 32px 16px 56px;
    gap: 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(22px, 3vw, 54px) 16px 56px;
    gap: clamp(26px, 3vw, 54px);
}
/* ===== Topbar ===== */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    z-index: 1000;
    background: var(--overlay-bg);
    backdrop-filter: saturate(130%) blur(6px);
    border-bottom: 1px solid var(--border-medium);
}

/* Tema claro: topbar */
:root[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
}

.topbar-nav {
    display: flex;
    gap: 16px;
    flex: 1 1 auto;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.topbar-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 12, 16, 0.82);
    color: #f3f3f3;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
    transition: transform 0.12s ease-out, border-color 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out;
}

/* Tema claro: botón menú */
:root[data-theme="light"] .topbar-menu-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.topbar-menu-btn:focus-visible {
    outline: 2px solid rgba(255, 217, 61, 0.75);
    outline-offset: 3px;
}

.topbar-menu-btn:hover {
    border-color: rgba(255, 217, 61, 0.55);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}

:root[data-theme="light"] .topbar-menu-btn:hover {
    border-color: rgba(233, 32, 79, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.topbar-left {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.topbar-menu-lines {
    position: relative;
    width: 20px;
    height: 14px;
    display: inline-block;
}

.topbar-menu-lines::before,
.topbar-menu-lines::after,
.topbar-menu-lines span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 4px;
    transition: transform 160ms ease, opacity 160ms ease;
}

.topbar-menu-lines::before { top: 0; }
.topbar-menu-lines::after { bottom: 0; }
.topbar-menu-lines span { top: 50%; transform: translateY(-50%); }

body.menu-open .topbar-menu-lines::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .topbar-menu-lines::after { transform: translateY(-6px) rotate(-45deg); }
body.menu-open .topbar-menu-lines span { opacity: 0; }

.topbar-menu-label { font-size: 12px; letter-spacing: 0.10em; }
.topbar-link {
    color: #f3f3f3;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.topbar-link:hover,
.topbar-link:focus { color: #ffd93d; }

/* Tema claro: topbar-link */
:root[data-theme="light"] .topbar-link:hover,
:root[data-theme="light"] .topbar-link:focus { color: #f3a63d; }

.topbar-link-home {
    display: none;
}

.topbar-link-icon {
    display: inline-flex;
    width: 18px;
    justify-content: center;
}

.lang-switch {
    color: #f3f3f3;
    text-decoration: none;
    font-weight: 600;
}
.lang-divider { color: #777; margin: 0 6px; }

body.has-topbar .page { padding-top: 72px; }

/* Anclar secciones para que el scroll de accesos rápidos no brinque */
#cassetteCard,
#infoSection,
#servicesSection,
#portfolioSection {
    scroll-margin-top: 96px;
}


/* Lang toggle switch */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-label {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 243, 243, 0.7);
    font-weight: 600;
}

.lang-select {
    appearance: none;
    padding: 8px 32px 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 15, 18, 0.82) url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgMS41TDYgNi41TDExIDEuNSIgc3Ryb2tlPSIjZjNmM2YzIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+') no-repeat right 10px center;
    background-size: 12px;
    color: #f3f3f3;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42);
    transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out;
    min-width: 120px;
}

.lang-select:hover {
    border-color: rgba(255, 217, 61, 0.75);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.46), 0 0 0 2px rgba(255, 217, 61, 0.5);
}

.lang-select:focus-visible {
    outline: 2px solid rgba(255, 217, 61, 0.75);
    outline-offset: 3px;
}

/* Tema claro: lang-select */
:root[data-theme="light"] .lang-select {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

:root[data-theme="light"] .lang-select:hover {
    border-color: rgba(255, 217, 61, 0.75);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(255, 217, 61, 0.6);
}

.lang-select option {
    background: rgba(15, 15, 18, 0.98);
    color: #f3f3f3;
    padding: 8px;
}


/* ====== CASSETTE CARD ====== */
.cassette-card {
    width: min(1250px, 96%);
    max-height: 760px;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.94), rgba(8, 8, 10, 0.90));
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.72);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    box-shadow: var(--glow-soft);
    display: grid;
    grid-template-columns: minmax(260px, var(--panel-width)) minmax(0, 1fr);
    gap: 18px;
    gap: var(--card-gap);
    padding: 18px;
    padding: var(--card-padding);
    overflow: visible;
    position: relative;
    backdrop-filter: blur(10px);
    align-items: stretch;
    transform: translateZ(0);
}

/* Removed: cassette-card::before (cosa roja transparente) */

.cassette-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        url("img/textures/texture-1.jpg");
    background-size: auto, auto, auto, cover;
    background-position: center;
    opacity: 0.25;
    pointer-events: none;
    z-index: -1;
}

/* Tema claro: invertir textura */
:root[data-theme="light"] .cassette-card::after {
    filter: invert(1);
}

.cassette-card:hover {
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.78),
                0 0 34px rgba(233, 32, 79, 0.10);
}

/* Tema claro: cassette card blanca */
:root[data-theme="light"] .cassette-card {
    background: #ffffff;
    box-shadow: 0 16px 54px rgba(0, 0, 0, 0.08);
    border-color: #dbe1ec;
}

:root[data-theme="light"] .cassette-card:hover {
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.12),
                0 0 34px rgba(233, 32, 79, 0.15);
}

/* ====== LEFT PANEL ====== */
.side-panel {
    background: linear-gradient(180deg, rgba(12, 12, 18, 0.92) 0%, rgba(10, 10, 16, 0.86) 55%, rgba(12, 12, 18, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 18px;
    padding: clamp(16px, 2.2vw, 28px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

/* Tema claro: side-panel con fondo muy claro */
:root[data-theme="light"] .side-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 55%, #ffffff 100%);
    border: 1px solid #dbe1ec;
}

.avatar-frame {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    align-self: center;
    margin-top: 4px;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-block {
    display: flex;
    justify-content: center;
}

.logo-block img {
    max-width: 140px;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.62));
}

/* Tema claro: invertir logo */
:root[data-theme="light"] .logo-block img {
    filter: invert(1) drop-shadow(0 14px 28px rgba(255, 255, 255, 0.3));
}

.socials-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.socials-label {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(243, 243, 243, 0.92);
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(233, 32, 79, 0.4);
}

:root[data-theme="light"] .socials-label {
    color: #1f2937;
    text-shadow: none;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.socials-current-label {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(243, 243, 243, 0.85);
    font-weight: 600;
    height: 28px;
    padding: 6px 8px;
    transition: opacity 0.2s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

:root[data-theme="light"] .socials-current-label {
    color: #1f2937;
}

/* Tema claro: label no debe cambiar de color al hover */
:root[data-theme="light"] .socials a:hover .socials-current-label {
    color: #1f2937;
}

.socials-current-label:empty {
    opacity: 0;
}

.socials a {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(243, 244, 248, 0.86);
    font-size: 18px;
    text-decoration: none;
    background:
        radial-gradient(circle at 30% 0%, rgba(243, 243, 243, 0.10), transparent 58%),
        radial-gradient(circle at 80% 90%, rgba(233, 32, 79, 0.16), transparent 60%),
        rgba(8, 8, 12, 0.50);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}

:root[data-theme="light"] .socials a {
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    background:
        radial-gradient(circle at 30% 0%, rgba(233, 32, 79, 0.08), transparent 58%),
        radial-gradient(circle at 80% 90%, rgba(255, 217, 61, 0.06), transparent 60%),
        var(--bg-elevated);
}

:root[data-theme="light"] .socials a:hover {
    border-color: var(--accent);
    background:
        radial-gradient(circle at 30% 0%, rgba(233, 32, 79, 0.15), transparent 58%),
        radial-gradient(circle at 80% 90%, rgba(255, 217, 61, 0.10), transparent 60%),
        var(--bg-elevated);
    box-shadow: 0 8px 20px rgba(233, 32, 79, 0.15);
}

:root[data-theme="light"] .socials a:hover .socials-current-label {
    color: #1f2937;
}

/* Quitar tooltip antiguo */
.socials a::after {
    display: none;
}

.socials a:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.socials a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 32, 79, 0.16), 0 0 0 6px rgba(243, 243, 243, 0.08);
}

.glow-button {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(233, 32, 79, 0.95), rgba(233, 32, 79, 0.72));
    color: var(--text-on-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease-out, filter 0.12s ease-out;
}

.glow-button span {
    font-family: 'Press Start 2P', system-ui, sans-serif;
    font-size: 10px;
}

.glow-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.glow-button:active {
    transform: translateY(1px);
    filter: brightness(0.96);
}

.glow-button:focus-visible {
    outline: 3px solid rgba(233, 32, 79, 0.22);
    outline-offset: 4px;
}

/* ====== RIGHT PANEL ====== */
.main-panel {
    position: relative;
    padding: clamp(14px, 2.6vw, 36px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.40), rgba(10, 10, 14, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Tema claro: main-panel */
:root[data-theme="light"] .main-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
    border: 1px solid #dbe1ec;
}

.screen-glow {
    position: absolute;
    inset: 18px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 20% 10%, rgba(233, 32, 79, 0.30), transparent 60%),
        radial-gradient(circle at 80% 90%, rgba(243, 243, 243, 0.08), transparent 65%);
    opacity: 0.28;
    mix-blend-mode: normal;
    pointer-events: none;
}

/* ====== TAPE WINDOW (ART) ====== */
.tape-window {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border-radius: 26px;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18)),
        radial-gradient(circle at 10% 0%, rgba(243, 243, 243, 0.07), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(233, 32, 79, 0.14), transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
}

/* Mantener overlays detrás del contenido */
.tape-window::before,
.tape-window::after {
    z-index: 0;
}

.tape-window > * {
    position: relative;
    z-index: 1;
}

.tape-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 3px,
            transparent 7px
        );
    opacity: 0.10;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.tape-window::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: conic-gradient(from 220deg,
        rgba(255, 255, 255, 0.10),
        rgba(233, 32, 79, 0.12),
        rgba(243, 243, 243, 0.06),
        rgba(255, 255, 255, 0.08)
    );
    opacity: 0.08;
    filter: blur(20px);
    animation: foil 9s linear infinite;
    pointer-events: none;
}

@keyframes foil {
    0% { transform: translate3d(-2%, -1%, 0) rotate(0deg); }
    100% { transform: translate3d(2%, 1%, 0) rotate(360deg); }
}

.tape-window .main-art {
    position: relative;
    border-radius: 18px;
    width: 100%;
    height: auto;
    max-height: calc(100% - 8px);
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.78);
    transition: transform 320ms cubic-bezier(.2,.9,.2,1);
}

/* ====== LABELS ====== */
.tape-label {
    position: absolute;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Press Start 2P', system-ui, sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.92);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
    z-index: 3;
}

:root[data-theme="light"] .tape-label {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tape-label-left { left: 22px; }
.tape-label-right { right: 22px; text-align: right; }

/* ====== NOW PLAYING ====== */
.tape-status {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(8, 8, 12, 0.86);
    border: 1px solid rgba(233, 32, 79, 0.26);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.70);
}

.tape-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(233, 32, 79, 0.35);
    animation: blink 1.15s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

.tape-status-text {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55);
}

:root[data-theme="light"] .tape-status-text {
    color: #0f172a;
    text-shadow: none;
}

/* ====== TAGLINE CHIP ====== */
.tagline-chip {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(10, 10, 14, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.78);
    max-width: 86%;
    text-align: center;
    z-index: 4;
}

.tagline-chip span {
    font-family: 'Press Start 2P', system-ui, sans-serif;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(243, 244, 248, 0.95);
    text-shadow: 0 2px 8px rgba(233, 32, 79, 0.5), 0 1px 0 rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

/* Tema claro: Tape Window */
:root[data-theme="light"] .tape-window {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3)),
        radial-gradient(circle at 10% 0%, rgba(233, 32, 79, 0.08), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(233, 32, 79, 0.06), transparent 60%);
    border: 1px solid #dbe1ec;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .tape-window .main-art {
    border-color: #dbe1ec;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

/* Tema claro: Tape Status */
:root[data-theme="light"] .tape-status {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(233, 32, 79, 0.2);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
}

/* Tema claro: Tagline Chip */
:root[data-theme="light"] .tagline-chip {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe1ec;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .tagline-chip span {
    color: #0f172a;
    text-shadow: 0 2px 8px rgba(233, 32, 79, 0.2), 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ====== INFO SECTION ====== */
.info-section {
    width: min(1050px, 96%);
    margin: 0 auto;
    padding: clamp(16px, 2.8vw, 30px) clamp(16px, 3.2vw, 36px) 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.92), rgba(8, 8, 10, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px rgba(233, 32, 79, 0.22);
    pointer-events: none;
}

.info-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(233, 32, 79, 0.10), transparent 55%),
        radial-gradient(circle at 80% 90%, rgba(243, 243, 243, 0.06), transparent 60%),
        repeating-radial-gradient(circle at 15% 65%, rgba(255, 255, 255, 0.06) 0 1px, transparent 2px 10px);
    opacity: 0.40;
    pointer-events: none;
}

/* Modo claro: ajustar gradientes del info-section */
:root[data-theme="light"] .info-section::after {
    background:
        radial-gradient(circle at 30% 30%, rgba(233, 32, 79, 0.08), transparent 55%),
        radial-gradient(circle at 80% 90%, rgba(100, 100, 100, 0.04), transparent 60%),
        repeating-radial-gradient(circle at 15% 65%, rgba(0, 0, 0, 0.145) 0 1px, transparent 2px 10px);
    opacity: 0.35;
}

.info-section > * {
    position: relative;
    z-index: 1;
}

.info-section h1 {
    font-family: var(--font-heading);
    font-size: clamp(18px, 3.4vw, 26px);
    margin-bottom: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.info-section h2 {
    font-family: var(--font-heading);
    font-size: clamp(16px, 3.2vw, 22px);
    margin-bottom: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Servicios */
.services-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 10px 0 10px;
    padding: 0;
}

.services-list li {
    color: var(--text-soft);
    line-height: 1.6;
}

.services-list strong,
.availability strong {
    color: rgba(243, 244, 248, 0.92);
}

.availability {
    margin-top: 8px;
}

.info-section p {
    font-size: clamp(1.0rem, 1.2vw, 1.05rem);
    line-height: 1.62;
    color: var(--text-soft);
    margin-bottom: 10px;
}

.info-section a {
    color: rgba(233, 32, 79, 0.95);
    text-decoration: none;
    border-bottom: 1px dashed rgba(233, 32, 79, 0.55);
}

.info-section a:hover {
    color: #ffd93d;
    border-color: rgba(243, 243, 243, 0.55);
}

/* ====== PORTFOLIO ====== */
.portfolio-section {
    width: min(1050px, 96%);
    margin: 0 auto;
    padding: clamp(16px, 2.8vw, 30px) clamp(16px, 3.2vw, 36px) 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.92), rgba(8, 8, 10, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.portfolio-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px rgba(233, 32, 79, 0.18);
    pointer-events: none;
}

.portfolio-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(233, 32, 79, 0.12), transparent 58%),
        radial-gradient(circle at 82% 78%, rgba(243, 243, 243, 0.06), transparent 62%),
        repeating-radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.05) 0 1px, transparent 2px 11px);
    opacity: 0.28;
    pointer-events: none;
}

/* Modo claro: ajustar gradientes del portfolio-section */
:root[data-theme="light"] .portfolio-section::after {
    background:
        radial-gradient(circle at 18% 12%, rgba(233, 32, 79, 0.10), transparent 58%),
        radial-gradient(circle at 82% 78%, rgba(100, 100, 100, 0.04), transparent 62%),
        repeating-radial-gradient(circle at 15% 65%, rgba(0, 0, 0, 0.145) 0 1px, transparent 2px 10px);
    opacity: 0.25;
}

.portfolio-section > * {
    position: relative;
    z-index: 1;
}

.portfolio-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(16px, 3.2vw, 22px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.portfolio-header p {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 14px;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 12, 0.62);
    margin: 10px 0 10px;
}

/* Tema claro: portfolio-filters */
:root[data-theme="light"] .portfolio-filters {
    border: 1px solid #dbe1ec;
    background: rgba(255, 255, 255, 0.92);
}

.portfolio-filter {
    display: grid;
    gap: 6px;
    min-width: 160px;
    flex: 1 1 180px;
}

.portfolio-filter-label {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.72);
}

:root[data-theme="light"] .portfolio-filter-label {
    color: var(--text-muted);
}

.portfolio-filter-select {
    appearance: none;
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(10, 10, 14, 0.86);
    color: rgba(243, 244, 248, 0.92);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}

/* Tema claro: portfolio-filter-select */
:root[data-theme="light"] .portfolio-filter-select {
    border: 1px solid #c7ccd8;
    background: #ffffff;
    color: #0f172a;
}

.portfolio-filter-select:focus-visible {
    outline: 3px solid rgba(233, 32, 79, 0.22);
    outline-offset: 3px;
}

.portfolio-filter-reset {
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(233, 32, 79, 0.28);
    background: rgba(8, 8, 12, 0.70);
    color: rgba(243, 244, 248, 0.92);
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    display: none;
    -webkit-tap-highlight-color: transparent;
}

.portfolio-filter-reset:hover {
    border-color: rgba(233, 32, 79, 0.42);
    color: var(--text-on-accent);
}

.portfolio-filter-reset:active {
    transform: translateY(1px);
}

.portfolio-no-results {
    color: rgba(243, 244, 248, 0.72);
    margin-top: 10px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.portfolio-group {
    margin-top: 18px;
}

.portfolio-group-title {
    font-family: var(--font-heading);
    font-size: clamp(15px, 2.4vw, 18px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.92);
    margin: 32px 0 20px;
    text-align: center;
    position: relative;
    padding: 12px 0;
}

:root[data-theme="light"] .portfolio-group-title {
    color: var(--text-primary);
}

:root[data-theme="light"] .portfolio-group-title span {
    background: #1A1A1A;
    text-shadow: 0 0 8px rgba(233, 32, 79, 0.2);
    color: #ffffff
}

.portfolio-group-title::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(233, 32, 79, 0.3) 20%, 
        rgba(233, 32, 79, 0.6) 50%, 
        rgba(233, 32, 79, 0.3) 80%, 
        transparent
    );
    box-shadow: 0 0 10px rgba(233, 32, 79, 0.4);
    z-index: 0;
}

.portfolio-group-title span {
    position: relative;
    z-index: 1;
    background: var(--bg-main);
    padding: 0 20px;
    text-shadow: 0 0 10px rgba(233, 32, 79, 0.4);
}

.portfolio-item {
    border-radius: 16px;
    background: rgba(10, 10, 12, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(243, 244, 248, 0.92);
    transition: transform 140ms ease-out, border-color 140ms ease-out, background 140ms ease-out;
    position: relative;
    overflow: hidden;
}

/* details/summary reset */
.portfolio-item summary {
    list-style: none;
}

.portfolio-item summary::-webkit-details-marker {
    display: none;
}

.portfolio-summary {
    display: grid;
    gap: 8px;
    padding: 12px 12px;
    cursor: pointer;
}

.portfolio-summary:focus-visible {
    outline: 3px solid rgba(233, 32, 79, 0.22);
    outline-offset: 4px;
}

.portfolio-summary-text {
    display: grid;
    gap: 6px;
}

.portfolio-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portfolio-year {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.62);
}

:root[data-theme="light"] .portfolio-topline .portfolio-year {
    color: var(--text-muted);
}

.status-badge {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 12, 0.55);
    color: rgba(243, 244, 248, 0.86);
}

.status-badge[data-status="terminado"] {
    border-color: rgba(255, 255, 255, 0.14);
}

.status-badge[data-status="cancelado"] {
    border-color: rgba(233, 32, 79, 0.30);
    color: rgba(243, 244, 248, 0.82);
}

.status-badge[data-status="proximamente"] {
    border-color: rgba(233, 32, 79, 0.30);
    box-shadow: 0 0 14px rgba(233, 32, 79, 0.10);
}

.status-badge[data-status="probablemente"] {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(243, 244, 248, 0.78);
}

.portfolio-expanded {
    padding: 0 12px 12px;
    display: grid;
    gap: 10px;
}

.portfolio-item[open] {
    grid-column: 1 / -1;
    background: rgba(10, 10, 12, 0.74);
    border-color: rgba(233, 32, 79, 0.26);
}

/* “Ventana” rectangular al expandir */
.portfolio-item[open] .portfolio-summary {
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.portfolio-item[open] .portfolio-cover {
    aspect-ratio: 16 / 10;
}

.portfolio-item[open] .portfolio-expanded {
    padding-top: 6px;
}

.portfolio-item[open] .portfolio-summary {
    padding-bottom: 10px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 12, 0.55);
    color: rgba(243, 244, 248, 0.72);
}

.portfolio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.90);
    border: 1px solid rgba(233, 32, 79, 0.26);
    background: rgba(8, 8, 12, 0.66);
}

.link-pill:hover {
    border-color: rgba(233, 32, 79, 0.42);
    color: var(--text-on-accent);
}

.youtube-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 8, 12, 0.55);
}

.youtube-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.portfolio-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 8, 12, 0.55);
    object-fit: cover;
    display: block;
    transition: none;
    transform: none;
}

.portfolio-cover:hover {
    transform: none;
    cursor: default;
}

.portfolio-desc {
    color: rgba(243, 244, 248, 0.85);
    font-size: 0.95rem;
    line-height: 1.55;
}

:root[data-theme="light"] .portfolio-desc {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .portfolio-desc {
        font-size: 15px;
        line-height: 1.65;
        color: rgba(243, 244, 248, 0.9);
    }
    
    :root[data-theme="light"] .portfolio-desc {
        color: var(--text-secondary);
    }
}

.portfolio-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(233, 32, 79, 0.16), transparent 45%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 10px);
    opacity: 0.14;
    pointer-events: none;
}

.portfolio-item > * {
    position: relative;
    z-index: 1;
}

.portfolio-item:hover {
    transform: translateY(-2px);
    border-color: rgba(233, 32, 79, 0.26);
    background: rgba(10, 10, 12, 0.74);
}

.portfolio-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 32, 79, 0.16);
}

.portfolio-kicker {
    font-family: 'Press Start 2P', system-ui, sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.62);
}

:root[data-theme="light"] .portfolio-kicker {
    color: var(--text-muted);
}

.portfolio-title {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(243, 244, 248, 0.95);
}

:root[data-theme="light"] .portfolio-title {
    color: var(--text-primary);
}

.portfolio-meta {
    color: rgba(243, 244, 248, 0.75);
    font-size: 0.95rem;
}

.portfolio-year {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.75);
}

:root[data-theme="light"] .portfolio-year {
    color: var(--text-muted);
}

:root[data-theme="light"] .portfolio-meta {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .portfolio-meta {
        color: rgba(243, 244, 248, 0.85);
        font-size: 14px;
    }
    
    .portfolio-year {
        color: rgba(243, 244, 248, 0.8);
        font-size: 12px;
    }
    
    :root[data-theme="light"] .portfolio-meta {
        color: var(--text-secondary);
    }
    
    :root[data-theme="light"] .portfolio-year {
        color: var(--text-muted);
    }
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.9,.2,1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .page {
        justify-content: flex-start;
        padding-top: 18px;
    }

    .cassette-card {
        max-height: none;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .side-panel {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 14px;
        padding: 14px 14px;
    }

    .avatar-frame {
        width: 82px;
        height: 82px;
    }

    .logo-block img {
        max-width: 120px;
    }

    .side-panel .glow-button {
        width: 100%;
        margin-left: 0;
        white-space: nowrap;
    }

    .main-panel {
        min-height: auto;
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .tagline-chip {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .tape-window {
        min-height: 240px;
        padding: 14px;
        border-radius: 22px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 14px;
    }

    .portfolio-filter {
        min-width: 140px;
        flex: 1 1 160px;
    }

    .portfolio-item[open] .portfolio-summary {
        grid-template-columns: 1fr;
    }

    /* Performance: reduce blur cost on mobile */
    .cassette-card,
    .info-section,
    .portfolio-section {
        backdrop-filter: none;
    }
}

/* ------------------------------------------------------------
   Legacy / ultra-old browsers (Nintendo 2DS/3DS, etc.)
   Enabled by script.js: adds html.legacy and html.low-end
------------------------------------------------------------- */

html.legacy * {
    animation: none !important;
    transition: none !important;
}

html.legacy {
    scroll-behavior: auto;
}

html.legacy .cassette-card {
    display: block;
    max-height: none;
    backdrop-filter: none;
}

html.legacy .side-panel,
html.legacy .tape-window {
    width: auto;
    max-width: none;
}

html.legacy .side-panel {
    margin-bottom: 14px;
}

html.legacy .tape-window {
    padding: 14px;
}

html.legacy .tagline-chip {
    position: static;
    transform: none;
    margin-top: 10px;
    width: auto;
    max-width: 100%;
}

html.legacy .loading-screen {
    padding: 12px;
}

html.legacy .loading-card {
    width: 92%;
    max-width: 320px;
}

/* Reduce visual effects for low-end devices */
html.low-end .cassette-card {
    backdrop-filter: none;
}

html.low-end .glow,
html.low-end .ambient,
html.low-end .noise {
    display: none !important;
}

@media (max-width: 760px) {
    .topbar {
        height: 64px;
        padding: 0;
    }

    /* Evitar scroll cuando el menú está abierto en móvil */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    .topbar-inner {
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        justify-content: space-between;
    }

    .topbar-left {
        display: none;
    }

    .topbar-right {
        position: relative;
        right: auto;
    }

    .topbar-link-home {
        display: flex;
    }

    .topbar-menu-btn {
        display: inline-flex;
        position: relative;
        left: auto;
        transform: none;
        min-height: 44px;
        padding: 10px 12px;
    }

    .topbar-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        padding: 0;
        margin: 0;
        background: rgba(18, 18, 22, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(233, 32, 79, 0.30);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.86);
        transition: max-height 280ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease, visibility 220ms ease;
        pointer-events: none;
        z-index: 999;
    }

    /* Tema claro: menú móvil */
    :root[data-theme="light"] .topbar-nav {
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(233, 32, 79, 0.25);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    }

    .topbar-link {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 600;
        text-align: center;
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        -webkit-tap-highlight-color: transparent;
        transition: all 200ms ease;
    }

    /* Tema claro: enlaces del menú móvil */
    :root[data-theme="light"] .topbar-link {
        background: rgba(233, 32, 79, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
        color: var(--text-primary);
    }

    .topbar-link:hover,
    .topbar-link:focus {
        background: rgba(233, 32, 79, 0.20);
        border-color: rgba(233, 32, 79, 0.40);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(233, 32, 79, 0.25);
    }

    :root[data-theme="light"] .topbar-link:hover,
    :root[data-theme="light"] .topbar-link:focus {
        background: rgba(233, 32, 79, 0.12);
        border-color: rgba(233, 32, 79, 0.35);
        color: var(--accent);
        box-shadow: 0 4px 12px rgba(233, 32, 79, 0.15);
    }

    .topbar-link:active {
        transform: translateY(0);
    }

    .topbar-link-icon {
        font-size: 18px;
        opacity: 0.9;
    }

    .lang-selector {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .lang-label {
        font-size: 10px;
    }

    :root[data-theme="light"] .lang-label {
        color: var(--text-muted);
    }

    .lang-select {
        min-width: 100px;
        font-size: 12px;
        padding: 6px 28px 6px 10px;
    }

    body.has-topbar .page { padding-top: 82px; }

    body.menu-open .topbar-nav {
        max-height: 420px;
        opacity: 1;
        visibility: visible;
        padding: 12px;
        gap: 8px;
        margin-top: 0;
        pointer-events: auto;
    }
}

@media (max-width: 600px) {
    .cassette-card {
        padding: 16px;
        gap: 14px;
    }

    .side-panel {
        flex-wrap: wrap;
        justify-content: center;
        padding: 16px;
    }

    .side-panel .glow-button {
        width: 100%;
        margin-left: 0;
        min-height: 48px;
        font-size: 11px;
    }

    .tagline-chip span {
        font-size: 8px;
        letter-spacing: 0.14em;
        white-space: normal;
        line-height: 1.45;
    }

    .tape-label {
        font-size: 7px;
        letter-spacing: 0.16em;
        top: 10px;
    }

    .tape-label-left { left: 12px; }
    .tape-label-right { right: 12px; }

    .tape-status {
        bottom: 12px;
        padding: 8px 14px;
        gap: 8px;
    }

    .tape-status-text {
        font-size: 9px;
        letter-spacing: 0.12em;
    }

    .tape-window .main-art {
        border-radius: 14px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-filters {
        padding: 12px;
        gap: 12px;
    }

    .portfolio-filter {
        min-width: 0;
        flex: 1 1 100%;
    }

    .portfolio-filter-reset {
        width: 100%;
    }
    
    .socials a {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .socials {
        gap: 14px;
    }
    
    .portfolio-item {
        padding: 4px;
    }
    
    .portfolio-summary {
        padding: 14px;
    }
    
    .tag-chip {
        padding: 7px 12px;
        font-size: 11px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .link-pill {
        padding: 10px 14px;
        font-size: 12px;
        min-height: 44px;
    }
    
    .info-section {
        padding: 20px 18px;
    }
    
    .portfolio-section {
        padding: 20px 18px;
    }
    
    .info-section h1,
    .info-section h2 {
        font-size: 18px;
    }
    
    .info-section p {
        font-size: 15px;
        line-height: 1.7;
    }
}

/* ====== RESPONSIVE ULTRA PEQUEÑO (< 400px) ====== */
@media (max-width: 400px) {
    .topbar-inner {
        padding: 0 10px;
        gap: 6px;
    }

    .topbar-menu-btn {
        padding: 8px 10px;
        font-size: 11px;
        min-height: 40px;
    }

    .topbar-menu-label {
        display: none;
    }

    .topbar-link {
        font-size: 14px;
        padding: 12px 14px;
        min-height: 44px;
    }

    .lang-select {
        min-width: 90px;
        font-size: 11px;
        padding: 6px 24px 6px 8px;
    }

    .topbar-right {
        gap: 6px;
    }
}

/* ====== PORTFOLIO MODAL (VENTANA ENCIMA) ====== */
body.modal-open {
    overflow: hidden;
}

.portfolio-modal[hidden] {
    display: none;
}

.portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
}

.portfolio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.66);
    backdrop-filter: blur(6px);
}

.portfolio-modal-dialog {
    position: relative;
    width: min(980px, 94vw);
    max-height: min(86vh, 860px);
    margin: 7vh auto 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.94), rgba(8, 8, 10, 0.90));
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.76);
    overflow: hidden;
}

/* Tema claro: portfolio-modal-dialog */
:root[data-theme="light"] .portfolio-modal-dialog {
    border: 1px solid #dbe1ec;
    background: linear-gradient(180deg, #ffffff, #f9fafb);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.12);
}

.portfolio-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(8, 8, 12, 0.55);
}

/* Tema claro: portfolio-modal-header */
:root[data-theme="light"] .portfolio-modal-header {
    border-bottom: 1px solid #dbe1ec;
    background: #fafbfc;
}

.portfolio-modal-title {
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.92);
}

/* Tema claro: portfolio-modal-title */
:root[data-theme="light"] .portfolio-modal-title {
    color: #0f172a;
}

.portfolio-modal-close {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(233, 32, 79, 0.28);
    background: rgba(8, 8, 12, 0.70);
    color: rgba(243, 244, 248, 0.92);
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Tema claro: portfolio-modal-close */
:root[data-theme="light"] .portfolio-modal-close {
    border: 1px solid rgba(233, 32, 79, 0.3);
    background: #f0f5fb;
    color: #0f172a;
}

.portfolio-modal-close:hover {
    border-color: rgba(233, 32, 79, 0.42);
    color: var(--text-on-accent);
    background: rgba(8, 8, 12, 0.85);
}

.portfolio-modal-close:active {
    transform: scale(0.96);
}

.portfolio-modal-body {
    padding: 14px 16px 18px;
    overflow: auto;
    max-height: calc(min(86vh, 860px) - 60px);
}

.portfolio-modal-content {
    display: grid;
    grid-template-columns: minmax(240px, 42%) minmax(0, 58%);
    gap: 18px;
    align-items: start;
}

.portfolio-modal-left {
    display: grid;
    gap: 12px;
}

.portfolio-modal-right {
    display: grid;
    gap: 12px;
}

.portfolio-modal-body .portfolio-expanded {
    padding: 0;
}

.portfolio-modal-body .portfolio-cover {
    margin: 0;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    object-fit: cover;
}

/* Modo claro: usar contain para que muestre marcos negros */
:root[data-theme="light"] .portfolio-modal-body .portfolio-cover {
    object-fit: contain;
    background: #000;
}

.portfolio-modal-body .portfolio-summary-text {
    gap: 10px;
}

.portfolio-modal-body .portfolio-topline {
    gap: 12px;
}

.portfolio-modal-body .portfolio-kicker {
    font-size: 10px;
}

.portfolio-modal-body .portfolio-year {
    font-size: 12px;
}

.portfolio-modal-body .status-badge {
    font-size: 11px;
    padding: 6px 12px;
}

.portfolio-modal-body .portfolio-title {
    font-size: clamp(18px, 2.4vw, 26px);
    letter-spacing: 0.05em;
}

.portfolio-modal-body .portfolio-meta {
    font-size: 1.05rem;
    color: rgba(243, 244, 248, 0.70);
}

.portfolio-modal-body .portfolio-desc {
    font-size: 1.05rem;
    line-height: 1.6;
}

.portfolio-modal-body .tag-chip {
    font-size: 11px;
}

/* Playlist */
.portfolio-playlist {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.portfolio-playlist-title {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(243, 244, 248, 0.86);
    margin-bottom: 10px;
}

.portfolio-playlist-list {
    display: grid;
    gap: 10px;
}

.portfolio-playlist-item {
    display: grid;
    gap: 8px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 12, 0.55);
}

.portfolio-playlist-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    color: rgba(243, 244, 248, 0.92);
}

@media (max-width: 900px) {
    .portfolio-modal-dialog {
        width: 96vw;
        margin: 3vh auto 0;
        max-height: 94vh;
        border-radius: 14px;
    }

    .portfolio-modal-body {
        max-height: calc(94vh - 60px);
        padding: 16px 14px 20px;
    }

    .portfolio-modal-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-modal-body .portfolio-cover {
        max-height: 40vh;
    }

    .portfolio-modal-backdrop {
        backdrop-filter: none;
    }
    
    .portfolio-modal-header {
        padding: 12px 14px;
    }
    
    .portfolio-modal-close {
        min-height: 44px;
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .portfolio-modal-title {
        font-size: 13px;
    }
}


/* ====== LOADING SCREEN ====== */
body.is-loading {
    overflow: hidden;
    overscroll-behavior: none;
}

body.is-loading .audio-player {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding:
        max(12px, env(safe-area-inset-top))
        max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom))
        max(12px, env(safe-area-inset-left));
    overflow: hidden;
    background: radial-gradient(1200px 700px at 20% 10%, var(--accent-subtle), transparent 60%),
                radial-gradient(900px 600px at 80% 90%, rgba(255, 255, 255, 0.04), transparent 62%),
                linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-main) 55%, var(--bg-deep) 100%);
}

@supports (height: 100svh) {
    .loading-screen { min-height: 100svh; }
}

.loading-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    background-image: url("img/bg-pattern.png");
    background-repeat: repeat;
    background-size: auto;
    opacity: 0.80;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Tema claro: invertir patrón */
:root[data-theme="light"] .loading-screen::before {
    filter: invert(1);
}

.loading-content {
    position: relative;
    display: grid;
    gap: 12px;
    place-items: center;
    padding: 20px 16px;
    z-index: 10;
    width: min(420px, 90vw);
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.76);
    text-align: center;
    overflow: hidden;
    color: var(--text-primary);
}

.loading-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e9204f 0%, #ff4f7a 50%, #e9204f 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 15px rgba(233, 32, 79, 0.8), 0 0 30px rgba(233, 32, 79, 0.4);
    animation: loadingGlow 2s ease-in-out infinite;
}

.loading-gif {
    width: min(240px, 72vw);
    max-height: min(40vh, 240px);
    height: auto;
    image-rendering: auto;
}

.loading-text {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .loading-screen {
        padding: max(12px, env(safe-area-inset-top))
                 max(12px, env(safe-area-inset-right))
                 max(12px, env(safe-area-inset-bottom))
                 max(12px, env(safe-area-inset-left));
    }

    .loading-content {
        padding: 18px 14px;
        border-radius: 16px;
        width: min(95vw, 360px);
        gap: 10px;
    }

    .loading-gif {
        width: min(60vw, 180px);
        max-height: min(35vh, 180px);
    }

    .loading-text {
        font-size: 11px;
        letter-spacing: 0.16em;
        margin: 0;
    }
}

@media (max-width: 360px) {
    .loading-content {
        padding: 16px 12px;
        border-radius: 14px;
        width: 90vw;
        gap: 8px;
    }

    .loading-gif {
        width: min(55vw, 140px);
        max-height: min(32vh, 140px);
    }

    .loading-text {
        font-size: 10px;
        letter-spacing: 0.14em;
    }
}

.loading-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .loading-screen.is-hidden {
        transition: none;
    }
}

/* ====== Reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .bg-gradient,
    .tape-dot,
    .tape-window::after {
        animation: none !important;
    }
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }

}

/* Low-end devices: disable expensive effects */
.low-end .bg-gradient,
.low-end .tape-dot,
.low-end .tape-window::after {
    animation: none !important;
}

.low-end .cassette-card,
.low-end .info-section,
.low-end .portfolio-section {
    backdrop-filter: none;
}

.low-end .cassette-card {
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.70);
}

.low-end .info-section,
.low-end .portfolio-section {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.70);
}

/* Optimizaciones específicas para dispositivos móviles */
.is-mobile .bg-pattern {
    animation: none !important;
    opacity: 0.6;
}

.is-mobile .bg-gradient {
    animation: none !important;
    filter: blur(20px);
}

.is-mobile .tape-window::after {
    animation: none !important;
}

.is-mobile .tag-chip {
    animation: none !important;
}

.is-mobile .neon-glow {
    animation: none !important;
}

.is-mobile .cassette-card,
.is-mobile .info-section,
.is-mobile .portfolio-section {
    backdrop-filter: none;
}

/* Mejorar scroll en móviles */
.is-mobile .portfolio-modal-body,
.is-mobile .topbar-nav {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Optimizar imágenes en móviles */
.is-mobile img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.is-mobile .main-art,
.is-mobile .portfolio-cover {
    will-change: auto;
    transform: none !important;
}
/* ====== PORTFOLIO STATS ====== */
.portfolio-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  background: rgba(233, 32, 79, 0.08);
  border: 1px solid rgba(233, 32, 79, 0.2);
  border-radius: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
}

.stat-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 0.02em;
    color: #e9204f;
    text-shadow: 0 0 6px rgba(233, 32, 79, 0.45);
}

.stat-label {
    font-family: var(--font-heading);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 244, 248, 0.7);
}

:root[data-theme="light"] .stat-label {
  color: var(--text-muted);
}

:root[data-theme="light"] .stat-value {
  color: var(--accent);
  text-shadow: 0 0 4px rgba(233, 32, 79, 0.2);
}

/* ====== PORTFOLIO SEARCH ====== */
.portfolio-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ====== PORTFOLIO INTERACTIONS (selection + animations) ====== */
details.portfolio-item .portfolio-summary {
    transition: transform 160ms ease, box-shadow 200ms ease, filter 200ms ease;
}

details.portfolio-item:hover .portfolio-summary,
details.portfolio-item:focus-within .portfolio-summary {
    transform: translateY(-1px) scale(1.01);
    filter: brightness(1.02);
}

details.portfolio-item[open] .portfolio-summary {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 28px rgba(233, 32, 79, 0.15);
}

.portfolio-expanded {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 220ms ease, transform 220ms ease;
}

details.portfolio-item[open] .portfolio-expanded {
    opacity: 1;
    transform: translateY(0);
}

/* Subtle glow on open */
details.portfolio-item[open] .portfolio-cover {
    box-shadow: 0 0 0 2px rgba(233, 32, 79, 0.25), 0 10px 26px rgba(0,0,0,0.6);
    transition: box-shadow 200ms ease;
}

.portfolio-search-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  background: rgba(233, 32, 79, 0.15);
  border: 2px solid rgba(233, 32, 79, 0.3);
  color: rgba(243, 244, 248, 0.7);
  cursor: pointer;
  transition: all 200ms ease;
  font-size: 17px;
  z-index: 2;
}

:root[data-theme="light"] .portfolio-search-label {
  color: var(--accent);
  background: rgba(233, 32, 79, 0.08);
  border-color: rgba(233, 32, 79, 0.2);
}

.portfolio-search-label:hover {
  background: rgba(233, 32, 79, 0.25);
  border-color: rgba(233, 32, 79, 0.5);
  color: var(--accent);
  transform: translateY(-2px);
}

:root[data-theme="light"] .portfolio-search-label:hover {
  background: rgba(233, 32, 79, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.portfolio-search-input {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: #f3f3f3;
  background: rgba(14, 14, 20, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  transition: all 200ms ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .portfolio-search-input {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 2px solid var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.portfolio-search-input:focus {
  outline: none;
  border-color: rgba(233, 32, 79, 0.6);
  box-shadow: 0 0 0 4px rgba(233, 32, 79, 0.12), 0 6px 16px rgba(233, 32, 79, 0.15);
  transform: translateY(-1px);
}

:root[data-theme="light"] .portfolio-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(233, 32, 79, 0.1), 0 4px 12px rgba(233, 32, 79, 0.15);
}

.portfolio-search-input::placeholder {
  color: rgba(243, 244, 248, 0.4);
}

:root[data-theme="light"] .portfolio-search-input::placeholder {
  color: var(--text-disabled);
}

/* ====== SR-ONLY (Screen Reader Only) ====== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== LOADING SPINNER ====== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== TAG CLICKEABLE ====== */
.tag-chip {
  cursor: pointer;
  transition: background-color 180ms ease, transform 120ms ease;
}

.tag-chip:hover {
  background: rgba(233, 32, 79, 0.25);
  transform: translateY(-2px);
}

.tag-chip:active {
  transform: translateY(0);
}

/* ====== IMPROVED CONTRAST (WCAG AAA) ====== */
.status-badge[data-status="terminado"] {
  background: rgba(46, 213, 115, 0.20);
  color: #3edb81;
}

.status-badge[data-status="cancelado"] {
  background: rgba(237, 66, 69, 0.20);
  color: #ff6b6b;
}

.status-badge[data-status="proximamente"] {
  background: rgba(52, 152, 219, 0.20);
  color: #5dade2;
}

.status-badge[data-status="probablemente"] {
  background: rgba(255, 195, 18, 0.20);
  color: #ffd93d;
}

/* ====== FILTER ANIMATIONS ====== */
.portfolio-item {
  transition: opacity 300ms ease, transform 300ms ease;
}

.portfolio-item[hidden] {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

.portfolio-filters {
  transition: opacity 200ms ease;
}

.portfolio-filters[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* ====== RESPONSIVE STATS ====== */
@media (max-width: 640px) {
  .portfolio-stats {
    flex-direction: column;
    gap: 12px;
  }
  
  .stat-item {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .stat-value {
    font-size: 20px;
  }
}

/* ====== LAZY LOADING IMAGES ====== */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 300ms ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ====== FOCUS TRAP UTILITY ====== */
.modal-open {
  overflow: hidden;
}

/* ========================================
   ANIMACIONES PROFESIONALES Y2K - BITFOX
   ======================================== */

/* ====== 1. SCROLL REVEAL ANIMATIONS ====== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animations para proyectos */
.portfolio-item.reveal {
  transition-delay: calc(var(--item-index, 0) * 0.08s);
}

/* ====== 2. GLITCH EFFECT (Y2K) ====== */
@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                 -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                 -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                 -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                 -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                 0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                 -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                 0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                 -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                 0.05em 0 0 rgba(0, 255, 0, 0.75),
                 0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                 0.05em 0 0 rgba(0, 255, 0, 0.75),
                 0 -0.05em 0 rgba(0, 0, 255, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75),
                 -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                 -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
  }
}

.cassette-card:hover .logo-block img {
  animation: glitch 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* ====== 3. NEON GLOW ANIMADO ====== */
@keyframes neon-glow {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.70),
                0 0 26px rgba(233, 32, 79, 0.20),
                0 0 10px rgba(233, 32, 79, 0.4);
  }
  50% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.70),
                0 0 36px rgba(233, 32, 79, 0.35),
                0 0 20px rgba(233, 32, 79, 0.6),
                0 0 40px rgba(233, 32, 79, 0.3);
  }
}

.glow-button {
  animation: neon-glow 2s ease-in-out infinite;
}

.glow-button:hover {
  animation: neon-glow 0.8s ease-in-out infinite;
}

/* ====== 4. 3D TILT EN TARJETAS ====== */
/* Removed: 3D tilt effect */

.portfolio-item {
    transition: border-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.portfolio-item:hover {
    border-color: rgba(233, 32, 79, 0.6);
    box-shadow: 0 0 20px rgba(233, 32, 79, 0.4), 
                0 0 40px rgba(233, 32, 79, 0.2),
                0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ====== 5. SCANLINES (EFECTO CRT) ====== */
/* Removed scanline animation */

.tape-window::before {
  animation: scanline 6s linear infinite;
}

/* ====== 6. CURSOR PERSONALIZADO ====== */
/* Removed: custom cursor */

/* Quitar estela del cursor */
/* Removed: cursor trail */
/* ====== 7. RIPPLE EFFECT ====== */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(233, 32, 79, 0.5);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}

.ripple-effect:active::after {
  animation: ripple 0.6s ease-out;
}

.glow-button, .topbar-menu-btn, .portfolio-filter-reset {
  position: relative;
  overflow: hidden;
}

/* ====== 8. LOADING PROGRESS BAR ====== */
.loading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 5px;
    background: linear-gradient(90deg, #e9204f 0%, #ff4f7a 50%, #e9204f 100%);
    background-size: 200% 100%;
    z-index: 99999;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 15px rgba(233, 32, 79, 0.8), 0 0 30px rgba(233, 32, 79, 0.4);
    animation: loadingGlow 2s ease-in-out infinite;
}

@keyframes loadingGlow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(233, 32, 79, 0.8), 0 0 30px rgba(233, 32, 79, 0.4);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px rgba(233, 32, 79, 1), 0 0 40px rgba(233, 32, 79, 0.6);
    }
}

.loading-screen .loading-progress {
  width: 100%;
}

/* ====== 9. SMOOTH SCROLL INDICATOR ====== */
/* Removed scroll indicator */
/* ====== 10. PARTICLE CONTAINER ====== */
/* Removed: particles system */
/* ====== 11. GRID LINES CYBERPUNK ====== */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -3;
  background-image:
    linear-gradient(rgba(233, 32, 79, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 32, 79, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(50px);
  }
}

/* ====== 12. MODAL MEJORADO CON OVERLAY ====== */
.portfolio-modal {
  backdrop-filter: blur(8px);
  animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
    to {
        opacity: 1;
    }
}

.portfolio-modal-dialog {
  animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}


h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}
@keyframes modal-slide-up {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ====== 13. IMAGE ZOOM EFFECT ====== */
.portfolio-cover {
  transition: none;
  cursor: default;
}

.portfolio-cover:hover {
  transform: none;
}

.portfolio-modal .portfolio-cover {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: auto;
}

.portfolio-modal .portfolio-cover:hover {
    transform: none;
}

/* ====== 14. TAGS ANIMADOS ====== */
.tag-chip {
  animation: tag-float 3s ease-in-out infinite;
  animation-delay: calc(var(--tag-index, 0) * 0.2s);
}

@keyframes tag-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.tag-chip:hover {
  animation: tag-bounce 0.5s ease-out;
}

@keyframes tag-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ====== 15. TIMELINE VISUAL ====== */
/* Integrated into main portfolio-group-title */
/* ====== 16. GPU ACCELERATION (reducido para evitar exceso de memoria) ====== */
.portfolio-modal-dialog {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ====== 17. RESPETO A PREFERS-REDUCED-MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .cursor-trail,
  #particles-canvas,
  .cyber-grid,
  .scroll-indicator {
    display: none !important;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ====== 18. PARALLAX SUTIL EN FONDO ====== */
.bg-gradient {
  transition: transform 0.3s ease-out;
}

/* ====== 19. STATS ANIMADOS ====== */
.stat-value {
  animation: counter-up 1s ease-out;
}

@keyframes counter-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== 20. HOVER EFFECTS MEJORADOS ====== */
.socials a {
  position: relative;

/* ====== RESPONSIVE ADJUSTMENTS ====== */
@media (max-width: 900px) {
  .portfolio-item:hover {
    transform: none;
  }
  
  .portfolio-item:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .cassette-card:hover .logo-block img {
    animation: none;
  }
  
  .cursor-trail {
    display: none;
  }
  
  /* Desactivar animaciones pesadas en móvil */
  .bg-gradient {
    animation: none !important;
  }
  
  .tape-window::after {
    animation: none !important;
  }
  
  .tag-chip {
    animation: none;
  }
  
  /* Feedback táctil para botones */
  button:active,
  .glow-button:active,
  .topbar-menu-btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
  }
 }
 }