﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --background: #1a1a1a;
    --foreground: #e8e8e8;
    --muted: #2a2a2a;
    --muted-foreground: #a0a0a0;
    --accent: #d4a574;
    --border: #3a3a3a;
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Spacing */
    --container-padding: 1rem;
}

/* MODO CLARO */
[data-theme="light"] {
    --background: #fafafa;
    --foreground: #0a0a0a;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #8b6f47;
    --border: #e5e5e5;
}

/* Transición suave al cambiar de tema */
body,
.header,
.nav-dropdown .dropdown-menu,
.artwork-card,
.form-input,
.form-textarea,
.form-button {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* font-size */
html {
    font-size: clamp(16px, 0.9vw, 18px);
    scroll-behavior: smooth;
}

/* Body con flexbox */
body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Form como contenedor flex para sticky footer */
#form1 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    flex: 1;
}


/* Container Utilities */
.container {
    width: min(92vw, 1400px);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-narrow {
    width: min(88vw, 1000px);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-wide {
    width: min(94vw, 1700px);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    position: fixed; /*parece que aca esta el problema*/
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    flex-shrink: 0;
}

/* Header en modo claro */
[data-theme="light"] .header {
    background-color: rgba(250, 250, 250, 0.8);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: var(--foreground);
    }

.social-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

    .social-links a {
        color: var(--muted-foreground);
        transition: color 0.2s;
        display: flex;
        align-items: center;
    }

        .social-links a:hover {
            color: var(--foreground);
        }

/* Hero Section */
.hero {
    padding: 100px 1rem 2rem; 
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--muted-foreground);
    font-weight: 300;
    margin-bottom: 2rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 42rem;
    line-height: 1.6;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    padding-top: 0.5rem;
}

/* HERO HOME */
.hero-home {
    position: relative;
    padding-top: 90px;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

/* Hero home en modo claro */
[data-theme="light"] .hero-home {
    background-color: #f5f5f5;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

    .slide.active {
        opacity: 1;
    }

/* TEXTO SUPERPUESTO */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
}

/* Hero overlay en modo claro */
[data-theme="light"] .hero-overlay {
    background: rgba(0, 0, 0, 0.25);
}

.hero-overlay .hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-overlay .hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.9);
    color: #ffffff;
    opacity: 1;
}

/* Título y subtítulo del hero en modo claro */
[data-theme="light"] .hero-overlay .hero-title {
    color: #0a0a0a;
    text-shadow: 1px 1px 10px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .hero-overlay .hero-subtitle {
    color: #1a1a1a;
    text-shadow: 1px 1px 10px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 255, 255, 0.7);
}

/* SUBMENU WORKS */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

    .nav-dropdown .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        transform: none;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        padding: 0.5rem 0;
        z-index: 1000;
        flex-direction: column;
        align-items: flex-start;
        white-space: nowrap;
        min-width: 280px;
        border-radius: 4px;
    }

/* Dropdown en modo claro */
[data-theme="light"] .nav-dropdown .dropdown-menu {
    background: rgba(250, 250, 250, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--muted-foreground);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-align: left;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

    .dropdown-item:hover {
        background: var(--muted);
        color: var(--foreground);
    }

/* Works Section */
.works {
    padding: 0.5rem 1rem;
    background-color: rgba(42, 42, 42, 0.3);
}

[data-theme="light"] .works {
    background-color: rgba(245, 245, 245, 0.5);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 42rem;
    line-height: 1.6;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
}

.artwork-card {
    background-color: var(--muted);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

    .artwork-card:hover {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

.artwork-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background-color: var(--muted);
    max-height: 600px;
}

    .artwork-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #111;
        transition: transform 0.5s;
    }

.artwork-card:hover .artwork-image img {
    transform: scale(1.05);
}

.artwork-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.artwork-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.artwork-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.artwork-year {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.artwork-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.artwork-description {
    font-size: 0.875rem;
    line-height: 1.6;
    padding-top: 0.5rem;
}

/* ABOUT LAYOUT */
.about-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    width: 80%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.about-text {
    max-width: 700px;
}

.image-hover {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

    .image-hover img {
        width: 100%;
        height: auto;
        display: block;
        transition: opacity 1.2s ease;
    }

.img-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.image-hover:hover .img-hover {
    opacity: 1;
}

.image-hover:hover .img-default {
    opacity: 0;
}

@media (min-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr 1.2fr;
    }

    .about-image img {
        max-width: 100%;
    }
}

/* CV */
.cv-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 6rem 2rem 6rem;
    color: var(--foreground);
}

.cv-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.cv-header-text h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--foreground);
}

.cv-header-text .subtitle {
    font-size: 0.95rem;
    color: var(--muted-foreground);
    margin: 0 0 4px;
}

.cv-header-text .tagline {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    font-style: italic;
    opacity: 0.7;
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid var(--muted-foreground);
    background: transparent;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 6px;
}

    .cv-download-btn:hover {
        background: var(--foreground);
        color: var(--background);
        border-color: var(--foreground);
    }

    .cv-download-btn svg {
        flex-shrink: 0;
    }

.cv-section {
    margin-bottom: 2.8rem;
}

.cv-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cv-contact-grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 12px;
    font-size: 0.88rem;
    color: var(--muted-foreground);
}

    .cv-contact-grid .label {
        color: var(--foreground);
        font-weight: 600;
    }

    .cv-contact-grid a {
        color: var(--muted-foreground);
        text-decoration: none;
        transition: color 0.2s;
    }

        .cv-contact-grid a:hover {
            color: var(--foreground);
        }

.cv-body {
    font-size: 0.93rem;
    line-height: 1.8;
    color: var(--muted-foreground);
    margin: 0 0 0.7rem;
}

.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .cv-list li {
        font-size: 0.93rem;
        color: var(--muted-foreground);
        padding: 4px 0 4px 1.4rem;
        position: relative;
        line-height: 1.65;
    }

        .cv-list li::before {
            content: "—";
            position: absolute;
            left: 0;
            color: var(--border);
        }

.cv-serie {
    margin-bottom: 1.4rem;
}

.cv-serie-title {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 4px;
}

.cv-serie-desc {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin: 0;
}

.cv-footer-note {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--border);
    text-align: center;
    letter-spacing: 0.08em;
}

/* Contact Section */
.contact {
    padding: 120px 1.5rem 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-intro {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.contact-link {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s;
}

    .contact-link:hover {
        color: var(--accent);
    }

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s;
}

    .form-input:focus,
    .form-textarea:focus {
        outline: none;
        border-color: var(--accent);
    }

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--foreground);
    color: var(--background);
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .form-button:hover {
        opacity: 0.9;
    }

.validation-summary {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.4);
    font-size: 14px;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    flex-shrink: 0;
}

/* ============================================
   SELECTOR DE IDIOMA
   ============================================ */

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.lang-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    letter-spacing: 0.05em;
}

    .lang-link:hover {
        color: var(--foreground);
    }

    .lang-link.active {
        color: var(--foreground);
        text-decoration: underline;
    }

.lang-separator {
    color: var(--border);
    font-size: 0.75rem;
}

/* ============================================
   THEME TOGGLE BUTTON - CHROME/EDGE FIX
   ============================================ */

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    transition: background 0.3s ease, border-color 0.3s ease;
    width: 40px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

    .theme-toggle:hover {
        background: var(--muted);
        border-color: var(--foreground);
    }

    /* Iconos - posicionamiento absoluto con visibilidad controlada */
    .theme-toggle svg {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        color: var(--foreground);
        pointer-events: none;
    }

/* Modo oscuro - mostrar luna, ocultar sol */
.sun-icon {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) rotate(180deg) scale(0);
    transition: opacity 0.3s ease, visibility 0s linear 0.3s, transform 0.3s ease;
}

.moon-icon {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    transition: opacity 0.3s ease, visibility 0s linear 0s, transform 0.3s ease;
}

/* Modo claro - mostrar sol, ocultar luna */
[data-theme="light"] .sun-icon {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    transition: opacity 0.3s ease, visibility 0s linear 0s, transform 0.3s ease;
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) rotate(-180deg) scale(0);
    transition: opacity 0.3s ease, visibility 0s linear 0.3s, transform 0.3s ease;
}

/* Fallback para navegadores sin data-theme */
html:not([data-theme]) .moon-icon,
html[data-theme="dark"] .moon-icon {
    opacity: 1;
    visibility: visible;
}

html:not([data-theme]) .sun-icon,
html[data-theme="dark"] .sun-icon {
    opacity: 0;
    visibility: hidden;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE Y TABLET
   ============================================ */

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
    font-size: 1.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
}

/* Contenedor fijo mobile: siempre visible, contiene theme + idioma + hamburguesa */
.nav-controls-fixed {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.language-selector-mobile {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

@media (max-width: 768px) {
    /* Mostrar controles fijos y hamburguesa */
    .nav-controls-fixed {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    /* Ocultar theme y language dentro del menú desplegable */
    .nav-links .theme-toggle,
    .nav-links .language-selector {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        border-top: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        display: none;
        gap: 0;
    }

        .nav-links.active {
            display: flex;
        }

    .nav-link {
        width: 100%;
        padding: 0.75rem 1rem;
        display: block;
    }

    .nav-dropdown {
        width: 100%;
    }

        .nav-dropdown .dropdown-menu {
            position: static;
            transform: none;
            box-shadow: none;
            border-left: 2px solid var(--border);
            margin-left: 1rem;
            min-width: auto;
            display: none;
            flex-direction: column;
            background: rgba(26, 26, 26, 0.95);
            border: 1px solid var(--border);
            padding: 0.5rem 0;
            gap: 0;
            width: 100%;
        }

    [data-theme="light"] .nav-dropdown .dropdown-menu {
        background: rgba(250, 250, 250, 0.95);
    }

    .nav-dropdown .dropdown-menu.show {
        display: flex;
    }

    .dropdown-item {
        font-size: 0.8rem;
        opacity: 1;
        text-align: left;
        padding: 0.6rem 1.2rem;
    }

    .social-links {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    .hero {
        padding: 100px 1rem 2rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }
    /* Contact responsive */
    .contact {
        padding: 100px 1rem 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-link {
        word-break: break-all;
        font-size: 0.85rem;
    }

    .contact-form-wrapper {
        width: 100%;
    }

    .form-input,
    .form-textarea,
    .form-button {
        width: 100%;
        box-sizing: border-box;
    }
    .logo {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    /* Compensar header fijo en CV */
    .cv-wrapper {
        padding-top: 80px;
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
    /* About y Statement: imagen encima del texto en mobile */
    .about-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-image img,
    .image-hover {
        width: 100%;
        max-width: 100%;
    }

}

/* Desktop navigation horizontal */
@media (min-width: 769px) {
    .nav-links {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: flex;
    }

    .theme-toggle {
        margin-left: 1rem;
    }

    .language-selector {
        margin-left: 1rem;
        padding-left: 1rem;
        border-left: 1px solid var(--border);
    }
}

@media (max-width: 600px) {
    .cv-header {
        flex-direction: column;
    }

    .cv-wrapper {
        padding-top: 80px;
        padding-left: 1.2rem;
        padding-right: 1.2rem;
        padding-bottom: 4rem;
    }
}

@media (max-width: 480px) {
    .nav-link {
        font-size: 0.75rem;
    }

    .social-links {
        gap: 0.5rem;
    }
}

/* ============================================
   BOTÓN FLOTANTE VOLVER - SOLO MOBILE
   ============================================ */

.btn-back {
    display: none;
}

@media (max-width: 768px) {
    .btn-back {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 1.5rem;
        left: 1.5rem;
        z-index: 999;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background-color: var(--muted);
        border: 1px solid var(--border);
        color: var(--foreground);
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: background 0.2s, border-color 0.2s, opacity 0.3s;
        opacity: 0;
        pointer-events: none;
    }

        .btn-back.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .btn-back:hover {
            background: var(--border);
            border-color: var(--foreground);
        }

        .btn-back svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }
    a.btn-back {
        text-decoration: none;
    }
}
/* ============================================
   ESCALADO PARA RESOLUCIONES ALTAS (2K y superiores)
   ============================================ */

/* Para monitores 2K (2560x1440) y superiores */
@media (min-width: 2560px) {
    html {
        font-size: 22px;
    }

    :root {
        --container-padding: 1.5rem;
    }

    .container {
        width: min(92vw, 1700px);
    }

    .container-narrow {
        width: min(88vw, 1200px);
    }

    .container-wide {
        width: min(94vw, 2000px);
    }

    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 3rem;
    }

    .artwork-image {
        max-height: 700px;
    }
}

/* Para monitores 4K (3840x2160) y superiores */
@media (min-width: 3840px) {
    html {
        font-size: 28px;
    }

    .container {
        width: min(92vw, 2400px);
    }

    .container-narrow {
        width: min(88vw, 1800px);
    }

    .container-wide {
        width: min(94vw, 2800px);
    }

    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
        gap: 4rem;
    }

    .artwork-image {
        max-height: 900px;
    }

    .cv-wrapper {
        max-width: 1200px;
        padding: 0.5rem 2rem 6rem;
    }

    .hero {
        padding: 0.5rem 1rem 2rem;
    }

    .works {
        padding: 0.5rem 1rem;
    }

    .contact {
        padding: 0.5rem 1rem;
    }
}

