/* ============================================
   JOSÉ JULIÁN GUZMÁN GIL - Personal Site
   Estética: Tech Executive Premium
   ============================================ */

:root {
    /* Paleta principal - Tech Amber */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a26;
    
    --accent-primary: #f59e0b;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #8b5cf6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-subtle: rgba(248, 250, 252, 0.08);
    
    /* Espaciado */
    --section-padding: clamp(4rem, 10vw, 8rem);
    --container-max: 1200px;
    
    /* Transiciones */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== NAVEGACIÓN ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.4s var(--ease-out-expo), background 0.3s;
}

.nav.scrolled-up {
    transform: translateY(0);
}

.nav.scrolled-down {
    transform: translateY(-100%);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 0.35rem 0.6rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
}

.nav-name {
    font-weight: 600;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 0% 80%, rgba(6, 182, 212, 0.08), transparent);
    animation: gradientShift 15s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.05); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(248, 250, 252, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 250, 252, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat 15s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    25% { transform: translate(20px, -30px); opacity: 0.6; }
    50% { transform: translate(-15px, 20px); opacity: 0.4; }
    75% { transform: translate(30px, 10px); opacity: 0.5; }
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-greeting {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent-secondary);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-name {
    display: block;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-name-alt {
    display: block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    min-height: 2rem;
    margin-bottom: 1.5rem;
}

.typing-text {
    display: inline-block;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-stats strong {
    color: var(--accent-primary);
}

.separator {
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #d97706);
    color: var(--bg-primary);
    border: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 8px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* ========== ANIMACIONES ENTRADA ========== */
.animate-fade-in {
    animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.animate-fade-in-delay {
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay-2 {
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-delay-3 {
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.6s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== SECCIONES ========== */
.section {
    padding: var(--section-padding) 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

/* ========== ABOUT ========== */
.about {
    background: var(--bg-secondary);
}

.about-text {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--accent-primary);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.highlight-card {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: all 0.4s var(--ease-out-expo);
}

.highlight-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.highlight-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========== TIMELINE EXPERIENCIA ========== */
.experience {
    position: relative;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
    opacity: 0;
    transform: translateX(-20px);
}

.timeline-item.visible {
    animation: slideInRight 0.6s var(--ease-out-expo) forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s var(--ease-out-expo);
}

.timeline-content:hover {
    border-color: rgba(245, 158, 11, 0.2);
    transform: translateX(8px);
}

.timeline-period {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== SKILLS ========== */
.skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    gap: 2rem;
}

.skill-category h4 {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-out-expo);
}

.skill-tag:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.05);
}

/* ========== CERTIFICACIONES ========== */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    text-align: center;
    transition: all 0.4s var(--ease-out-expo);
    opacity: 0;
}

.cert-card.visible {
    animation: scaleIn 0.5s var(--ease-spring) forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cert-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.15);
}

.cert-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cert-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== EDUCACIÓN ========== */
.education {
    background: var(--bg-secondary);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.education-card {
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s var(--ease-out-expo);
}

.education-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-5px);
}

.education-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========== CONTACTO ========== */
.contact {
    position: relative;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-out-expo);
}

.contact-link:hover {
    transform: translateY(-3px);
}

.contact-link.linkedin {
    border-color: #0a66c2;
}

.contact-link.linkedin:hover {
    background: rgba(10, 102, 194, 0.2);
    box-shadow: 0 0 30px rgba(10, 102, 194, 0.2);
}

.contact-link.github:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.contact-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ========== FOOTER ========== */
.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 12px;
        height: 12px;
    }
    
    .timeline-line {
        left: 5px;
    }
}

/* ========== REVEAL ON SCROLL ========== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
