/* ============================================
   PORTFOLIO - JULIO RICHARD YARLEQUE MORE
   Tema Claro - Azul & Blanco
   ============================================ */

/* ====== VARIABLES CSS ====== */
:root {
    --primary: #1a73e8;
    --primary-light: #4a9eff;
    --primary-dark: #0d47a1;
    --primary-glow: rgba(26, 115, 232, 0.3);
    --primary-bg: rgba(26, 115, 232, 0.05);
    --secondary: #00bcd4;
    --accent: #ff6b35;

    --bg: #ffffff;
    --bg-alt: #f5f8fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f6ff;

    --text: #1a1a2e;
    --text-light: #555770;
    --text-muted: #8b8da3;

    --border: #e2e8f0;
    --border-light: #f0f0f5;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 10px 40px rgba(26, 115, 232, 0.2);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ====== RESET & BASE ====== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: default;
    line-height: 1.7;
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.highlight {
    color: var(--primary);
    font-weight: 600;
}

/* ====== CURSOR PERSONALIZADO ====== */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s;
    mix-blend-mode: normal;
}

.cursor-outline {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.15s ease-out;
    opacity: 0.5;
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    border-color: var(--primary);
    opacity: 0.3;
    background: var(--primary-bg);
}

/* ====== LOADING SCREEN ====== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s, visibility 0.6s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -2px;
    margin-bottom: 30px;
    animation: pulse-loader 1.5s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s;
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@keyframes pulse-loader {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ====== PARTICLES CANVAS ====== */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ====== NAVBAR ====== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    z-index: -1;
    transition: var(--transition);
}

.navbar.scrolled::before {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    padding: 10px 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-bracket {
    color: var(--secondary);
    font-weight: 400;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

/* En desktop ocultamos los iconos del sidebar */
.nav-link i {
    display: none;
}

/* En desktop ocultamos los elementos exclusivos del sidebar móvil */
.sidebar-profile,
.sidebar-footer,
.sidebar-overlay {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-download-nav {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ====== HERO SECTION ====== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.wave {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
    font-size: 1.4rem;
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hero-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-family: var(--font-mono);
}

.hero-title-prefix {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.hero-typewriter {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 200px;
}

.cursor-blink {
    color: var(--primary);
    font-size: 1.1rem;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 520px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(26, 115, 232, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hero-social {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
}

.social-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--text);
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.social-link:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-primary);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
}

.hero-image-border {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-image-ring {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 2px dashed var(--primary-light);
    animation: spin-slow 12s linear infinite reverse;
    opacity: 0.4;
}

.hero-image-ring.ring-2 {
    inset: -35px;
    animation-duration: 18s;
    opacity: 0.2;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 6px solid var(--bg);
}

.hero-image-dots {
    position: absolute;
    inset: -50px;
    background-image: radial-gradient(var(--primary-light) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.15;
    border-radius: 50%;
    z-index: 1;
}

/* Floating Cards */
.hero-floating-card {
    position: absolute;
    background: var(--bg-card);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    z-index: 3;
    animation: float 3s ease-in-out infinite;
    border: 1px solid var(--border-light);
}

.hero-floating-card i {
    font-size: 1.1rem;
}

.card-1 {
    top: 30px;
    right: -20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 60px;
    right: -30px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20px;
    left: -20px;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: bounce-scroll 2s infinite;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        top: 6px;
    }

    100% {
        opacity: 0;
        top: 22px;
    }
}

@keyframes bounce-scroll {

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

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

/* ====== SECTIONS COMMON ====== */
.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section:nth-child(even) {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(26, 115, 232, 0.15);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    margin: 0 auto;
}

/* ====== ABOUT SECTION ====== */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-intro {
    font-size: 1.15rem;
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 1rem;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
    border: 1px solid transparent;
}

.info-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--primary);
    transform: translateX(5px);
}

.info-item i {
    color: var(--primary);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Stats Cards */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.counter {
    display: inline-block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-icon {
    font-size: 1.2rem;
    color: var(--primary-light);
    opacity: 0.5;
}

/* ====== SKILLS SECTION ====== */
.skills-group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skills-group-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.skills-group-card:hover {
    box-shadow: var(--shadow-md);
}

.skills-group-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
}

.skills-subgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skills-subgrid.grid-3-cols {
    grid-template-columns: repeat(3, 1fr);
}

.skill-item-card {
    background: var(--bg-alt);
    padding: 16px 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skill-item-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.skill-item-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.skill-item-icon i {
    font-size: 2.2rem;
}

.skill-item-icon svg {
    width: 2.2rem;
    height: 2.2rem;
}

.skill-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.skill-item-level {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Herramientas tags */
.skills-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag-pill {
    background: var(--bg-alt);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skill-tag-pill:hover {
    border-color: var(--primary-light);
    background: var(--bg-card);
    color: var(--primary);
    transform: translateY(-2px);
}

.skill-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff4b4b;
}

/* ====== EXPERIENCE / TIMELINE ====== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary), transparent);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    box-shadow: var(--shadow-primary);
    z-index: 2;
}

.timeline-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(5px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-company {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.timeline-duration {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-tasks {
    list-style: none;
    margin-bottom: 20px;
}

.timeline-tasks li {
    padding: 8px 0;
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.timeline-tasks li i {
    color: var(--primary);
    margin-top: 4px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.timeline-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 14px;
    background: var(--bg-alt);
    color: var(--text-light);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

/* ====== PROJECTS SECTION ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-light);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.project-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.03), rgba(0, 188, 212, 0.03));
    pointer-events: none;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.project-icon-bg {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.project-info {
    padding: 28px;
}

.project-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.project-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.project-stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.project-stack span {
    padding: 4px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(26, 115, 232, 0.15);
}

.project-role {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-role i {
    color: var(--primary);
}

/* ====== EDUCATION SECTION ====== */
.education-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 30px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    max-width: 800px;
    margin: 0 auto;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.education-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.15);
}

.education-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.education-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.education-school {
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
}

.education-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.education-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.education-status {
    padding: 4px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.education-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.education-progress-bar {
    flex: 1;
    max-width: 300px;
    height: 8px;
    background: var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.education-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 8px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Certifications */
.certifications {
    max-width: 800px;
    margin: 40px auto 0;
}

.certifications h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.certifications h3 i {
    color: var(--accent);
}

.cert-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cert-tag {
    padding: 10px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.cert-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ====== CONTACT SECTION ====== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.contact-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: var(--primary-bg);
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.contact-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.contact-card-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.btn-cv {
    width: fit-content;
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 2px solid var(--border);
    background: transparent;
    font-size: 0.95rem;
    font-family: var(--font-main);
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

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

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.form-group input:focus~.form-line,
.form-group textarea:focus~.form-line {
    width: 100%;
}

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

.btn-submit {
    width: 100%;
    justify-content: center;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* Form Success State */
.contact-form.success .btn-submit {
    background: #22c55e;
    pointer-events: none;
}

.contact-form.success .btn-submit span {
    display: none;
}

.contact-form.success .btn-submit i::before {
    content: "\f00c";
}

/* ====== FOOTER ====== */
.footer {
    background: var(--text);
    color: white;
    padding: 60px 0 30px;
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* ====== BACK TO TOP ====== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ====== REVEAL ANIMATIONS ====== */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: var(--transition-slow);
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-scale {
    transform: scale(0.9);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .hero-content {
        gap: 40px;
    }

    .hero-image-wrapper {
        width: 280px;
        height: 280px;
    }

    .about-content {
        gap: 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {

    /* Hide custom cursor on mobile */
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* ====== SIDEBAR MEJORADO ====== */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 998;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: min(300px, 85vw);
        height: 100% !important;
        height: 100dvh !important;
        background: var(--bg);
        flex-direction: column;
        padding: 0;
        box-shadow: -10px 0 60px rgba(26, 115, 232, 0.12), -4px 0 20px rgba(0, 0, 0, 0.1);
        border-left: 1px solid var(--border-light);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        gap: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        display: flex;
    }

    .nav-links.open {
        right: 0;
    }

    /* Perfil en la cabecera del sidebar */
    .sidebar-profile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 28px 24px 24px;
        background: linear-gradient(145deg, var(--primary-dark), var(--primary), var(--secondary));
        background-size: 200% 200%;
        animation: sidebar-gradient 6s ease infinite;
        color: white;
        margin-bottom: 0;
        position: relative;
        flex-shrink: 0;
        overflow: hidden;
    }

    .sidebar-profile::before {
        content: '';
        position: absolute;
        inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

    @keyframes sidebar-gradient {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    .sidebar-avatar {
        width: 76px;
        height: 76px;
        border-radius: 50%;
        object-fit: cover;
        object-position: center top;
        border: 3px solid rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18), 0 6px 20px rgba(0, 0, 0, 0.25);
        position: relative;
        z-index: 1;
        flex-shrink: 0;
    }

    .sidebar-name {
        font-size: 1.15rem;
        font-weight: 700;
        margin-top: 10px;
        position: relative;
        z-index: 1;
        letter-spacing: -0.3px;
    }

    .sidebar-role {
        font-size: 0.78rem;
        opacity: 0.88;
        font-family: var(--font-mono);
        position: relative;
        z-index: 1;
    }

    /* Badge disponibilidad */
    .sidebar-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 10px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 20px;
        padding: 5px 14px;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        backdrop-filter: blur(8px);
        position: relative;
        z-index: 1;
        color: rgba(255, 255, 255, 0.95);
    }

    .sidebar-badge i {
        font-size: 0.5rem;
        color: #4ade80;
        animation: pulse-dot 2s ease-in-out infinite;
        background: none;
        width: auto;
        height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    @keyframes pulse-dot {

        0%,
        100% {
            opacity: 1;
            transform: scale(1);
        }

        50% {
            opacity: 0.6;
            transform: scale(1.4);
        }
    }

    /* Separador entre cabecera y menú */
    .sidebar-profile+li::before {
        content: 'MENÚ';
        display: block;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 1.5px;
        color: var(--text-muted);
        padding: 18px 24px 6px;
    }

    /* Items del menú con icono */
    .nav-link {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 0.95rem;
        font-weight: 500;
        padding: 13px 24px;
        border-radius: 0;
        position: relative;
        margin: 1px 8px;
        border-radius: var(--radius-sm);
        color: var(--text-light);
        transition: all 0.25s ease;
    }

    .nav-link i {
        display: inline-flex;
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
        justify-content: center;
        align-items: center;
        background: var(--bg-alt);
        border-radius: 10px;
        flex-shrink: 0;
        transition: all 0.25s ease;
        color: var(--text-muted);
    }

    /* Línea indicadora lateral */
    .nav-link::before {
        content: '';
        position: absolute;
        left: -8px;
        top: 50%;
        transform: translateY(-50%) scaleY(0);
        width: 4px;
        height: 60%;
        background: var(--primary);
        border-radius: 0 3px 3px 0;
        transition: transform 0.25s ease;
    }

    .nav-link:hover {
        background: var(--primary-bg);
        color: var(--primary);
        padding-left: 28px;
    }

    .nav-link:hover i {
        background: rgba(26, 115, 232, 0.12);
        color: var(--primary);
    }

    .nav-link.active {
        background: linear-gradient(90deg, rgba(26, 115, 232, 0.12), rgba(26, 115, 232, 0.04));
        color: var(--primary);
        font-weight: 600;
    }

    .nav-link.active i {
        background: var(--primary);
        color: white;
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
    }

    .nav-link.active::before,
    .nav-link:hover::before {
        transform: translateY(-50%) scaleY(1);
    }

    .nav-link.active::after {
        display: none;
    }

    /* Footer del sidebar */
    .sidebar-footer {
        position: sticky;
        bottom: 0;
        padding: 14px 16px;
        border-top: 1px solid var(--border-light);
        display: flex;
        flex-direction: column;
        gap: 10px;
        background: var(--bg-alt);
        flex-shrink: 0;
        z-index: 5;
    }

    .sidebar-download {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 13px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border-radius: var(--radius-sm);
        font-weight: 700;
        font-size: 0.9rem;
        transition: var(--transition);
        box-shadow: 0 4px 15px rgba(26, 115, 232, 0.25);
        letter-spacing: 0.2px;
    }

    .sidebar-download:hover {
        background: linear-gradient(135deg, var(--primary-dark), var(--primary));
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(26, 115, 232, 0.35);
    }

    .sidebar-social {
        display: flex;
        justify-content: center;
        gap: 12px;
    }

    .sidebar-social a {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-card);
        color: var(--text-light);
        border-radius: 12px;
        font-size: 1rem;
        transition: var(--transition);
        border: 1px solid var(--border);
    }

    .sidebar-social a:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(26, 115, 232, 0.3);
    }

    /* Animación escalonada de los items */
    .nav-links.open .nav-link,
    .nav-links.open .sidebar-footer {
        animation: slideInRight 0.4s ease both;
    }

    .nav-links.open li:nth-child(2) .nav-link {
        animation-delay: 0.05s;
    }

    .nav-links.open li:nth-child(3) .nav-link {
        animation-delay: 0.10s;
    }

    .nav-links.open li:nth-child(4) .nav-link {
        animation-delay: 0.15s;
    }

    .nav-links.open li:nth-child(5) .nav-link {
        animation-delay: 0.20s;
    }

    .nav-links.open li:nth-child(6) .nav-link {
        animation-delay: 0.25s;
    }

    .nav-links.open li:nth-child(7) .nav-link {
        animation-delay: 0.30s;
    }

    .nav-links.open li:nth-child(8) .nav-link {
        animation-delay: 0.35s;
    }

    .nav-links.open .sidebar-footer {
        animation-delay: 0.40s;
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(30px);
        }

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

    /* Ocultar elementos de perfil/footer en desktop — ya ocultos por defecto arriba */

    .btn-download-nav {
        display: none;
    }

    .hero {
        padding: 100px 24px 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-title-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-image-container {
        order: -1;
    }

    .hero-image-wrapper {
        width: 220px;
        height: 220px;
    }

    .card-1 {
        right: -10px;
        top: 20px;
    }

    .card-2 {
        right: -10px;
        bottom: 40px;
    }

    .card-3 {
        left: -10px;
        bottom: 10px;
    }

    .hero-floating-card {
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-info-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .education-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 28px;
    }

    .education-progress-bar {
        max-width: 100%;
    }

    .section {
        padding: 70px 0;
    }

    .timeline-header {
        flex-direction: column;
    }

    .timeline-meta {
        align-items: flex-start;
    }

    .scroll-indicator {
        display: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px;
    }

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

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-image-wrapper {
        width: 180px;
        height: 180px;
    }

    .hero-floating-card.card-2 {
        display: none;
    }

    .skills-subgrid.grid-3-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}