:root {
    --bg: #0a0a0b;
    --surface: #17171a;
    --surface-2: #1f1f23;
    --border: #2b2b30;
    --border-strong: #3a3a41;
    --text: #f2f2f2;
    --text-dim: #9a9a9f;
    --text-faint: #6a6a6f;
    --accent-ok: #4ade80;

    --radius: 10px;
    --radius-lg: 18px;
    --radius-pill: 100px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: 0.35s var(--ease);

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 30px -8px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.65);
    --glow-border: rgba(242, 242, 242, 0.16);
    --glow-soft: rgba(242, 242, 242, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    overflow-x: hidden;
}

::selection {
    background: var(--text);
    color: var(--bg);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: var(--radius-pill);
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--text-dim);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- SCROLL PROGRESS ---------- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--text-faint), var(--text));
    z-index: 300;
    transition: width 0.12s linear;
}

/* ---------- NAV ---------- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition), box-shadow var(--transition);
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(10, 10, 11, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 1px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.nav-logo:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

#nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px;
}

.nav-link {
    position: relative;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: var(--bg);
    background: var(--text);
}

#nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: border-color var(--transition), background var(--transition);
}

#nav-toggle:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

#nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    display: block;
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

#nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

#nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
}

.hero-glow {
    position: absolute;
    top: 8%;
    left: 50%;
    width: min(900px, 140vw);
    height: 560px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--glow-soft) 0%, rgba(242, 242, 242, 0) 65%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.06);
    }
}

.availability-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12.5px;
    color: var(--text-dim);
    margin-bottom: 32px;
    letter-spacing: 0.2px;
}

.pulse-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-ok);
    flex-shrink: 0;
}

.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid var(--accent-ok);
    animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }

    75%,
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

.hero-photo-wrap {
    position: relative;
    z-index: 1;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.hero-photo-wrap:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-name {
    position: relative;
    z-index: 1;
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.hero-title {
    position: relative;
    z-index: 1;
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.hero-subtitle {
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: var(--text-faint);
    margin-bottom: 40px;
}

.hero-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.02);
    transition: background var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.hero-link:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hero-link-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.hero-link-cta {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 600;
}

.hero-link-cta:hover {
    background: #d8d8d8;
    border-color: #d8d8d8;
    box-shadow: var(--shadow-lg);
}

.scroll-hint {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    text-decoration: none;
    animation: bounce 2s infinite;
    z-index: 1;
}

.scroll-hint span {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-faint);
    border-bottom: 2px solid var(--text-faint);
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ---------- SECTIONS ---------- */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(24px, 3.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 30px;
}

.about-text {
    color: var(--text-dim);
    font-size: 17px;
    max-width: 720px;
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    background: var(--surface-2);
}

.stat-icon {
    font-size: 18px;
    color: var(--text-faint);
    margin-bottom: 14px;
    display: block;
}

.stat-number {
    display: block;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
}

/* ---------- STACK ---------- */
.stack-category {
    margin-bottom: 30px;
}

.stack-category:last-child {
    margin-bottom: 0;
}

.stack-category-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.stack-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 16px;
    text-align: center;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.stack-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120px circle at 50% 0%, var(--glow-soft), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.stack-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    background: var(--surface-2);
}

.stack-card:hover::before {
    opacity: 1;
}

.stack-icon {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.stack-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.stack-icon-text {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-dim);
    transition: color var(--transition);
}

.stack-card:hover .stack-icon-text {
    color: var(--text);
}

.stack-card:hover .stack-icon {
    transform: scale(1.08) rotate(-4deg);
    border-color: var(--border-strong);
    background: var(--bg);
}

.stack-name {
    position: relative;
    z-index: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-dim);
    transition: color var(--transition);
}

.stack-card:hover .stack-name {
    color: var(--text);
}

/* ---------- PROCESO / TIMELINE ---------- */
.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
}

.timeline-item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.timeline-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.timeline-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.timeline-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-text {
    font-size: 14.5px;
    color: var(--text-dim);
    line-height: 1.7;
}

/* ---------- PROYECTOS ---------- */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}

@media (max-width: 700px) {
    .proyectos-grid {
        grid-template-columns: 1fr;
    }
}

.proyecto-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.proyecto-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
}

.proyecto-img-wrap {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    line-height: 0;
}

.proyecto-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s var(--ease);
}

.proyecto-card:hover .proyecto-img {
    transform: scale(1.03);
}

.proyecto-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    background: linear-gradient(180deg, rgba(10, 10, 11, 0) 40%, rgba(10, 10, 11, 0.85) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.proyecto-card:hover .proyecto-overlay {
    opacity: 1;
}

.proyecto-overlay span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(6px);
    transition: transform var(--transition);
}

.proyecto-card:hover .proyecto-overlay span {
    transform: translateY(0);
}

.proyecto-info {
    padding: 22px;
}

.proyecto-titulo {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.proyecto-resumen {
    font-size: 14.5px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.proyecto-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.proyecto-wa-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 11, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(37, 211, 102, 0.4);
    border-radius: 50%;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--transition), transform var(--transition), background var(--transition), border-color var(--transition);
}

.proyecto-wa-btn svg {
    width: 18px;
    height: 18px;
    fill: #25D366;
}

.proyecto-card:hover .proyecto-wa-btn {
    opacity: 1;
    transform: translateY(0);
}

.proyecto-wa-btn:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: #25D366;
}

@media (hover: none) {
    .proyecto-wa-btn {
        opacity: 1;
        transform: none;
    }
}

/* ---------- VIDEOS (grilla) ---------- */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.video-card {
    position: relative;
    aspect-ratio: 9/16;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.video-card-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 11, 0.55);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
}

.video-card-play svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    margin-left: 2px;
}

.video-card:hover .video-card-play {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(37, 211, 102, 0.35);
}

.video-card-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 12px;
    background: linear-gradient(180deg, rgba(10, 10, 11, 0) 0%, rgba(10, 10, 11, 0.85) 100%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
}

/* ---------- REEL VIEWER (pantalla completa, scroll vertical) ---------- */
.reel-viewer {
    position: fixed;
    inset: 0;
    background: #050506;
    z-index: 400;
    display: none;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.reel-viewer.open {
    display: block;
    opacity: 1;
}

.reel-track {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
}

.reel-track::-webkit-scrollbar {
    display: none;
}

.reel-slide {
    position: relative;
    height: 100%;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.reel-media {
    position: relative;
    display: inline-flex;
    max-width: 100%;
    max-height: 100%;
}

.reel-media video {
    display: block;
    max-width: 92vw;
    max-height: 78vh;
    width: auto;
    height: auto;
}

.reel-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 24px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    color: #fff;
    pointer-events: none;
    border-radius: 0 0 4px 4px;
}

.reel-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.1px;
    margin-bottom: 5px;
}

.reel-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

.reel-close,
.reel-mute,
.reel-whatsapp {
    position: fixed;
    z-index: 401;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.reel-close svg,
.reel-mute svg,
.reel-whatsapp svg {
    width: 19px;
    height: 19px;
    fill: #fff;
}

.reel-close:hover,
.reel-mute:hover,
.reel-whatsapp:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.reel-close {
    top: 20px;
    right: 20px;
}

.reel-close:hover {
    transform: rotate(90deg);
}

.reel-whatsapp {
    top: 20px;
    right: 72px;
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.4);
}

.reel-whatsapp svg {
    fill: #25D366;
}

.reel-whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
}

.reel-mute {
    bottom: 24px;
    right: 20px;
}

.reel-nav-group {
    position: fixed;
    z-index: 401;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reel-nav-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.reel-nav-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.reel-nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.08);
}

@media (hover: none) {
    .reel-nav-group {
        display: none;
    }
}

@media (max-width: 600px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .reel-info {
        padding: 18px 16px 16px;
    }
}

.proyecto-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), gap var(--transition);
}

.proyecto-btn i {
    font-size: 11px;
    transition: transform var(--transition);
}

.proyecto-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.proyecto-btn:hover i {
    transform: translateX(2px);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 11px 4px 8px;
    transition: border-color var(--transition), color var(--transition);
}

.tag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.tag-icon img,
.tag-icon i {
    width: 14px;
    height: 14px;
    font-size: 11px;
    object-fit: contain;
}

.tag-icon-text {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--text-faint);
    width: auto;
    transition: color var(--transition);
}

.proyecto-card:hover .tag-icon-text,
.modal-tags .tag:hover .tag-icon-text {
    color: var(--text);
}

.proyecto-card:hover .tag {
    border-color: var(--border-strong);
    color: var(--text);
}

.empty-msg {
    color: var(--text-faint);
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

/* ---------- CONTACTO ---------- */
.contact-subtitle {
    color: var(--text-dim);
    margin-bottom: 30px;
}

#contacto {
    text-align: center;
}

#contacto .contact-subtitle {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

#contacto .contact-wa-card {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

#contacto .contact-form {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.contact-wa-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(37, 211, 102, 0.06);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    max-width: 520px;
    text-decoration: none;
    margin-bottom: 22px;
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact-wa-card:hover {
    background: rgba(37, 211, 102, 0.12);
    border-color: #25D366;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-wa-icon {
    width: 30px;
    height: 30px;
    fill: #25D366;
    flex-shrink: 0;
}

.contact-wa-text {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.contact-wa-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.contact-wa-arrow {
    margin-left: auto;
    color: #25D366;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.contact-wa-card:hover .contact-wa-arrow {
    transform: translateX(4px);
}

.contact-or {
    color: var(--text-faint);
    font-size: 13px;
    margin-bottom: 16px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 520px;
}

.contact-form input,
.contact-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 15px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-faint);
}

.contact-form input:hover,
.contact-form textarea:hover {
    border-color: var(--border-strong);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--text-dim);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(242, 242, 242, 0.05);
}

.contact-form button {
    position: relative;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact-form button:hover:not(:disabled) {
    background: #d8d8d8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-form button:active:not(:disabled) {
    transform: translateY(0);
}

.contact-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#f-status {
    font-size: 13px;
    color: var(--text-dim);
    min-height: 18px;
}

#f-status.ok {
    color: var(--accent-ok);
}

#f-status.error {
    color: #f08585;
}

.section-next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 36px auto 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}

.section-next-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.section-next-btn:hover {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--text);
    transform: translateY(3px);
}

.footer {
    text-align: center;
    padding: 44px 24px;
    color: var(--text-faint);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-dim);
}

.footer-brand-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 5px;
}

.footer-brand strong {
    color: var(--text);
}

.miapp-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    max-width: 560px;
    text-decoration: none;
    margin-bottom: 40px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.miapp-card:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.miapp-card-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 6px;
    flex-shrink: 0;
}

.miapp-card-text {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.5;
}

.miapp-card-text strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 2px;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stats-grid .stat-card:nth-child(1),
.stack-grid .stack-card:nth-child(1),
.timeline .timeline-item:nth-child(1),
.proyectos-grid .proyecto-card:nth-child(1) {
    transition-delay: 0s;
}

.stats-grid .stat-card:nth-child(2),
.stack-grid .stack-card:nth-child(2),
.timeline .timeline-item:nth-child(2),
.proyectos-grid .proyecto-card:nth-child(2) {
    transition-delay: 0.08s;
}

.stats-grid .stat-card:nth-child(3),
.stack-grid .stack-card:nth-child(3),
.timeline .timeline-item:nth-child(3),
.proyectos-grid .proyecto-card:nth-child(3) {
    transition-delay: 0.16s;
}

.stack-grid .stack-card:nth-child(4),
.timeline .timeline-item:nth-child(4),
.proyectos-grid .proyecto-card:nth-child(4) {
    transition-delay: 0.24s;
}

/* ---------- MODAL DETALLE PROYECTO ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.92);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    overflow-y: auto;
    padding: 60px 20px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.modal-overlay.open {
    display: block;
    opacity: 1;
}

.modal-box {
    max-width: 850px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.35s var(--ease);
}

.modal-overlay.open .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    background: rgba(23, 23, 26, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.modal-close:hover {
    border-color: var(--border-strong);
    background: var(--bg);
    transform: rotate(90deg);
}

/* ---------- Imagen principal (hero) del modal ---------- */
.modal-hero {
    position: relative;
    line-height: 0;
    cursor: zoom-in;
    overflow: hidden;
    background: var(--surface-2);
}

.modal-hero img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s var(--ease);
}

.modal-hero:hover img {
    transform: scale(1.03);
}

.modal-zoom-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(10, 10, 11, 0) 55%, rgba(10, 10, 11, 0.55) 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition);
}

.modal-hero .modal-zoom-hint {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px 20px;
    font-size: 14px;
}

.modal-hero:hover .modal-zoom-hint,
.modal-gallery-item:hover .modal-zoom-hint {
    opacity: 1;
}

.modal-body {
    padding: 32px 40px 40px;
}

.modal-body.modal-body--no-hero {
    padding-top: 64px;
}

.modal-titulo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.modal-descripcion {
    color: var(--text-dim);
    font-size: 15.5px;
    line-height: 1.75;
    white-space: pre-line;
    margin-bottom: 20px;
}

.modal-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.modal-wa-btn {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.35);
}

.modal-wa-btn:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: #25D366;
}

.modal-gallery-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-faint);
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.modal-gallery {
    columns: 2;
    column-gap: 12px;
}

.modal-gallery-item {
    position: relative;
    display: block;
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    line-height: 0;
    cursor: zoom-in;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.modal-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

/* ---------- LIGHTBOX (carrusel deslizante) ---------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 7, 0.97);
    z-index: 300;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.lightbox-overlay.open {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-counter {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 3;
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    padding: 0 70px;
}

.lightbox-track-wrap {
    width: 100%;
    max-height: 74vh;
    overflow: hidden;
    border-radius: 12px;
}

.lightbox-track {
    display: flex;
    transition: transform 0.45s var(--ease);
}

.lightbox-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 74vh;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 74vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-nav {
    flex-shrink: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    font-family: Georgia, "Times New Roman", serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    margin-right: 22px;
}

.lightbox-prev:hover {
    transform: translateX(-3px);
}

.lightbox-next {
    margin-left: 22px;
}

.lightbox-next:hover {
    transform: translateX(3px);
}

.lightbox-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    padding: 4px 6px;
    max-width: 90vw;
    overflow-x: auto;
    scrollbar-width: none;
}

.lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.lightbox-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 44px;
    border-radius: 7px;
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    opacity: 0.45;
    cursor: pointer;
    background: none;
    transition: opacity var(--transition), border-color var(--transition), transform var(--transition);
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lightbox-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: #fff;
}

@media (max-width: 768px) {
    .lightbox-stage {
        padding: 0 14px;
    }

    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .lightbox-prev {
        margin-right: 8px;
    }

    .lightbox-next {
        margin-left: 8px;
    }

    .lightbox-thumbs {
        margin-top: 16px;
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 14px 20px;
    }

    #nav-links {
        position: fixed;
        top: 68px;
        right: 16px;
        left: 16px;
        background: rgba(23, 23, 26, 0.98);
        backdrop-filter: blur(14px);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    }

    #nav-links.open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        padding: 13px 16px;
        border-radius: 10px;
        text-align: left;
    }

    #nav-toggle {
        display: flex;
    }

    .hero {
        padding-top: 110px;
    }

    .hero-name {
        font-size: 28px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 56px 20px;
    }

    .modal-box {
        padding: 26px;
    }
}

@media (hover: none) {

    .stack-card:hover,
    .stat-card:hover,
    .timeline-item:hover,
    .hero-link:hover,
    .proyecto-card:hover {
        transform: none;
    }
}