* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #1a1a1a;
    color: white;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b35;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 25px;
}

.nav-menu a:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.nav-menu svg {
    width: 20px;
    height: 20px;
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #ff6b35;
    color: #ff6b35;
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #ff6b35;
    color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 150px;
    z-index: 1;
    margin-bottom: 0;
}

.hero-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

.hero-info {
    z-index: 2;
}

.greeting {
    display: inline-block;
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.hero-info h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.1;
    font-weight: 700;
}

.hero-info h2 {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 30px;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 40px;
    max-width: 500px;
}

.highlight {
    color: #ff6b35;
}

/* Tecnologías */
.tech-section {
    margin: 40px 0 30px 0;
}

.tech-section h3 {
    font-size: 1.2rem;
    color: #ff6b35;
    margin-bottom: 20px;
    font-weight: 600;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-item:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateY(-3px);
}

.tech-item img {
    width: 35px;
    height: 35px;
    margin-bottom: 8px;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.tech-item:hover img {
    filter: brightness(1.1);
}

.tech-item span {
    font-size: 0.8rem;
    text-align: center;
    font-weight: 500;
}

/* Certificaciones */
.certificates-section {
    margin: 30px 0 40px 0;
}

.certificates-section h3 {
    font-size: 1.2rem;
    color: #ff6b35;
    margin-bottom: 20px;
    font-weight: 600;
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.certificate-item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.certificate-item:hover {
    border-color: #ff6b35;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.2);
}

.certificate-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.certificate-item:hover img {
    transform: scale(1.05);
}

/* Modal para certificaciones */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 15px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 107, 53, 0.8);
    transform: scale(1.1);
}

.modal-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 40px 20px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* Botones de Acción */
.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary-outline:hover {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-2px);
}

/* ===== DROPDOWN BUTTON STYLES ===== */
.btn-group {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    position: relative;
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    z-index: 2;
}

.dropdown-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-group:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 15px;
    padding: 10px 0;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10;
    margin-top: 5px;
}

.btn-group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 2px 10px;
}

.dropdown-menu a:hover {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    transform: translateX(5px);
    color: white;
}

.dropdown-menu a:first-child {
    margin-top: 5px;
}

.dropdown-menu a:last-child {
    margin-bottom: 5px;
}

/* Efecto de aparición suave */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(26, 26, 26, 0.95);
}

/* ===== FIN DROPDOWN STYLES ===== */

/* Foto Personal con fondo de código */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    height: 100%;
}

.profile-container {
    position: relative;
    width: 500px;
    height: 700px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.profile-photo {
    position: absolute;
    width: 110%;
    height: 110%;
    object-fit: cover;
    object-position: center bottom;
    transition: transform 0.3s ease;
    z-index: 3;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.3));
    transform: scale(1.08);
}

.profile-photo:hover {
    transform: scale(1.09);
}

.profile-photo.blur {
    position: absolute;
    top: -100px;
    left: 5px;
    width: 110%;
    height: 110%;
    transform: scale(1.05);
    filter: blur(15px) drop-shadow(0 0 30px rgba(255, 107, 53, 0.4));
    z-index: 1;
    opacity: 0.5;
    transition: all 0.35s ease-out;
}

.code-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #ff6b35;
    overflow: hidden;
    pointer-events: none;
}

.code-line {
    position: absolute;
    white-space: nowrap;
    animation: float-code 12s ease-in-out infinite;
    font-weight: 500;
    text-shadow: 0 0 10px currentColor;
}

.code-line:nth-child(1) {
    top: 5%;
    left: -80%;
    animation-delay: 0s;
    color: #667eea;
    opacity: 0.8;
}

.code-line:nth-child(2) {
    top: 15%;
    right: -80%;
    animation-delay: 1s;
    color: #ff6b35;
    opacity: 0.9;
}

.code-line:nth-child(3) {
    top: 25%;
    left: -80%;
    animation-delay: 2s;
    color: #84fab0;
    opacity: 0.7;
}

.code-line:nth-child(4) {
    top: 35%;
    right: -80%;
    animation-delay: 3s;
    color: #feca57;
    opacity: 0.8;
}

.code-line:nth-child(5) {
    top: 45%;
    left: -80%;
    animation-delay: 4s;
    color: #ff9a9e;
    opacity: 0.9;
}

.code-line:nth-child(6) {
    top: 55%;
    right: -80%;
    animation-delay: 5s;
    color: #a8edea;
    opacity: 0.7;
}

.code-line:nth-child(7) {
    top: 65%;
    left: -80%;
    animation-delay: 6s;
    color: #ffd93d;
    opacity: 0.8;
}

.code-line:nth-child(8) {
    top: 75%;
    right: -80%;
    animation-delay: 7s;
    color: #6c5ce7;
    opacity: 0.9;
}

.code-line:nth-child(9) {
    top: 85%;
    left: -80%;
    animation-delay: 8s;
    color: #fd79a8;
    opacity: 0.7;
}

.code-line:nth-child(10) {
    top: 95%;
    right: -80%;
    animation-delay: 9s;
    color: #00b894;
    opacity: 0.8;
}

.code-line:nth-child(11) {
    top: 12%;
    left: -60%;
    animation-delay: 1.5s;
    color: #e17055;
    opacity: 0.6;
}

.code-line:nth-child(12) {
    top: 22%;
    right: -60%;
    animation-delay: 2.5s;
    color: #74b9ff;
    opacity: 0.7;
}

.code-line:nth-child(13) {
    top: 32%;
    left: -60%;
    animation-delay: 3.5s;
    color: #55a3ff;
    opacity: 0.8;
}

.code-line:nth-child(14) {
    top: 42%;
    right: -60%;
    animation-delay: 4.5s;
    color: #fdcb6e;
    opacity: 0.6;
}

.code-line:nth-child(15) {
    top: 52%;
    left: -60%;
    animation-delay: 5.5s;
    color: #e84393;
    opacity: 0.9;
}

@keyframes float-code {
    0%, 100% {
        transform: translateX(0) translateY(0px);
        opacity: 0;
    }
    15%, 85% {
        opacity: 1;
    }
    50% {
        transform: translateX(300px) translateY(-15px);
        opacity: 0.8;
    }
}

.code-background::before {
    content: '{ } < > [ ] ( ) ; . , : " \' = + - * / % & | ^ ~ ! ? # $ @ \\ _ function class const let var if else for while return public private static void int string bool float double';
    position: absolute;
    top: 0;
    left: 0;
    width: 150%;
    height: 150%;
    font-size: 10px;
    color: #ff6b35;
    opacity: 0.15;
    letter-spacing: 8px;
    line-height: 25px;
    word-spacing: 12px;
    animation: drift 25s linear infinite;
    text-shadow: 0 0 5px currentColor;
}

@keyframes drift {
    0% {
        transform: translateX(-15%) translateY(-15%);
    }
    100% {
        transform: translateX(15%) translateY(15%);
    }
}

.hero-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100px;
    background: linear-gradient(90deg, 
        rgba(255, 107, 53, 0.15) 0%,
        rgba(255, 140, 66, 0.2) 25%,
        rgba(102, 126, 234, 0.15) 50%,
        rgba(255, 140, 66, 0.2) 75%,
        rgba(255, 107, 53, 0.15) 100%
    );
    backdrop-filter: blur(15px);
    z-index: 4;
    margin-left: calc(-50vw + 50%);
}

.hero-bottom-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #ff6b35 25%,
        #667eea 50%,
        #ff6b35 75%,
        transparent 100%
    );
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* Game Sections */
.game-section {
    padding: 120px 0;
    position: relative;
    background: #1a1a1a;
    z-index: 10;
    margin: 0;
    width: 100%;
    clear: both;
}

.game-section:nth-child(even) {
    background: #222222;
}

.game-section:first-of-type {
    padding-top: 200px;
    border-top: 2px solid #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 12;
}

.game-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 13;
}

.game-content.reverse {
    direction: rtl;
}

.game-content.reverse > * {
    direction: ltr;
}

.game-image {
    border-radius: 20px;
    transition: transform 0.1s ease-out;
    perspective: 1000px;
    cursor: pointer;
    transform-style: preserve-3d;
    margin: 20px;
    position: relative;
    z-index: 15;
}

.game-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ff6b35;
}

.game-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

.game-stats {
    display: flex;
    gap: 30px;
    margin: 30px 0;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b35;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animated Background Elements */
.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Footer */
.footer {
    background: #0f0f0f;
    padding: 50px 0;
    text-align: center;
}

.footer p {
    opacity: 0.7;
}

/* Loading Animation */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
    transform: scaleX(0);
    transform-origin: left;
    animation: loading 3s ease-out forwards;
    z-index: 9999;
}

@keyframes loading {
    to { transform: scaleX(1); }
}

/* ===== RESPONSIVE DESIGN - MOBILE OPTIMIZADO ===== */

/* Tablets y dispositivos medianos (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content-grid {
        gap: 60px;
    }
    
    .profile-container {
        width: 400px;
        height: 550px;
    }
    
    .hero-info h1 {
        font-size: 3rem;
    }
    
    .game-content {
        gap: 50px;
    }
    
    .game-info h2 {
        font-size: 2.2rem;
    }
}

/* Tablets pequeñas y móviles grandes (481px - 768px) */
@media (max-width: 768px) {
    /* Header móvil */
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .logo {
        font-size: 20px;
    }

    /* Hero Section móvil */
    .hero {
        padding: 100px 0 120px;
        min-height: auto;
    }

    .hero-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 0 20px;
    }

    .hero-info h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-info h2 {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    /* Tecnologías y certificaciones móvil */
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .certificates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .tech-item {
        padding: 12px 8px;
    }
    
    .tech-item img {
        width: 30px;
        height: 30px;
    }
    
    .tech-item span {
        font-size: 0.75rem;
    }

    /* Imagen de perfil móvil */
    .profile-container {
        width: 280px;
        height: 400px;
    }
    
    .code-line {
        font-size: 12px;
    }

    /* Botones móvil */
    .hero-actions {
        justify-content: center;
        margin-top: 30px;
        gap: 15px;
    }
    
    .btn-primary,
    .dropdown-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .btn-secondary-outline {
        padding: 12px 25px;
        font-size: 1rem;
    }

    /* Game sections móvil */
    .game-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .game-image {
        margin: 0;
        order: -1;
    }
    
    .game-image img {
        height: 250px;
    }
    
    .game-info h2 {
        font-size: 2rem;
    }
    
    .game-info p {
        font-size: 1rem;
    }

    .game-stats {
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }

    .game-section:first-of-type {
        padding-top: 150px;
    }

    /* Dropdown móvil */
    .dropdown-menu {
        min-width: 180px;
        left: 0;
        transform: translateX(0);
    }

    .btn-group:hover .dropdown-menu {
        transform: translateX(0);
    }
    
    /* Modal móvil */
    .modal-content {
        max-width: 90%;
        margin: 20px;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-title {
        font-size: 1rem;
        padding: 30px 15px 15px;
    }
}

/* Móviles pequeños (320px - 480px) */
@media (max-width: 480px) {
    /* Container más compacto */
    .container {
        padding: 0 15px;
    }
    
    /* Header extra compacto */
    .nav-container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 18px;
        gap: 5px;
    }

    /* Hero ultra compacto */
    .hero {
        padding: 80px 0 100px;
    }
    
    .hero-content-grid {
        gap: 30px;
        padding: 0 15px;
    }
    
    .hero-info h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero-info h2 {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .greeting {
        font-size: 0.9rem;
        padding: 6px 12px;
        margin-bottom: 15px;
    }

    /* Tecnologías ultra compactas */
    .tech-section {
        margin: 30px 0 20px 0;
    }
    
    .tech-section h3,
    .certificates-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .tech-grid,
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .tech-item {
        padding: 10px 5px;
    }
    
    .tech-item img {
        width: 25px;
        height: 25px;
        margin-bottom: 5px;
    }
    
    .tech-item span {
        font-size: 0.7rem;
    }
    
    .certificate-item img {
        height: 50px;
    }

    /* Certificaciones compactas */
    .certificates-section {
        margin: 20px 0 30px 0;
    }

    /* Imagen de perfil compacta */
    .profile-container {
        width: 220px;
        height: 320px;
    }
    
    .code-background {
        font-size: 10px;
    }
    
    .code-line {
        font-size: 10px;
    }

    /* Botones en columna */
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-top: 25px;
    }
    
    .btn-primary,
    .btn-secondary-outline,
    .dropdown-btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Dropdown compacto */
    .dropdown-menu {
        min-width: 160px;
        font-size: 0.9rem;
    }
    
    .dropdown-menu a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    /* Game sections compactas */
    .game-section {
        padding: 80px 0;
    }
    
    .game-section:first-of-type {
        padding-top: 120px;
    }
    
    .game-content {
        gap: 30px;
    }
    
    .game-image img {
        height: 200px;
    }
    
    .game-info h2 {
        font-size: 1.7rem;
        margin-bottom: 15px;
    }
    
    .game-info p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .game-stats {
        gap: 15px;
        margin: 20px 0;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }

    /* Modal extra compacto */
    .modal-content {
        max-width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-close {
        top: 5px;
        right: 5px;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .modal-title {
        font-size: 0.9rem;
        padding: 25px 10px 10px;
    }
    
    /* Footer compacto */
    .footer {
        padding: 30px 0;
    }
    
    .footer p {
        font-size: 0.9rem;
    }
}

/* Móviles extra pequeños (menos de 360px) */
@media (max-width: 359px) {
    .hero-info h1 {
        font-size: 1.8rem;
    }
    
    .hero-info h2 {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .profile-container {
        width: 200px;
        height: 280px;
    }
    
    .btn-primary,
    .btn-secondary-outline,
    .dropdown-btn {
        max-width: 220px;
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .game-info h2 {
        font-size: 1.5rem;
    }
    
    .game-image img {
        height: 180px;
    }
    
    .tech-grid,
    .certificates-grid {
        gap: 8px;
    }
    
    .tech-item {
        padding: 8px 4px;
    }
    
    .tech-item img {
        width: 22px;
        height: 22px;
    }
    
    .tech-item span {
        font-size: 0.65rem;
    }
}

/* Optimizaciones adicionales para touch devices */
@media (hover: none) and (pointer: coarse) {
    /* Eliminar hover effects en dispositivos táctiles */
    .tech-item:hover,
    .certificate-item:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-secondary-outline:hover,
    .nav-menu a:hover {
        transform: none;
    }
    
    /* Hacer los elementos más fáciles de tocar */
    .tech-item,
    .certificate-item {
        min-height: 60px;
    }
    
    .btn-primary,
    .btn-secondary-outline,
    .dropdown-btn {
        min-height: 48px;
    }
    
    .nav-menu a {
        min-height: 44px;
    }
    
    /* Eliminar efectos 3D en móviles para mejor performance */
    .game-image img {
        transform: none !important;
        transition: none;
    }
    
    .profile-photo:hover {
        transform: scale(1.08) !important;
    }
}

/* Landscape mode en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: center;
    }
    
    .profile-container {
        width: 200px;
        height: 300px;
    }
    
    .hero-info h1 {
        font-size: 2rem;
    }
    
    .tech-grid,
    .certificates-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    
    .game-section {
        padding: 60px 0;
    }
    
    .game-section:first-of-type {
        padding-top: 100px;
    }
    
    .game-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .game-image img {
        height: 200px;
    }
}

/* Mejoras de accesibilidad y usabilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .code-line,
    .floating-element,
    .loading-bar {
        animation: none !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tech-item img,
    .certificate-item img,
    .profile-photo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support (si el usuario tiene dark mode activado) */
@media (prefers-color-scheme: dark) {
    /* El sitio ya está en dark mode por defecto, pero podemos ajustar algunos colores */
    .modal-content {
        background: #1a1a1a;
    }
    
    .dropdown-menu {
        background: rgba(26, 26, 26, 0.98);
    }
}