/* ================================================================
   IE URBANA SAN JOSÉ · PROYECTOS SENA
   Rediseño editorial moderno
   Bricolage Grotesque + Instrument Serif + Inter
================================================================ */

:root {
    /* Superficies */
    --bg:        #0a0a0b;
    --bg-2:      #0f0f11;
    --surface:   #141417;
    --surface-2: #1a1a1e;
    --line:      rgba(255, 255, 255, 0.09);
    --line-soft: rgba(255, 255, 255, 0.05);

    /* Tinta */
    --ink:    #f5f5ef;
    --ink-2:  #b7b7ae;
    --muted:  #77776e;

    /* Acentos */
    --lime:   #c6ff3a;   /* Cloud / marca — relleno */
    --lime-d: #9fdb1e;
    --coral:  #ff6a3d;   /* Datos — relleno */
    --lime-glow:  rgba(198, 255, 58, 0.18);
    --coral-glow: rgba(255, 106, 61, 0.18);
    --lime-ink:  var(--lime);   /* acento para TEXTO (se oscurece en modo claro) */
    --coral-ink: var(--coral);  /* acento coral para TEXTO */
    --lime-bright: #c6ff3a;     /* lima siempre brillante (texto sobre superficie oscura) */
    --on-lime: #0a0a0b;         /* texto sobre relleno lima/coral */
    --grain-blend: screen;
    color-scheme: dark;

    /* Tipografía */
    --display: 'Bricolage Grotesque', sans-serif;
    --serif:   'Instrument Serif', Georgia, serif;
    --sans:    'Inter', system-ui, sans-serif;

    /* Movimiento */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.25s var(--ease);
    --t: 0.5s var(--ease);
    --t-slow: 0.8s var(--ease);

    /* Métrica */
    --edge: clamp(1.25rem, 5vw, 5rem);
    --maxw: 1400px;
}

/* ================================================================
   MODO CLARO
================================================================ */
:root[data-theme="light"] {
    --bg:        #f3f2ea;
    --bg-2:      #eae8dd;
    --surface:   #ffffff;
    --surface-2: #f6f4ec;
    --line:      rgba(20, 20, 15, 0.14);
    --line-soft: rgba(20, 20, 15, 0.07);

    --ink:    #17170f;
    --ink-2:  #45443b;
    --muted:  #7c7b70;

    --lime-ink:  #4f7a00;   /* verde profundo legible sobre papel */
    --coral-ink: #c53d10;   /* coral profundo legible sobre papel */
    --lime-glow:  rgba(120, 170, 20, 0.20);
    --coral-glow: rgba(220, 80, 40, 0.14);
    --grain-blend: multiply;
    color-scheme: light;
}
:root[data-theme="light"] body::before {
    background:
        radial-gradient(60vw 60vw at 12% -5%, rgba(120, 170, 20, 0.12), transparent 55%),
        radial-gradient(55vw 55vw at 100% 8%, rgba(255, 106, 61, 0.09), transparent 55%),
        radial-gradient(50vw 50vw at 50% 110%, rgba(120, 170, 20, 0.08), transparent 55%);
}
:root[data-theme="light"] body::after { opacity: 0.05; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cdccbf; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--lime-d); }

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink-2);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Aurora de fondo (reemplaza a las partículas) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60vw 60vw at 12% -5%, rgba(198, 255, 58, 0.10), transparent 55%),
        radial-gradient(55vw 55vw at 100% 8%, rgba(255, 106, 61, 0.08), transparent 55%),
        radial-gradient(50vw 50vw at 50% 110%, rgba(198, 255, 58, 0.06), transparent 55%);
    pointer-events: none;
}
/* Textura de grano sutil */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;
    mix-blend-mode: var(--grain-blend, screen);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
svg { display: block; }
img { max-width: 100%; }
::selection { background: var(--lime); color: #0a0a0b; }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2e; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime-d); }

/* ================================================================
   HELPERS
================================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--edge); }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}
.kicker::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--lime);
}

.serif-accent { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.lime { color: var(--lime-ink); }

/* Revelado con scroll */
.reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
/* Alias para compatibilidad con el JS existente */
.fade-in-element { opacity: 0; transform: translateY(38px); transition: opacity var(--t-slow), transform var(--t-slow); }
.fade-in-element.visible { opacity: 1; transform: none; }

/* ================================================================
   NAVBAR + PROGRESO
================================================================ */
.scroll-progress {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    z-index: 1001; pointer-events: none;
}
.scroll-progress-bar {
    height: 100%; width: 0;
    background: var(--lime);
    box-shadow: 0 0 14px var(--lime);
}

.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.4rem var(--edge);
    transition: padding var(--t), background var(--t), border-color var(--t);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    padding: 0.85rem var(--edge);
    background: rgba(10, 10, 11, 0.72);
    backdrop-filter: blur(16px) saturate(1.2);
    border-bottom-color: var(--line);
}
.navbar-brand {
    display: flex; align-items: center; gap: 0.7rem;
    font-family: var(--display); font-weight: 700;
    color: var(--ink); font-size: 1rem; letter-spacing: -0.01em;
}
.navbar-brand img {
    width: 38px; height: 38px; object-fit: contain;
}
.navbar-right { display: flex; align-items: center; gap: 1.6rem; }
.navbar-links { display: flex; align-items: center; gap: 2.2rem; }

/* Botón de tema (claro/oscuro) */
.theme-toggle {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--lime); color: var(--lime-ink); transform: rotate(15deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
.navbar-links a {
    position: relative;
    font-size: 0.9rem; font-weight: 500; color: var(--ink-2);
    transition: color var(--t-fast);
}
.navbar-links a:not(.navbar-admin)::after {
    content: ''; position: absolute; left: 0; bottom: -5px;
    width: 0; height: 1.5px; background: var(--lime);
    transition: width var(--t);
}
.navbar-links a:not(.navbar-admin):hover::after,
.navbar-links a.active::after { width: 100%; }
.navbar-links a:hover, .navbar-links a.active { color: var(--ink); }

.navbar-admin {
    padding: 0.5rem 1.15rem;
    border-radius: 100px;
    background: var(--lime);
    color: #0a0a0b !important;
    font-weight: 600;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.navbar-admin:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--lime-glow); }

.navbar-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 1002; }
.navbar-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: var(--t); }
.navbar.menu-open .navbar-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.menu-open .navbar-toggle span:nth-child(2) { opacity: 0; }
.navbar.menu-open .navbar-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   HERO
================================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem var(--edge) 0;
    position: relative;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; position: relative; z-index: 2; }

/* Constelación decorativa (mitad derecha del hero) */
.hero-constellation {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 58%;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
}

.hero-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: clamp(2rem, 6vh, 4.5rem); flex-wrap: wrap;
}
.hero-badges { display: flex; align-items: center; gap: 0.9rem; }
.hero-badge {
    width: 54px; height: 54px; border-radius: 50%;
    padding: 9px; background: var(--surface);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
}
.hero-badge img { width: 100%; height: 100%; object-fit: contain; }
.hero-badge-plus { color: var(--muted); font-size: 1.1rem; }

.hero-headline {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.7rem, 8.5vw, 8.5rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: clamp(1.5rem, 4vh, 2.6rem);
}
.hero-headline .line { display: block; overflow: hidden; }
.hero-headline .line > span {
    display: inline-block;
    transform: translateY(105%);
    animation: heroLineUp 0.9s var(--ease) forwards;
}
.hero-headline .line:nth-child(1) > span { animation-delay: 0.08s; }
.hero-headline .line:nth-child(2) > span { animation-delay: 0.18s; }
.hero-headline .line:nth-child(3) > span { animation-delay: 0.28s; }
@keyframes heroLineUp { from { transform: translateY(105%); } to { transform: translateY(0); } }

.hero-bottom {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
    opacity: 0; transform: translateY(20px);
    animation: heroFadeUp var(--t-slow) 0.55s forwards;
}
@keyframes heroFadeUp { to { opacity: 1; transform: none; } }
.hero-lead {
    max-width: 30ch;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--ink-2);
}
.hero-lead strong { color: var(--ink); font-weight: 600; }

.hero-cta {
    display: inline-flex; align-items: center; gap: 0.7rem;
    padding: 1rem 1.8rem; border-radius: 100px;
    background: var(--ink); color: var(--bg);
    font-weight: 600; font-size: 0.98rem;
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}
.hero-cta svg { width: 18px; height: 18px; transition: transform var(--t-fast); }
.hero-cta:hover { background: var(--lime); color: var(--on-lime); transform: translateY(-2px); }
.hero-cta:hover svg { transform: translate(3px, 3px); }

.scroll-cue {
    position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue .dot {
    width: 22px; height: 34px; border: 1.5px solid var(--line);
    border-radius: 12px; position: relative;
}
.scroll-cue .dot::after {
    content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 3px; height: 7px; border-radius: 3px; background: var(--lime);
    animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80%,100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ================================================================
   MARQUEE
================================================================ */
.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
    overflow: hidden;
    display: flex;
    user-select: none;
    background: var(--bg-2);
}
.marquee-track {
    display: flex; align-items: center; gap: 3rem;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    padding-right: 3rem;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(1.2rem, 2.4vw, 2rem); color: var(--ink);
    display: inline-flex; align-items: center; gap: 3rem;
}
.marquee-track span::after {
    content: '✦'; color: var(--lime-ink); font-size: 0.9em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================================================================
   SECCIÓN GENÉRICA
================================================================ */
.section { padding: clamp(5rem, 12vh, 9rem) 0; }
.section-head {
    display: grid; grid-template-columns: 1fr; gap: 1.4rem;
    margin-bottom: clamp(3rem, 7vh, 5rem);
}
.section-index {
    font-family: var(--display); font-size: 0.85rem; font-weight: 700;
    color: var(--lime-ink); letter-spacing: 0.05em;
}
.section-title {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(2rem, 5.5vw, 4.4rem); line-height: 1.02;
    letter-spacing: -0.025em; color: var(--ink);
}
.section-sub {
    max-width: 46ch; font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--ink-2);
}

/* ================================================================
   MANIFIESTO / ALIANZA
================================================================ */
.manifesto { padding: clamp(5rem, 14vh, 10rem) 0; border-top: 1px solid var(--line); }
.manifesto-text {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(1.6rem, 4.2vw, 3.6rem); line-height: 1.15;
    letter-spacing: -0.02em; color: var(--muted); max-width: 20ch + 100%;
}
.manifesto-text b { color: var(--ink); font-weight: 700; }
.manifesto-text em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--lime-ink); }

/* ================================================================
   PROGRAMAS
================================================================ */
.programs { border-top: 1px solid var(--line); }
.program-row {
    display: grid; grid-template-columns: auto 1fr auto;
    gap: clamp(1rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 3.2rem) 0;
    border-bottom: 1px solid var(--line);
    transition: background var(--t);
    position: relative;
}
.program-row:hover { background: linear-gradient(90deg, transparent, var(--surface) 50%, transparent); }
.program-num {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.4rem); color: var(--muted);
}
.program-body { max-width: 60ch; }
.program-tag {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    padding: 0.25rem 0.7rem; border-radius: 100px; margin-bottom: 1rem;
}
.program-tag.cloud { color: var(--lime-ink); background: var(--lime-glow); }
.program-tag.data { color: var(--coral-ink); background: var(--coral-glow); }
.program-name {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.5rem, 3.4vw, 2.6rem); line-height: 1.08;
    letter-spacing: -0.02em; color: var(--ink); margin-bottom: 0.8rem;
    transition: transform var(--t);
}
.program-row:hover .program-name { transform: translateX(10px); }
.program-desc { color: var(--ink-2); font-size: clamp(0.95rem, 1.2vw, 1.08rem); }
.program-arrow {
    width: 60px; height: 60px; border-radius: 50%;
    border: 1px solid var(--line); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    transition: var(--t); flex-shrink: 0;
}
.program-arrow svg { width: 22px; height: 22px; transition: transform var(--t); }
.program-row:hover .program-arrow { background: var(--lime); color: #0a0a0b; border-color: var(--lime-ink); }
.program-row:hover .program-arrow svg { transform: translate(3px, -3px); }

/* ================================================================
   PROYECTOS
================================================================ */
.proyectos { border-top: 1px solid var(--line); }

.project-tabs { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vh, 3.5rem); }
.tab-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.4rem; border-radius: 100px;
    background: transparent; border: 1px solid var(--line);
    color: var(--ink-2); font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: var(--t-fast);
}
.tab-btn svg { width: 16px; height: 16px; }
.tab-btn:hover { color: var(--ink); border-color: var(--muted); }
.tab-btn.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab-btn[data-tab="data"].active { background: var(--coral); border-color: var(--coral); color: var(--on-lime); }

.projects-grid {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.2rem, 3vw, 2.4rem);
}
.projects-grid.active { display: grid; }

/* Tarjeta editorial */
.project-card {
    position: relative;
    cursor: pointer;
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: transform var(--t), border-color var(--t);
}
.project-card:hover { transform: translateY(-6px); border-color: var(--muted); }

.project-card-media, .project-card-banner {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(120% 120% at 20% 0%, rgba(198,255,58,0.18), transparent 55%),
        var(--surface-2);
}
.projects-grid#projects-data .project-card-media,
.projects-grid#projects-data .project-card-banner {
    background:
        radial-gradient(120% 120% at 20% 0%, rgba(255,106,61,0.18), transparent 55%),
        var(--surface-2);
}
.project-card-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--t-slow);
}
.project-card:hover .project-card-media img { transform: scale(1.06); }
.project-card-media-icon,
.project-card-icon {
    position: absolute; top: 1rem; left: 1rem;
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    background: rgba(10, 10, 11, 0.55);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    z-index: 2;
}
/* Cuando no hay imagen, centra el emoji grande en el banner */
.project-card-banner { display: flex; align-items: center; justify-content: center; }
.project-card-banner .project-card-icon-big {
    font-size: clamp(3rem, 6vw, 4.5rem);
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

.project-card-body {
    padding: clamp(1.3rem, 2vw, 1.8rem);
    display: flex; flex-direction: column; gap: 0.8rem;
    flex: 1;
}
.project-card-cat {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--lime-ink);
}
.projects-grid#projects-data .project-card-cat { color: var(--coral-ink); }
.project-card-name {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.12;
    letter-spacing: -0.015em; color: var(--ink);
}
.project-card-desc {
    color: var(--ink-2); font-size: 0.95rem; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.project-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line-soft);
}
.project-members-count { font-size: 0.82rem; color: var(--muted); }
.project-view-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.85rem; font-weight: 600; color: var(--ink);
    transition: gap var(--t-fast);
}
.project-view-btn::after { content: '→'; color: var(--lime-ink); }
.projects-grid#projects-data .project-view-btn::after { color: var(--coral-ink); }
.project-card:hover .project-view-btn { gap: 0.7rem; }

/* ================================================================
   INSTITUCIÓN + STATS
================================================================ */
.institucion { border-top: 1px solid var(--line); }
.institution-content { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.institution-lead {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.2;
    letter-spacing: -0.02em; color: var(--ink); margin-bottom: 1.6rem;
}
.institution-text p { color: var(--ink-2); margin-bottom: 1.1rem; max-width: 60ch; }
.institution-text strong { color: var(--lime-ink); font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat-item {
    padding: clamp(1.4rem, 3vw, 2.2rem) 0;
    border-top: 1px solid var(--line);
}
.stat-number {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1;
    letter-spacing: -0.03em; color: var(--ink); margin-bottom: 0.5rem;
}
.stat-number .lime { color: var(--lime-ink); }
.stat-label { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.contact-band {
    margin-top: clamp(4rem, 9vh, 7rem);
    padding: clamp(2.5rem, 6vw, 4.5rem);
    border-radius: 28px;
    background: var(--lime);
    color: #0a0a0b;
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
}
.contact-band h3 {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em;
    max-width: 18ch;
}
.contact-band-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 1rem 1.8rem; border-radius: 100px;
    background: #0a0a0b; color: var(--lime-bright); font-weight: 600; white-space: nowrap;
    transition: transform var(--t-fast);
}
.contact-band-btn:hover { transform: translateY(-2px); }

/* ================================================================
   FOOTER
================================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 7vh, 5rem) 0 2.5rem; }
.footer-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.2rem; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; }
.footer-brand-name { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.footer p { color: var(--muted); font-size: 0.9rem; max-width: 40ch; }
.footer-col h4 {
    font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 1.1rem; font-weight: 600;
}
.footer-col a { display: block; color: var(--ink-2); font-size: 0.95rem; margin-bottom: 0.7rem; transition: color var(--t-fast); }
.footer-col a:hover { color: var(--lime-ink); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 2rem; border-top: 1px solid var(--line); gap: 1rem; flex-wrap: wrap;
    font-size: 0.82rem; color: var(--muted);
}

/* ================================================================
   MODAL DE PROYECTO
================================================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(5, 5, 6, 0.78);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    padding: var(--edge);
    opacity: 0; pointer-events: none; transition: opacity var(--t);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-container {
    position: relative;
    width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: clamp(1.6rem, 4vw, 2.8rem);
    transform: translateY(30px) scale(0.97);
    transition: transform var(--t);
}
.modal-overlay.open .modal-container { transform: none; }
.modal-close {
    position: absolute; top: 1.2rem; right: 1.2rem;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--line);
    color: var(--ink-2); cursor: pointer; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    transition: var(--t-fast);
}
.modal-close:hover { color: var(--ink); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; }

.modal-header { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.6rem; }
.modal-logo {
    width: 66px; height: 66px; border-radius: 18px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
    background: var(--lime-glow); border: 1px solid var(--line);
}
.modal-logo.data-category { background: var(--coral-glow); }
.modal-category-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem;
    color: var(--lime-ink);
}
.modal-category-badge.data-category { color: var(--coral-ink); }
.modal-title {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink);
}
.modal-body { display: flex; flex-direction: column; gap: 1.6rem; }
.modal-image { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); max-height: 340px; }
.modal-image img { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.modal-description {
    color: var(--ink-2); font-size: 1.05rem; line-height: 1.75;
}
.modal-cta {
    display: inline-flex; align-items: center; gap: 0.6rem; align-self: flex-start;
    padding: 0.9rem 1.7rem; border-radius: 100px;
    background: var(--lime); color: #0a0a0b; font-weight: 600;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.modal-cta svg { width: 18px; height: 18px; }
.modal-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--lime-glow); }
.modal-cta.data-category { background: var(--coral); }
.modal-cta.data-category:hover { box-shadow: 0 10px 30px var(--coral-glow); }
.modal-section h4 {
    font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 1rem; font-weight: 600;
}
.modal-members { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.modal-members li { display: flex; align-items: center; gap: 0.6rem; color: var(--ink-2); font-size: 0.95rem; }
.modal-members li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--lime-ink); flex-shrink: 0; }
.modal-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag {
    padding: 0.4rem 0.9rem; border-radius: 100px; font-size: 0.82rem; font-weight: 500;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
    transition: var(--t-fast);
}
.tech-tag:hover { border-color: var(--lime-ink); color: var(--lime-ink); }
.tech-tag.data-tag:hover { border-color: var(--coral-ink); color: var(--coral-ink); }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .institution-content { grid-template-columns: 1fr; }
    .hero-constellation { display: none; }
}

@media (max-width: 760px) {
    .navbar-toggle { display: flex; }
    .navbar-links {
        position: fixed; inset: 0 0 0 auto; height: 100vh; width: min(80vw, 340px);
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 2rem;
        padding: var(--edge); background: rgba(10,10,11,0.97); backdrop-filter: blur(20px);
        border-left: 1px solid var(--line); transform: translateX(100%); transition: transform var(--t);
    }
    .navbar.menu-open .navbar-links { transform: translateX(0); }
    .navbar-links a { font-size: 1.3rem; }
    .navbar-brand span { display: none; }

    .projects-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .program-row { grid-template-columns: auto 1fr; }
    .program-arrow { display: none; }
    .modal-members { grid-template-columns: 1fr; }
    .contact-band { flex-direction: column; align-items: flex-start; }
}

/* Respeta reduce-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    .reveal, .fade-in-element, .hero-headline .line > span, .hero-bottom { opacity: 1 !important; transform: none !important; }
}
