/* ===== VARIABLES GLOBALES ===== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --modal-overlay: rgba(0, 0, 0, 0.95);
    --tooltip-bg: linear-gradient(135deg, #667eea, #764ba2);
    --scrollbar-thumb: linear-gradient(180deg, #667eea, #764ba2);
    --scrollbar-track: #f0f0f0;
    --close-btn-bg: rgba(255, 255, 255, 0.15);
    --close-btn-hover: rgba(255, 255, 255, 0.25);
}

/* ===== MODO OSCURO ===== */
.dark-theme {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --bg-color: #111827;
    --text-color: #f3f4f6;
    --card-bg: #1f2937;
    --border-color: #374151;
    --navbar-bg: rgba(17, 24, 39, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0, 0, 0, 0.98);
    --scrollbar-track: #2d3748;
    --close-btn-bg: rgba(255, 255, 255, 0.1);
    --close-btn-hover: rgba(255, 255, 255, 0.2);
}

/* ===== DISEÑO DE DESLIZADORES (SCROLLBARS) ===== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: 10px;
    border: 3px solid var(--scrollbar-track);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: scale(1.1);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--scrollbar-track);
}

.project-modal .modal-content::-webkit-scrollbar,
.gallery-list::-webkit-scrollbar,
.modal-description::-webkit-scrollbar {
    width: 8px;
}

.project-modal .modal-content::-webkit-scrollbar-thumb,
.gallery-list::-webkit-scrollbar-thumb,
.modal-description::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border: 2px solid var(--scrollbar-track);
}

/* ===== BOTONES DE CERRAR - SIEMPRE FIJOS ===== */
.close-modal {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 0;
    margin: 0;
}

.close-modal::before,
.close-modal::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.close-modal::before {
    transform: rotate(45deg);
}

.close-modal::after {
    transform: rotate(-45deg);
}

.close-modal:hover {
    background: var(--gradient);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

/* Botón de cerrar para el visor de imágenes */
.close-image-viewer {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 110000 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 0;
    margin: 0;
}

.close-image-viewer::before,
.close-image-viewer::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.close-image-viewer::before {
    transform: rotate(45deg);
}

.close-image-viewer::after {
    transform: rotate(-45deg);
}

.close-image-viewer:hover {
    background: var(--gradient);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.close-image-viewer:active {
    transform: scale(0.95);
}

/* Responsive para botones de cerrar */
@media (max-width: 768px) {

    .close-modal,
    .close-image-viewer {
        top: 15px !important;
        right: 15px !important;
        width: 42px;
        height: 42px;
    }

    .close-modal::before,
    .close-modal::after,
    .close-image-viewer::before,
    .close-image-viewer::after {
        width: 22px;
    }
}

@media (max-width: 480px) {

    .close-modal,
    .close-image-viewer {
        top: 12px !important;
        right: 12px !important;
        width: 38px;
        height: 38px;
    }

    .close-modal::before,
    .close-modal::after,
    .close-image-viewer::before,
    .close-image-viewer::after {
        width: 20px;
    }
}

/* Ocultar cualquier texto residual */
.close-modal span,
.close-image-viewer span {
    display: none !important;
}

.close-modal,
.close-image-viewer {
    border: none;
    outline: none;
}

/* ===== VISOR DE IMÁGENES MEJORADO ===== */
.image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 11000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.image-viewer-content {
    position: relative;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.image-viewer-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.image-viewer-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: transparent;
    animation: zoomIn 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.viewer-caption {
    color: white;
    font-size: 1rem;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-weight: 500;
    width: 100%;
    border-radius: 0 0 8px 8px;
}

@media (min-width: 768px) {
    .viewer-caption {
        font-size: 1.1rem;
        padding: 18px 25px;
    }
}

.image-viewer-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 25px;
    width: 100%;
    flex-wrap: wrap;
}

.viewer-nav-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .viewer-nav-btn {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
}

.viewer-nav-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.viewer-nav-btn:active {
    transform: scale(0.95);
}

.image-counter {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .image-counter {
        font-size: 1.2rem;
        min-width: 90px;
        padding: 12px 25px;
    }
}

/* ===== ESTILOS GENERALES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

section {
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    max-width: 100vw;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 100%;
    word-wrap: break-word;
}

/* ===== EFECTO 3D BACKGROUND ===== */
.scene-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    perspective: 1000px;
}

.cube {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 2px solid rgba(102, 126, 234, 0.3);
    transform-style: preserve-3d;
    animation: rotate3D 20s infinite linear;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
}

.cube::before,
.cube::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.cube::before {
    transform: rotateY(90deg);
    transform-origin: left;
    left: 50%;
}

.cube::after {
    transform: rotateX(90deg);
    transform-origin: top;
    top: 50%;
}

.cube:nth-child(1) {
    top: 10%;
    left: 5%;
    width: 100px;
    height: 100px;
    animation: rotate3D 15s infinite linear, float1 8s infinite ease-in-out;
}

.cube:nth-child(2) {
    top: 60%;
    left: 80%;
    width: 120px;
    height: 120px;
    animation: rotate3D 18s infinite linear, float2 10s infinite ease-in-out;
}

.cube:nth-child(3) {
    top: 70%;
    left: 20%;
    width: 70px;
    height: 70px;
    animation: rotate3D 22s infinite linear, float3 12s infinite ease-in-out;
}

.cube:nth-child(4) {
    top: 30%;
    left: 85%;
    width: 90px;
    height: 90px;
    animation: rotate3D 25s infinite linear, float1 9s infinite ease-in-out;
}

.cube:nth-child(5) {
    top: 80%;
    left: 50%;
    width: 110px;
    height: 110px;
    animation: rotate3D 20s infinite linear, float2 11s infinite ease-in-out;
}

.cube:nth-child(6) {
    top: 20%;
    left: 40%;
    width: 60px;
    height: 60px;
    animation: rotate3D 28s infinite linear, float3 13s infinite ease-in-out;
}

.cube:nth-child(7) {
    top: 45%;
    left: 15%;
    width: 85px;
    height: 85px;
    animation: rotate3D 17s infinite linear, float1 10s infinite ease-in-out;
}

.cube:nth-child(8) {
    top: 85%;
    left: 75%;
    width: 95px;
    height: 95px;
    animation: rotate3D 23s infinite linear, float2 14s infinite ease-in-out;
}

@keyframes rotate3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes float1 {

    0%,
    100% {
        transform: translateY(0) translateX(0) rotateX(0deg) rotateY(0deg);
    }

    25% {
        transform: translateY(-30px) translateX(20px) rotateX(90deg) rotateY(45deg);
    }

    50% {
        transform: translateY(0) translateX(40px) rotateX(180deg) rotateY(90deg);
    }

    75% {
        transform: translateY(30px) translateX(20px) rotateX(270deg) rotateY(135deg);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0) translateX(0) rotateX(0deg) rotateY(0deg);
    }

    25% {
        transform: translateY(30px) translateX(-20px) rotateX(-90deg) rotateY(-45deg);
    }

    50% {
        transform: translateY(0) translateX(-40px) rotateX(-180deg) rotateY(-90deg);
    }

    75% {
        transform: translateY(-30px) translateX(-20px) rotateX(-270deg) rotateY(-135deg);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translateY(0) translateX(0) rotateX(0deg) rotateY(0deg);
    }

    33% {
        transform: translateY(20px) translateX(-15px) rotateX(120deg) rotateY(60deg);
    }

    66% {
        transform: translateY(-20px) translateX(15px) rotateX(240deg) rotateY(120deg);
    }
}

.dark-theme .cube {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(167, 139, 250, 0.15));
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 40px rgba(129, 140, 248, 0.3);
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
    padding: 20px 0;
}

.navbar.scrolled {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px var(--shadow-color);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
}

.theme-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: rotate(360deg);
}

.language-selector {
    position: relative;
    z-index: 1001;
}

.lang-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
}

.lang-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow-color);
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    border: 1px solid var(--border-color);
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    background: transparent;
    border: none;
    padding: 10px 20px;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.lang-option:hover {
    background: var(--gradient);
    color: white;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    z-index: 1001;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* ===== HOME SECTION ===== */
.home {
    text-align: center;
}

.home-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    width: 100%;
}

.greeting {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.name {
    font-size: 3rem;
    margin-bottom: 10px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.profession {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.typing {
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    padding-right: 8px;
    animation: blink 1s infinite;
    font-weight: 600;
    min-width: 200px;
    display: inline-block;
}

@keyframes blink {

    0%,
    100% {
        border-color: var(--primary-color);
    }

    50% {
        border-color: transparent;
    }
}

.description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0.9;
    text-align: justify;
}

.home-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-download,
.btn-contact {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-download {
    background: var(--gradient);
    color: white;
}

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

.btn-download:hover,
.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px var(--shadow-color);
}

/* ===== ABOUT SECTION ===== */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    width: 100%;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-color);
    opacity: 0.9;
    text-align: justify;
}

.about-image-large {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image-card {
    background: var(--card-bg);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    width: 100%;
}

.profile-image-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 50px var(--shadow-color);
    border-color: var(--primary-color);
}

.profile-image-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.profile-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.profile-image-card:hover .profile-image-wrapper img {
    transform: scale(1.05);
}

.profile-image-caption {
    padding: 25px;
    text-align: center;
    border-top: 2px solid var(--border-color);
    background: var(--card-bg);
}

.profile-image-caption h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-image-caption p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.9;
    margin: 5px 0;
    text-align: center;
}

.profile-university {
    font-size: 0.95rem !important;
    color: var(--primary-color) !important;
    font-weight: 500;
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

/* ===== INTERESES Y HABILIDADES ===== */
.interests-section,
.skills-section,
.tech-section {
    margin-top: 30px;
    width: 100%;
}

.interests-section h4,
.skills-section h4,
.tech-section h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.interests-section h4::after,
.skills-section h4::after,
.tech-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
}

.interests-grid,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
    width: 100%;
}

.interest-item,
.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    width: 100%;
}

.interest-item:hover,
.skill-item:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.interest-item i,
.skill-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
}

.interest-item span,
.skill-item span {
    color: var(--text-color);
    font-size: 0.95rem;
    flex: 1;
}

/* ===== TECNOLOGÍAS CON IMÁGENES ===== */
.tech-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 40px 30px;
    margin-top: 40px;
    margin-bottom: 20px;
    justify-items: center;
    align-items: center;
    width: 100%;
}

.tech-image-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    padding: 18px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    margin-bottom: 15px;
}

.tech-image-item:hover {
    transform: translateY(-12px) scale(1.08);
    border-color: var(--primary-color);
    box-shadow: 0 20px 35px var(--shadow-color);
    background: var(--card-bg);
    z-index: 10;
}

.tech-image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(30%) brightness(0.95);
    transition: all 0.3s ease;
}

.tech-image-item:hover img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.08);
}

.tech-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--tooltip-bg);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 20px var(--shadow-color);
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary-color);
    filter: drop-shadow(0 -2px 5px rgba(0, 0, 0, 0.1));
}

.tech-image-item:hover .tech-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    bottom: -50px;
}

.dark-theme .tech-image-item[data-name="GitHub"] img {
    filter: brightness(10) invert(1);
}

/* ===== SERVICES SECTION ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    width: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon i {
    font-size: 2.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-color);
    opacity: 0.9;
    margin-bottom: 20px;
    text-align: justify;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    cursor: pointer;
    aspect-ratio: 4/3;
    width: 100%;
    min-height: 300px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98), rgba(118, 75, 162, 0.98));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    text-align: center;
    box-sizing: border-box;
    overflow-y: auto;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
    width: 100%;
    word-wrap: break-word;
}

@media (min-width: 768px) {
    .portfolio-overlay h3 {
        font-size: 1.8rem;
    }
}

/* ===== BOTÓN CLIC PARA SABER MÁS ===== */
.btn-more-info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn-more-info {
        padding: 12px 25px;
        font-size: 1.1rem;
        gap: 10px;
    }
}

.btn-more-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-more-info:hover::before {
    left: 0;
}

.btn-more-info:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px var(--shadow-color);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===== MODAL PARA PROYECTOS - UN SOLO SCROLL ===== */
.project-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.project-modal .modal-content {
    position: relative;
    width: 95%;
    max-width: 1300px;
    margin: auto;
    background: var(--card-bg);
    border-radius: 30px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    word-wrap: break-word;
}

@media (min-width: 768px) {
    .modal-header h2 {
        font-size: 2.5rem;
    }
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tech-tags span {
    background: var(--gradient);
    color: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .modal-body {
        grid-template-columns: 1.5fr 1fr;
    }
}

.modal-description {
    padding-right: 10px;
}

.modal-description h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 25px 0 15px;
}

.modal-description h3:first-of-type {
    margin-top: 0;
}

.modal-description p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.features-list li {
    color: var(--text-color);
    padding: 10px 0 10px 30px;
    position: relative;
    line-height: 1.6;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 5px;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: '✓';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tech-icon-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tech-icon-large:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.tech-icon-large img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.tech-icon-large i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.tech-icon-large span {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    text-align: center;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    margin: 15px 0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    word-break: break-all;
}

@media (min-width: 768px) {
    .github-link {
        padding: 15px 30px;
        font-size: 1.1rem;
        gap: 15px;
    }
}

.github-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.github-link i {
    font-size: 1.5rem;
}

/* ===== GALERÍA - SIEMPRE VISIBLE EN MÓVILES ===== */
.modal-gallery {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    width: 100%;
}

.modal-gallery h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

@media (min-width: 768px) {
    .modal-gallery h3 {
        font-size: 1.8rem;
    }
}

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    width: 100%;
}

@media (min-width: 768px) {
    .gallery-list {
        gap: 25px;
        padding: 20px;
    }
}

.gallery-list-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    width: 100%;
    min-height: 180px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

@media (min-width: 768px) {
    .gallery-list-item {
        min-height: 220px;
    }
}

.gallery-list-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 35px var(--shadow-color);
    z-index: 10;
}

.gallery-list-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-list-item:hover img {
    transform: scale(1.08);
}

.gallery-item-tooltip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.7));
    color: white;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(5px);
    border-top: 3px solid var(--primary-color);
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .gallery-item-tooltip {
        padding: 15px;
        font-size: 1rem;
    }
}

.gallery-list-item:hover .gallery-item-tooltip {
    transform: translateY(0);
}

/* ===== SIEMPRE VISIBLE EN MÓVILES ===== */
@media (max-width: 768px) {
    .gallery-list-item .gallery-item-tooltip {
        transform: translateY(0) !important;
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
        padding: 12px;
        font-size: 0.9rem;
        border-top: 3px solid var(--primary-color);
    }
}

@media (max-width: 480px) {
    .gallery-list-item .gallery-item-tooltip {
        padding: 8px;
        font-size: 0.8rem;
        border-top-width: 2px;
    }
}

/* ===== CONTACT SECTION ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info,
.contact-form-container {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    width: 100%;
}

@media (min-width: 768px) {

    .contact-info,
    .contact-form-container {
        padding: 40px;
    }
}

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-info p {
    color: var(--text-color);
    opacity: 0.9;
    margin-bottom: 30px;
    text-align: justify;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.contact-item span {
    color: var(--text-color);
    word-break: break-word;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

@media (min-width: 768px) {

    .form-group input,
    .form-group textarea {
        padding: 15px;
        font-size: 1rem;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: var(--gradient);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .btn-submit {
        padding: 15px 30px;
        font-size: 1rem;
        gap: 10px;
    }
}

.btn-submit i {
    transition: all 0.3s ease;
}

.btn-submit:hover i {
    animation: fly 0.8s ease infinite;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 35px;
    height: 35px;
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
}

@media (min-width: 768px) {
    .footer-social a {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

.footer-social a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* ===== NOTIFICACIONES ===== */
.download-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    font-size: 0.9rem;
}

.download-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ===== FORM MESSAGES ===== */
.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

.form-message.success {
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
    border: 1px solid #48bb78;
}

.form-message.error {
    background: rgba(245, 101, 101, 0.15);
    color: #f56565;
    border: 1px solid #f56565;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fly {
    0% {
        transform: translateX(0) translateY(0);
    }

    25% {
        transform: translateX(5px) translateY(-3px);
    }

    50% {
        transform: translateX(10px) translateY(0);
    }

    75% {
        transform: translateX(5px) translateY(3px);
    }

    100% {
        transform: translateX(0) translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--navbar-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 999;
        gap: 40px;
        transform: none;
        display: flex;
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }

    .lang-btn span {
        display: none;
    }

    .navbar {
        padding: 15px 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-controls {
        gap: 10px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image-large {
        max-width: 350px;
    }

    .profile-image-wrapper {
        height: 350px;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-header h2 {
        font-size: 2rem;
    }

    .tech-images-grid {
        gap: 35px 25px;
    }

    .tech-image-item {
        width: 85px;
        height: 85px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .nav-menu a {
        font-size: 1.3rem;
    }

    .profile-image-wrapper {
        height: 300px;
    }

    .portfolio-item {
        min-height: 250px;
    }

    .portfolio-overlay h3 {
        font-size: 1.3rem;
    }

    .portfolio-overlay {
        padding: 20px;
    }

    .btn-more-info {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .modal-tech-tags span {
        padding: 5px 12px;
        font-size: 0.85rem;
    }

    .gallery-list {
        gap: 15px;
        padding: 10px;
    }

    .gallery-list-item {
        min-height: 150px;
    }

    .gallery-item-tooltip {
        padding: 10px;
        font-size: 0.85rem;
    }

    .name {
        font-size: 2rem;
    }

    .profession {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .home-buttons {
        flex-direction: column;
    }

    .interests-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .tech-images-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px 15px;
    }

    .tech-image-item {
        width: 70px;
        height: 70px;
        padding: 12px;
    }

    .tech-tooltip {
        font-size: 0.7rem;
        padding: 5px 10px;
        bottom: -38px;
    }

    .tech-image-item:hover .tech-tooltip {
        bottom: -42px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }

    .contact-item i {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }

    .nav-controls {
        gap: 5px;
    }

    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .lang-btn {
        padding: 6px;
    }

    .menu-toggle {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    .portfolio-item {
        min-height: 200px;
    }

    .portfolio-overlay h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .btn-more-info {
        padding: 6px 12px;
        font-size: 0.8rem;
        gap: 5px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-tech-tags span {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .gallery-list-item {
        min-height: 120px;
    }

    .gallery-item-tooltip {
        padding: 8px;
        font-size: 0.8rem;
    }

    .name {
        font-size: 1.6rem;
    }

    .profession {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .profile-image-wrapper {
        height: 250px;
        padding: 15px;
    }

    .profile-image-caption h4 {
        font-size: 1.2rem;
    }

    .profile-image-caption p {
        font-size: 0.85rem;
    }

    .tech-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 10px;
    }

    .tech-image-item {
        width: 65px;
        height: 65px;
        padding: 10px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .service-card h3 {
        font-size: 1.3rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 2rem;
    }

    .contact-info h3 {
        font-size: 1.4rem;
    }

    .btn-submit {
        padding: 10px 15px;
    }
}

@media (max-width: 375px) {
    .logo {
        font-size: 1.3rem;
    }

    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .lang-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .menu-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
    }

    .nav-menu a {
        font-size: 1.1rem;
    }

    .name {
        font-size: 1.4rem;
    }

    .profession {
        font-size: 1.1rem;
    }

    .home-content {
        padding: 25px 15px;
    }

    .btn-download,
    .btn-contact {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
    }

    .home-buttons {
        gap: 10px;
    }

    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .tech-images-grid {
        gap: 15px 8px;
    }

    .tech-image-item {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 1.2rem;
    }

    .theme-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .lang-btn {
        padding: 3px 6px;
    }

    .menu-toggle {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .tech-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-image-item {
        width: 55px;
        height: 55px;
        padding: 8px;
    }

    .portfolio-overlay h3 {
        font-size: 1rem;
    }

    .btn-more-info {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .gallery-list-item {
        min-height: 100px;
    }
}

/* Ajustes para pantallas muy grandes */
@media (min-width: 1600px) {

    .home-content,
    .about-content,
    .services-grid,
    .portfolio-grid,
    .contact-container {
        max-width: 1400px;
    }

    .tech-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .tech-image-item {
        width: 100px;
        height: 100px;
        padding: 20px;
    }
}

/* ===== CORRECCIÓN PARA BOTONES DE CERRAR ===== */
.close-modal span,
.close-image-viewer span {
    display: none !important;
}

/* ===== GARANTIZAR VISIBILIDAD DEL MENÚ HAMBURGUESA ===== */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex !important;
    }
}

.nav-menu.active {
    box-shadow: 0 10px 30px var(--shadow-color);
}

.nav-menu.active a {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-menu.active a::after {
    width: 100%;
}

/* ===== ESTILOS PARA CÓDIGO ===== */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    background: var(--bg-color);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 15px 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}



/* ===== LOGOS PROBLEMÁTICOS ===== */

/* GitHub */
.tech-image-item[data-name="GitHub"] img {
    filter: brightness(0);
    /* negro en claro */
}

.dark-theme .tech-image-item[data-name="GitHub"] img {
    filter: brightness(10);
    /* blanco en oscuro */
}

/* Vercel */
.tech-image-item[data-name="Vercel"] img {
    filter: brightness(0);
    /* negro en claro */
}

/* MODO CLARO → negro */
.tech-image-item[data-name="Vercel"] img {
    filter: brightness(0);
}

/* MODO OSCURO → blanco */
.dark-theme .tech-image-item[data-name="Vercel"] img {
    filter: brightness(0) invert(1);
}


/* Netlify más brillante */
.tech-image-item[data-name="Netlify"] img {
    filter: brightness(1.3) saturate(1.4);
}

/* En modo oscuro aún más brillante */
.dark-theme .tech-image-item[data-name="Netlify"] img {
    filter: brightness(1.6) saturate(1.6);
}

/* Render modo claro */
.tech-image-item[data-name="Render"] svg {
    color: #000;
    /* negro */
}

/* Render modo oscuro */
.dark-theme .tech-image-item[data-name="Render"] svg {
    color: #fff;
    /* blanco */
}


/* GitHub */
.tech-icon-large img[alt="GitHub"] {
    filter: invert(0);
    /* negro en claro */
}

.dark-theme .tech-icon-large img[alt="GitHub"] {
    filter: invert(1);
    /* blanco en oscuro */
}


.tech-icon-large[data-name="Vercel"] img {
    filter: invert(0);
}

.dark-theme .tech-icon-large[data-name="Vercel"] img {
    filter: invert(1);
}

.tech-image-item[data-name="Render"] {
    color: black;
}

.dark-theme .tech-image-item[data-name="Render"] {
    color: white !important;
}

.tech-image-item svg {
    fill: currentColor !important;
}

/* Render SVG en modal - modo claro */
.tech-icon-large[data-name="Render"] svg path {
    fill: #333333;
}

/* Render SVG en modal - modo oscuro */
.dark-theme .tech-icon-large[data-name="Render"] svg path {
    fill: #ffffff;
}


.dark-theme .tech-image-item img[alt="Adobe XD"] {
    filter: grayscale(1) brightness(0) invert(1);
}


/* ===== SOLUCIÓN PARA TYPING EFFECT SIN MOVIMIENTO ===== */
.profession {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
}

.profession span {
    display: inline-block;
    white-space: nowrap;
}

.typing-container {
    display: inline-block;
    min-width: 220px;
    text-align: left;
}

.typing {
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    padding-right: 8px;
    animation: blink 1s infinite;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

/* Responsive para el efecto de escritura */
@media (max-width: 768px) {
    .profession {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .profession span {
        white-space: normal;
    }

    .typing-container {
        min-width: 200px;
    }

    .typing {
        white-space: normal;
        word-break: keep-all;
        display: inline-block;
        min-height: 2.5rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .profession {
        font-size: 1.2rem;
    }

    .typing-container {
        min-width: 180px;
    }

    .typing {
        font-size: 1.2rem;
        min-height: 2rem;
    }
}

/* Opción alternativa: altura fija para el contenedor */
.profession-fixed {
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .profession-fixed {
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .profession-fixed {
        min-height: 60px;
    }
}

/* ===== PROFILE CAPTION ===== */
.profile-image-caption h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.profile-image-caption>p {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 0;
}

/* ===== SEPARADOR CON ÍCONO ===== */
.section-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.section-separator span {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section-separator i {
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* ===== TARJETA UNIVERSIDAD ===== */
.university-card {
    margin: 5px 0;
}

.university-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.25);
    width: auto;
    min-width: 220px;
}

.university-link i:first-child {
    font-size: 1rem;
    color: var(--primary-color);
}

.university-link i:last-child {
    font-size: 0.7rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.university-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.university-link:hover i:first-child {
    color: white;
}

.university-link:hover i:last-child {
    transform: translateX(3px);
    opacity: 1;
}

/* ===== CÉDULA CARD ===== */
.cedula-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 18px 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.cedula-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px var(--shadow-color);
}

/* Badge */
.cedula-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 4px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
}

/* Título */
.cedula-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: var(--text-color);
    opacity: 0.5;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    display: inline-block;
}

/* Número - CENTRADO (lo único que ajusté) */
.cedula-number-wrapper {
    display: flex;
    justify-content: center;
    margin: 8px 0;
}

.cedula-number {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Courier New', 'SF Mono', monospace;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Botón copiar */
.cedula-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 8px 0;
}

.cedula-copy-btn i {
    font-size: 0.65rem;
    color: var(--primary-color);
}

.cedula-copy-btn:hover {
    background: var(--gradient);
    border-color: transparent;
    color: white;
}

.cedula-copy-btn:hover i {
    color: white;
}

.cedula-copy-btn:active {
    transform: scale(0.96);
}

/* Estado */
.cedula-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--text-color);
    opacity: 0.7;
}

.status-item i {
    font-size: 0.65rem;
    color: #10b981;
}

.status-dot {
    width: 3px;
    height: 3px;
    background: var(--border-color);
    border-radius: 50%;
}

/* Enlace verificar */
.cedula-verify-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 40px;
    transition: all 0.25s ease;
    width: 100%;
}

.cedula-verify-link i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.cedula-verify-link:hover {
    background: var(--gradient);
    color: white;
    gap: 12px;
}

.cedula-verify-link:hover i {
    transform: translateX(3px);
}

/* Modo oscuro */
.dark-theme .cedula-card {
    background: rgba(31, 41, 55, 0.6);
}

.dark-theme .university-link {
    background: rgba(129, 140, 248, 0.12);
}

.dark-theme .cedula-verify-link {
    background: rgba(129, 140, 248, 0.1);
}

.dark-theme .section-separator i {
    color: var(--primary-color);
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 480px) {
    .profile-image-caption h4 {
        font-size: 1.1rem;
    }

    .profile-image-caption>p {
        font-size: 0.8rem;
    }

    .section-separator {
        margin: 12px 0;
        gap: 8px;
    }

    .section-separator span {
        width: 30px;
    }

    .section-separator i {
        font-size: 0.7rem;
    }

    .university-link {
        padding: 8px 16px;
        font-size: 0.75rem;
        min-width: 180px;
    }

    .cedula-card {
        padding: 14px 12px;
    }

    .cedula-number {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .cedula-title {
        font-size: 0.7rem;
    }

    .cedula-badge {
        font-size: 0.55rem;
        padding: 3px 12px;
    }

    .cedula-copy-btn {
        padding: 4px 10px;
        font-size: 0.6rem;
    }

    .status-item {
        font-size: 0.6rem;
    }

    .cedula-verify-link {
        padding: 6px 14px;
        font-size: 0.65rem;
    }
}