@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

* { 
    font-family: 'Inter', sans-serif; 
}

h1, h2, h3, h4, h5, h6, .font-mono { 
    font-family: 'JetBrains Mono', monospace; 
}

body {
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    --bg-primary: rgb(9, 9, 11);
    --bg-card: rgb(24, 24, 27);
    --text-primary: rgb(244, 244, 245);
    --text-secondary: rgb(161, 161, 170);
    --text-tertiary: rgb(113, 113, 122);
    --border-color: rgba(63, 63, 70, 0.5);
    --accent-color: rgb(234, 179, 8);
    --workspace-overlay: rgba(24, 24, 27, 0.9);
    --brace-color: rgb(244, 244, 245);
    --brace-opacity: 0.03;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.light-mode {
    --bg-primary: rgb(250, 250, 250);
    --bg-card: rgb(255, 255, 255);
    --text-primary: rgb(24, 24, 27);
    --text-secondary: rgb(82, 82, 91);
    --text-tertiary: rgb(113, 113, 122);
    --border-color: rgba(228, 228, 231, 0.8);
    --workspace-overlay: rgba(255, 255, 255, 0.9);
    --brace-color: rgb(24, 24, 27);
    --brace-opacity: 0.08;
}

/* LLAVES MEJORADAS - SIEMPRE VISIBLES Y CON MEJOR COLOR EN MODO CLARO */
.brace-decoration {
    position: fixed;
    font-size: 80vh;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 100;
    color: var(--brace-color);
    opacity: var(--brace-opacity);
    pointer-events: none;
    z-index: 0;
    line-height: 0.8;
    user-select: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.brace-left { 
    left: -5vw; 
    top: 50%; 
    transform: translateY(-50%);
}

.brace-right { 
    right: -5vw; 
    top: 50%; 
    transform: translateY(-50%);
}

#cursor-glow {
    position: fixed;
    pointer-events: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.3;
    transition: opacity 300ms;
}

.grid-pattern {
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
}

.card {
    transition: all 0.3s ease;
    background: linear-gradient(to bottom right, var(--bg-card), rgba(24, 24, 27, 0.5));
    border: 1px solid var(--border-color);
}

body.light-mode .card {
    background: linear-gradient(to bottom right, var(--bg-card), rgba(255, 255, 255, 0.5));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

.card:hover .card-glow { 
    opacity: 1; 
}

.card-glow { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    transition: opacity 500ms; 
}

.controls {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.control-btn:hover { 
    transform: scale(1.05); 
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.control-btn:active { 
    transform: scale(0.95); 
}

.workspace-overlay {
    background: linear-gradient(to top, var(--workspace-overlay) 0%, transparent 100%);
}

.skill-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.social-link {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

@keyframes progress { 
    from { width: 0%; } 
}

.progress-bar { 
    animation: progress 1.5s ease-out forwards;
    background: linear-gradient(to right, rgb(234, 179, 8), rgb(245, 158, 11));
}

.progress-bg {
    background: var(--border-color);
}

@keyframes pulse { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.5; } 
}

.pulse { 
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 
}

@keyframes fadeInUp { 
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.animate-fadeInUp { 
    animation: fadeInUp 0.6s ease-out forwards; 
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }
.card:nth-child(9) { animation-delay: 0.9s; }
.card:nth-child(10) { animation-delay: 1.0s; }
.card:nth-child(11) { animation-delay: 1.1s; }
.card:nth-child(12) { animation-delay: 1.2s; }

@keyframes marquee { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

.marquee { 
    animation: marquee 20s linear infinite; 
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mobile-min-height { 
        min-height: 200px; 
    }
    
    /* Llaves en móvil - más pequeñas pero visibles */
    .brace-decoration { 
        font-size: 50vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.1;
    }
    
    .brace-left { left: -8vw; }
    .brace-right { right: -8vw; }
    
    .controls {
        top: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .control-btn svg {
        width: 1rem;
        height: 1rem;
    }
    
    .control-btn span {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    /* Llaves en móvil pequeño */
    .brace-decoration { 
        font-size: 40vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.12;
    }
    
    .brace-left { left: -12vw; }
    .brace-right { right: -12vw; }
    
    .controls {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.4rem;
    }
    
    .control-btn {
        width: 2rem;
        height: 2rem;
        border-radius: 0.5rem;
    }
    
    .control-btn svg {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .control-btn span {
        font-size: 0.65rem;
    }
}

/* Desktop - llaves grandes y visibles */
@media (min-width: 769px) {
    .brace-decoration {
        font-size: 90vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.09;
    }
    
    .brace-left { left: -3vw; }
    .brace-right { right: -3vw; }
}

/* Desktop grande - llaves aún más grandes */
@media (min-width: 1440px) {
    .brace-decoration {
        font-size: 100vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.08;
    }
    
    .brace-left { left: -2vw; }
    .brace-right { right: -2vw; }
}

/* Ultra wide */
@media (min-width: 1920px) {
    .brace-decoration {
        font-size: 110vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.07;
    }
    
    .brace-left { left: 0vw; }
    .brace-right { right: 0vw; }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .brace-decoration {
        font-size: 70vh;
    }
    
    body.light-mode .brace-decoration {
        --brace-opacity: 0.1;
    }
    
    .controls {
        top: 1.25rem;
        right: 1.25rem;
    }
    
    .control-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
}