/* ============================================
   VARIABLES — TEMA OSCURO (default)
   ============================================ */
:root {
    --bg:           #0b0f1a;
    --bg-alt:       #0f172a;
    --card-bg:      #1a2235;
    --card-border:  rgba(255,255,255,0.06);
    --primary:      #38bdf8;
    --primary-dim:  rgba(56,189,248,0.12);
    --secondary:    #818cf8;
    --secondary-dim:rgba(129,140,248,0.12);
    --accent:       #34d399;
    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --text-faint:   #475569;
    --nav-bg:       rgba(11,15,26,0.85);
    --shadow:       0 20px 40px rgba(0,0,0,0.4);
    --glow-p:       0 0 30px rgba(56,189,248,0.25);
    --glow-s:       0 0 30px rgba(129,140,248,0.25);
    --transition:   all 0.4s cubic-bezier(0.4,0,0.2,1);
    --font-head:    'Outfit', sans-serif;
    --font-body:    'Inter', sans-serif;
    --radius:       16px;
    --radius-sm:    8px;
    --radius-xl:    24px;
}

/* ============================================
   TEMA CLARO
   ============================================ */
[data-theme="light"] {
    --bg:           #f8fafc;
    --bg-alt:       #f1f5f9;
    --card-bg:      #ffffff;
    --card-border:  rgba(0,0,0,0.07);
    --text:         #0f172a;
    --text-muted:   #475569;
    --text-faint:   #94a3b8;
    --nav-bg:       rgba(248,250,252,0.88);
    --shadow:       0 20px 40px rgba(0,0,0,0.08);
    --glow-p:       0 0 30px rgba(56,189,248,0.15);
    --card-border:  rgba(56,189,248,0.1);
}

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ============================================
   CANVAS PARTÍCULAS
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ============================================
   CURSOR PERSONALIZADO
   ============================================ */
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%,-50%);
    transition: transform 0.1s;
}
.cursor-outline {
    width: 36px; height: 36px;
    border: 2px solid rgba(56,189,248,0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%,-50%);
    transition: transform 0.12s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
}
.cursor-outline.hovered {
    width: 56px; height: 56px;
    border-color: var(--primary);
    background: rgba(56,189,248,0.05);
}
@media (hover: none) { .cursor-dot, .cursor-outline { display: none; } }

/* ============================================
   LAYOUT HELPERS
   ============================================ */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section { padding: 6rem 0; position: relative; z-index: 1; }

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.section-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-head);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(56,189,248,0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(56,189,248,0.4);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary-dim);
    transform: translateY(-2px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition);
}
.navbar.scrolled {
    padding: 0.7rem 0;
    box-shadow: var(--shadow);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
}
.logo-dot { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-link {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-dim);
}
.nav-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    padding: 0.5rem 1.2rem;
}
.nav-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.nav-btn-secondary {
    border: 1px solid var(--secondary);
    color: var(--secondary) !important;
}
.nav-btn-secondary:hover { background: var(--secondary-dim); }

.nav-actions { display: flex; align-items: center; gap: 0.8rem; }

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }

.menu-toggle {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
}
.menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}
.hero-content {
    padding: 4rem 0 4rem 0;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}
.greeting {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.hero-name {
    font-family: var(--font-head);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1rem;
    color: var(--text);
}
.hero-role {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.role-prefix { color: var(--primary); font-weight: 700; }
.typing-text { color: var(--secondary); font-weight: 600; }
.typing-cursor {
    color: var(--primary);
    animation: blink 0.7s infinite;
    font-weight: 300;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-description {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-metrics {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.8rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    width: fit-content;
}
.hero-metric { text-align: center; }
.metric-num {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}
.metric-suffix { font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.metric-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.metric-divider { width: 1px; height: 40px; background: var(--card-border); }

/* Hero Visual / Orbit */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    z-index: 2;
}
.hero-glow-1, .hero-glow-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.hero-glow-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(56,189,248,0.2) 0%, transparent 70%);
    animation: floatGlow 8s ease-in-out infinite alternate;
}
.hero-glow-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(129,140,248,0.15) 0%, transparent 70%);
    animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}
@keyframes floatGlow {
    0% { transform: translate(0,0); }
    100% { transform: translate(30px,-40px); }
}
.hero-orbit {
    position: relative;
    width: 320px; height: 320px;
}
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.ring-1 { width: 180px; height: 180px; animation: orbit 8s linear infinite; }
.ring-2 { width: 260px; height: 260px; animation: orbit 12s linear infinite reverse; }
.ring-3 { width: 320px; height: 320px; animation: orbit 16s linear infinite; }
.orbit-icon {
    width: 36px; height: 36px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: -18px;
    animation: counterOrbit1 8s linear infinite;
}
.ring-2 .orbit-icon { animation: counterOrbit2 12s linear infinite reverse; }
.ring-3 .orbit-icon { animation: counterOrbit3 16s linear infinite; }
@keyframes orbit { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes counterOrbit1 { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes counterOrbit2 { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes counterOrbit3 { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

.orbit-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: var(--glow-p);
    animation: pulseCenter 3s ease-in-out infinite;
}
@keyframes pulseCenter {
    0%,100% { box-shadow: var(--glow-p); }
    50% { box-shadow: 0 0 50px rgba(56,189,248,0.5); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-faint);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    z-index: 2;
}
.scroll-mouse {
    width: 24px; height: 38px;
    border: 2px solid var(--text-faint);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.scroll-wheel {
    width: 4px; height: 8px;
    background: var(--primary);
    border-radius: 2px;
    animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ============================================
   MÉTRICAS BAR
   ============================================ */
.metrics-bar {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 2rem;
}
.metric-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}
.metric-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--glow-p);
}
.metric-icon {
    width: 52px; height: 52px;
    background: var(--primary-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
}
.metric-info { display: flex; flex-direction: column; }
.metric-info > span:first-child { display: inline; }
.counter {
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--primary);
}
.metric-info > span { font-size: 1rem; font-weight: 600; color: var(--text); }
.metric-info p { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.1rem; }

/* ============================================
   SOBRE MÍ
   ============================================ */
.about { background: var(--bg); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.about-text h3 {
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.25;
    color: var(--text);
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 1rem;
}
.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.5rem;
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.about-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}
.stat-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
}
.stat-header i { font-size: 1.5rem; color: var(--primary); }
.stat-header h4 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text); }
.achievements-list { display: flex; flex-direction: column; gap: 1rem; }
.achievements-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}
.achievements-list li i { color: var(--accent); font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ============================================
   STACK TECNOLÓGICO
   ============================================ */
.stack { background: var(--bg-alt); }
.stack-categories {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.stack-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: var(--transition);
}
.stack-category:hover { border-color: rgba(56,189,248,0.2); }
.category-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}
.category-title i { color: var(--primary); font-size: 1.2rem; }

.stack-items { display: flex; flex-direction: column; gap: 1.4rem; }
.stack-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}
.stack-item-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
}
.stack-logo {
    width: 22px; height: 22px;
    object-fit: contain;
    filter: none;
}
[data-theme="dark"] .stack-logo { filter: brightness(0.9); }
.stack-logo-icon {
    font-size: 1.3rem;
    color: var(--primary);
    width: 22px;
    text-align: center;
}
.stack-level {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: var(--primary-dim);
    color: var(--primary);
}

.progress-bar {
    height: 6px;
    background: var(--bg-alt);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 3px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.tools-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}
.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.tool-badge:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.tool-badge i { color: var(--primary); }

/* ============================================
   EXPERIENCIA TIMELINE
   ============================================ */
.experience { background: var(--bg); }
.timeline {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.timeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1.5rem;
    position: relative;
}
.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.4rem;
}
.timeline-dot {
    width: 16px; height: 16px;
    background: var(--bg);
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(56,189,248,0.4);
    flex-shrink: 0;
    z-index: 1;
}
.timeline-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    margin: 6px 0;
    border-radius: 1px;
    min-height: 40px;
}
.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}
.timeline-content:hover {
    border-color: rgba(56,189,248,0.3);
    transform: translateX(6px);
    box-shadow: var(--glow-p);
}
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.timeline-content h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.timeline-content h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}
.timeline-content p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.timeline-badge {
    padding: 0.25rem 0.7rem;
    background: var(--secondary-dim);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.timeline-tags span {
    padding: 0.2rem 0.7rem;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   PROYECTOS
   ============================================ */
.projects { background: var(--bg-alt); }

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.filter-btn {
    padding: 0.5rem 1.3rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px,1fr));
    gap: 1.8rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56,189,248,0.3);
    box-shadow: var(--shadow);
}
.project-card-glow {
    position: absolute;
    top: -60px; right: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(56,189,248,0.08) 0%, transparent 70%);
    pointer-events: none;
    transition: var(--transition);
}
.project-card:hover .project-card-glow { transform: scale(1.5); }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.project-icon {
    width: 48px; height: 48px;
    background: var(--primary-dim);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
}
.project-type-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    background: var(--secondary-dim);
    color: var(--secondary);
}
.project-title {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.project-title a { color: var(--text-muted); font-size: 1.3rem; transition: var(--transition); }
.project-title a:hover { color: var(--primary); }
.project-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}
.project-tags span {
    padding: 0.2rem 0.7rem;
    background: var(--primary-dim);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(56,189,248,0.15);
}
.project-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 1rem;
}
.project-lang { display: flex; align-items: center; gap: 0.3rem; }
.lang-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* Skeleton Loaders */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--bg-alt) 50%, var(--card-bg) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton-title { height: 24px; width: 70%; }
.skeleton-text { height: 14px; }
.skeleton-text.short { width: 55%; }
.skeleton-tags { height: 28px; width: 80%; border-radius: 50px; }

/* GitHub section */
.github-section {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--card-border);
}
.github-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.github-section-header h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.github-section-header p { color: var(--text-muted); font-size: 0.92rem; }
.github-link-container { text-align: center; margin-top: 2.5rem; }

/* Card hidden (filter) */
.project-card.hidden-filter {
    display: none;
}

/* ============================================
   CONTACTO
   ============================================ */
.contact { background: var(--bg); }

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}
.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    transition: var(--transition);
}
.contact-card:hover {
    border-color: rgba(56,189,248,0.3);
    transform: translateY(-6px);
    box-shadow: var(--glow-p);
}
.contact-card-wa:hover { border-color: rgba(37,211,102,0.35); box-shadow: 0 0 30px rgba(37,211,102,0.15); }

.contact-card-icon {
    width: 60px; height: 60px;
    background: var(--primary-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.wa-icon { background: rgba(37,211,102,0.12); color: #25d366; }

.info-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-card-value { font-size: 0.95rem; color: var(--text); font-weight: 500; }

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #25d366;
    font-weight: 600;
    transition: opacity 0.2s;
}
.whatsapp-link:hover { opacity: 0.8; }
.whatsapp-link i { font-size: 0.8rem; }

.contact-social-center {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.social-btn {
    width: 48px; height: 48px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.social-btn:hover {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    padding: 3rem 0 1.5rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.4rem; }
.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-social {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}
.footer-social a {
    width: 38px; height: 38px;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-bottom { text-align: center; color: var(--text-faint); font-size: 0.82rem; }

/* ============================================
   ANIMACIONES SCROLL REVEAL
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.revealed { opacity: 1 !important; transform: none !important; }

.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .stack-categories { grid-template-columns: 1fr 1fr; }
    .metrics-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
    }
    .hero-visual { display: none; }
    .hero-metrics { margin: 0 auto; }
    .hero-btns { justify-content: center; }
    .hero-description { margin: 0 auto 2.5rem; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .contact-cards { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
    .contact-social { justify-content: flex-start; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--card-border);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 0.3rem;
    }
    .nav-links.open { display: flex; }
    .nav-link { padding: 0.7rem 1rem; }
    .menu-toggle { display: flex; }
    .stack-categories { grid-template-columns: 1fr; }
    .contact-cards { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .section { padding: 4rem 0; }
    .hero-orbit { width: 220px; height: 220px; }
    .ring-1 { width: 120px; height: 120px; }
    .ring-2 { width: 170px; height: 170px; }
    .ring-3 { width: 220px; height: 220px; }
}

@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr; }
    .hero-metrics { flex-direction: column; gap: 1rem; width: 100%; }
    .metric-divider { width: 60px; height: 1px; }
    .container { padding: 0 1.2rem; }
}
