/* ==========================================================================
   PORTAFOLIO ASCK - PREMIUM STYLE SHEET
   ========================================================================== */

/* 1. Global Reset & Variables */
:root {
    --bg-dark: #08090d;
    --bg-surface: rgba(16, 18, 27, 0.5);
    --bg-card: rgba(22, 24, 33, 0.45);
    --bg-modal: rgba(8, 9, 13, 0.9);
    
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.75);
    --text-muted: rgba(248, 250, 252, 0.45);
    
    --accent-purple: hsl(250, 85%, 66%);
    --accent-purple-glow: rgba(99, 102, 241, 0.15);
    --accent-cyan: hsl(187, 85%, 42%);
    --accent-cyan-glow: rgba(17, 166, 189, 0.12);
    --accent-pink: hsl(330, 80%, 60%);
    --accent-yellow: hsl(40, 80%, 55%);
    
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-focus: rgba(99, 102, 241, 0.4);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Los anclajes no quedan ocultos bajo el header fijo */
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* 2. Floating Ambient Glow Orbs */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}
.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple-glow) 0%, transparent 70%);
    top: -200px;
    left: -150px;
    animation: orb-float 25s infinite alternate ease-in-out;
}
.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: orb-float 20s infinite alternate-reverse ease-in-out;
}
.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 20, 147, 0.12) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orb-float 30s infinite alternate ease-in-out;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.15); }
    100% { transform: translate(-30px, -60px) scale(0.9); }
}

/* 3. Utility Components & Typography */
h1, h2, h3, h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
}

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

.gradient-text {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple) 0%, hsl(245, 80%, 50%) 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--accent-purple-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-block {
    width: 100%;
}
.btn-whatsapp {
    background: rgba(37, 211, 102, 0.08);
    color: #4ade80;
    border: 1px solid rgba(37, 211, 102, 0.35);
    backdrop-filter: blur(8px);
    align-self: flex-start;
    margin-bottom: 40px;
    min-height: 48px;
}
.btn-whatsapp i {
    font-size: 1.25rem;
}
.btn-whatsapp:hover {
    background: rgba(37, 211, 102, 0.16);
    border-color: rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.18);
}

/* 4. Header Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 7, 10, 0.65);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-fast);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}
.logo-dot {
    color: var(--accent-purple);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.45);
}
.nav {
    display: flex;
    gap: 32px;
}
.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 6px 0;
    color: var(--text-secondary);
}
.nav-link:hover {
    color: var(--text-primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    transition: var(--transition-fast);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}
.btn-nav {
    padding: 8px 18px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
}
.btn-nav:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Mobile Nav Modal */
.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(7, 7, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(-120%);
    transition: var(--transition-smooth);
    z-index: 99;
}
.mobile-nav.open {
    transform: translateY(0);
}
.mobile-link {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.btn-nav-mobile {
    width: 100%;
    margin-top: 8px;
}

/* 5. Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 120px;
    display: flex;
    align-items: center;
}
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}
.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-purple);
    letter-spacing: 0.05em;
    margin-bottom: 28px;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.05);
    transition: var(--transition-smooth);
}
.badge-tech:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 12px;
}
.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    min-height: 48px;
}
.cursor {
    color: var(--accent-cyan);
    font-weight: 400;
    animation: blink 0.9s infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}
.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}
.hero-actions {
    display: flex;
    gap: 16px;
}

/* Glassmorphic JSON Code Panel */
.hero-graphic-container {
    position: relative;
}
.hero-card-glass {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: var(--transition-smooth);
    z-index: 2;
    position: relative;
}
.hero-card-glass:hover {
    transform: translateY(-5px);
    border-color: rgba(17, 166, 189, 0.25);
    box-shadow: 0 25px 55px rgba(17, 166, 189, 0.08);
}
.hero-card-header {
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-glass);
}
.hero-card-header span[class^="dot-"] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }
.card-filename {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-left: 8px;
}
.card-code {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow-x: auto;
}
.card-code code {
    white-space: pre-wrap;
}
.card-code .key { color: var(--accent-cyan); }
.card-code .string { color: var(--accent-yellow); }
.glowing-orb {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    bottom: -20px;
    left: -20px;
    z-index: 1;
    opacity: 0.4;
    filter: blur(10px);
}

/* 6. Stats Section */
.stats {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stat-card {
    padding: 20px;
}
.stat-number {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* 7. Projects Section */
.projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px;
}
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px;
}
.section-title {
    font-size: 2.6rem;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}
.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.filter-btn.active {
    background: var(--accent-purple);
    color: var(--text-primary);
    border-color: var(--accent-purple);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Grid of Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    cursor: pointer;
}
.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.1);
}
.project-image-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3);
}
.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Las capturas son apps con header arriba: anclar al borde superior */
    object-position: top center;
    transition: var(--transition-smooth);
    z-index: 1;
}
.project-card:hover .project-img {
    transform: scale(1.05);
}

/* Fallback Gradients for Images */
.fallback-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.gradient-learning {
    background: linear-gradient(135deg, #161030 0%, #291b52 100%);
}
.gradient-finanzas {
    background: linear-gradient(135deg, #062420 0%, #0e443b 100%);
}
.gradient-services {
    background: linear-gradient(135deg, #05192c 0%, #0f395b 100%);
}
.gradient-iot {
    background: linear-gradient(135deg, #26071d 0%, #4a0d39 100%);
}
.gradient-inventario {
    background: linear-gradient(135deg, #241506 0%, #4c2c0b 100%);
}
.gradient-handsups {
    background: linear-gradient(135deg, #0a2118 0%, #154230 100%);
}
.gradient-libremente {
    background: linear-gradient(135deg, #1f122e 0%, #3a2254 100%);
}
.gradient-dentalprinter {
    background: linear-gradient(135deg, #092026 0%, #154552 100%);
}
.gradient-onefeetcool {
    background: linear-gradient(135deg, #26120a 0%, #4d2413 100%);
}
.gradient-crm {
    background: linear-gradient(135deg, #0d1330 0%, #1d2b63 100%);
}

.project-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(7, 7, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    z-index: 1;
}
.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.project-tag {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.project-card-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}
.project-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-skills-used {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}
.project-skills-used span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}
.btn-card-action {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    align-self: flex-start;
    transition: var(--transition-fast);
}
.project-card:hover .btn-card-action {
    color: var(--accent-cyan);
    gap: 10px;
}

/* Project Animation on filter */
.project-card.hide {
    display: none;
}

/* 8. Project Details Modal (Glassmorphic Window Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-modal);
    backdrop-filter: blur(14px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.modal-container {
    background: rgba(18, 18, 26, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    width: 100%;
    max-width: 1100px;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow-y: auto;
    transform: scale(0.9) translateY(40px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-container {
    transform: scale(1) translateY(0);
}
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
}
.modal-close-btn:hover {
    background: var(--accent-pink);
    border-color: var(--accent-pink);
    transform: rotate(90deg);
}

.modal-body-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    padding: 40px;
}

/* Left column of Modal */
.modal-visuals {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0; /* permite encoger dentro del grid */
}
.modal-image-container {
    height: 230px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    position: relative;
}
.modal-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    z-index: 1;
}
.modal-features-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 20px;
}
.modal-features-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}
.modal-features-list {
    list-style: none;
}
.modal-features-list li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.modal-features-list li i {
    color: var(--accent-cyan);
    margin-top: 4px;
}

/* Right column of Modal */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* el código largo no fuerza el ancho del grid */
}
.modal-project-title {
    font-size: 2.2rem;
    line-height: 1.2;
}
.modal-project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.modal-stack-section h4,
.modal-code-section h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.modal-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.modal-badges-container span {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

/* Code Sandbox Mock */
.modal-code-window {
    background: #0d0d12;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.code-window-bar {
    background: #08080b;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.code-window-tabs {
    display: flex;
    gap: 4px;
}
.code-tab {
    background: #0d0d12;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 4px 4px 0 0;
    border: 1px solid rgba(255,255,255,0.05);
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.code-tab i {
    color: var(--accent-yellow);
}
.code-window-actions {
    display: flex;
    gap: 6px;
}
.code-dot-fake {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.5;
}
.code-pre-box {
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: auto; /* las líneas largas hacen scroll interno, no rompen el layout */
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #a9b7c6;
}
.code-pre-box code {
    white-space: pre;
    display: block;
}

/* Code Syntax Coloring */
.code-comment { color: #5f6368; font-style: italic; }
.code-keyword { color: #cc7832; font-weight: bold; }
.code-string { color: #6a8759; }
.code-number { color: #6897bb; }
.code-annotation { color: #bbb529; }
.code-type { color: #9876aa; }

/* 9. Skills Section */
.skills {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.skills-category-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition-smooth);
}
.skills-category-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.skills-cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.cat-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-purple {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-purple);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.icon-cyan {
    background: rgba(17, 166, 189, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(17, 166, 189, 0.2);
}
.icon-pink {
    background: rgba(235, 71, 153, 0.08);
    color: var(--accent-pink);
    border: 1px solid rgba(235, 71, 153, 0.2);
}
.icon-yellow {
    background: rgba(232, 153, 48, 0.08);
    color: var(--accent-yellow);
    border: 1px solid rgba(232, 153, 48, 0.2);
}
.skills-cat-title {
    font-size: 1.3rem;
}
.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.skills-list li {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skill-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}
.skill-pct {
    color: var(--text-primary);
    font-weight: 600;
}
.progress-track {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-purple { background: linear-gradient(90deg, var(--accent-purple), #9400d3); }
.bar-cyan { background: linear-gradient(90deg, var(--accent-cyan), #00ced1); }
.bar-pink { background: linear-gradient(90deg, var(--accent-pink), #c71585); }
.bar-yellow { background: linear-gradient(90deg, var(--accent-yellow), #ff8c00); }

/* 10. Contact Section */
.contact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px;
}
.contact-container {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.contact-info-panel {
    padding: 50px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contact-title {
    font-size: 2.3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}
.contact-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.detail-item {
    display: flex;
    gap: 16px;
    align-items: center;
}
.detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(17, 166, 189, 0.05);
    border: 1px solid rgba(17, 166, 189, 0.15);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.detail-item h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.detail-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.detail-item a:hover {
    color: var(--accent-cyan);
}

.contact-form-panel {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-smooth);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}
.form-group textarea {
    height: 120px;
    resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(17, 166, 189, 0.15);
}

/* Feedback message success styling */
.form-feedback {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(39, 201, 63, 0.06);
    border: 1px solid rgba(39, 201, 63, 0.25);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(39, 201, 63, 0.05);
}
.form-feedback.active {
    display: flex;
}
.feedback-icon {
    font-size: 2rem;
    color: #27c93f;
}
.form-feedback h4 {
    color: #27c93f;
    margin-bottom: 4px;
}
.form-feedback p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Feedback de error profesional (con salida directa a WhatsApp) */
.form-feedback.error {
    background: rgba(244, 63, 94, 0.06);
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.05);
    margin-top: 20px;
}
.form-feedback.error .feedback-icon,
.form-feedback.error h4 {
    color: #fb7185;
}
.form-feedback.error a {
    color: #4ade80;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 11. Footer */
.footer-bottom {
    background: #040406;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 30px 24px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.social-links {
    display: flex;
    gap: 16px;
}
.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.social-links a:hover {
    background: var(--text-primary);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

/* 12. Media Queries (Responsive Layouts) */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-card-glass {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-body-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    .contact-info-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav, .btn-nav {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .stat-number {
        font-size: 2.4rem;
    }
    
    .section-title {
        font-size: 2.1rem;
    }
    
    .contact-info-panel, .contact-form-panel {
        padding: 30px 20px;
    }
    .contact-title {
        font-size: 1.8rem;
    }
}

/* Services Section Styling */
.services {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 50px;
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.08);
}
.service-icon {
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
}
.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 13. Botón flotante de WhatsApp (canal principal de conversión) */
.whatsapp-float {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 95;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
    font-size: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(18, 140, 126, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.4);
    transition: var(--transition-smooth);
    animation: whatsapp-pulse 3s infinite;
}
.whatsapp-float:hover,
.whatsapp-float:focus-visible {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 14px 35px rgba(18, 140, 126, 0.55);
    animation: none;
}
@keyframes whatsapp-pulse {
    0%   { box-shadow: 0 10px 30px rgba(18, 140, 126, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.35); }
    70%  { box-shadow: 0 10px 30px rgba(18, 140, 126, 0.45), 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 10px 30px rgba(18, 140, 126, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* 14. Scroll-reveal sutil (las clases las aplica app.js; sin JS todo es visible) */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* 15. Foco visible en toda superficie interactiva */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

/* 16. Tap targets cómodos (≥44px) */
.filter-btn {
    min-height: 44px;
}
.btn-card-action {
    min-height: 44px;
}
.mobile-link {
    min-height: 44px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 18px;
        right: 18px;
        width: 54px;
        height: 54px;
        font-size: 1.7rem;
    }
    .hero-subtitle {
        min-height: 76px;
    }
}

/* 17. prefers-reduced-motion: sin animaciones ni desplazamientos animados */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .bg-glow,
    .whatsapp-float,
    .cursor {
        animation: none !important;
    }
}

/* ==========================================================================
   PROJECT STATUS CHIPS (estado real y verificable de cada proyecto)
   ========================================================================== */
.project-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    margin: 4px 0 12px;
    align-self: flex-start;
    max-width: 100%;
}
.project-status .status-dot {
    width: 7px;
    height: 7px;
    min-width: 7px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}
.project-status.status-live {
    color: hsl(158, 64%, 58%);
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.07);
}
.project-status.status-demo {
    color: var(--accent-cyan);
    border-color: rgba(17, 166, 189, 0.35);
    background: var(--accent-cyan-glow);
}
.project-status.status-wip {
    color: var(--accent-yellow);
    border-color: rgba(217, 168, 50, 0.35);
    background: rgba(217, 168, 50, 0.08);
}
.modal-details .project-status {
    margin: 10px 0 0;
}
.repo-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
