/* ==========================================================================
   Dev7Vargas — Diseño limpio tipo apple.com
   Fondos planos blanco/negro, sin degradados ni neones.
   Un único acento azul sólido (#0071e3 / #2997ff en oscuro).
   Tipografía: Bricolage Grotesque (títulos) · Hanken Grotesk (texto)
                Instrument Serif italic (acentos) · IBM Plex Mono (técnico)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* superficies claras */
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #f5f5f7;

    /* tinta / texto */
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #86868b;

    --line: rgba(0, 0, 0, 0.12);
    --line-strong: rgba(0, 0, 0, 0.22);

    /* acento único (sin morados, sin cian) */
    --brand: #0071e3;
    --brand-soft: rgba(0, 113, 227, 0.10);
    --on-dark: #2997ff;
    --green: #16a34a;

    /* estados */
    --hover: rgba(0, 0, 0, 0.06);

    /* botones */
    --btn-bg: #0071e3;
    --btn-fg: #ffffff;
    --btn-bg-hover: #0077ed;

    /* paneles oscuros (siempre oscuros, también en tema claro) */
    --panel: #000000;
    --panel-2: #1d1d1f;
    --panel-text: #f5f5f7;
    --panel-text-2: #a1a1a6;
    --panel-line: rgba(255, 255, 255, 0.14);
    --panel-soft: rgba(255, 255, 255, 0.06);

    /* formas */
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 22px;
    --r-xl: 30px;

    /* sombras */
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.06);
    --sh-2: 0 14px 34px -18px rgba(0, 0, 0, 0.24);
    --sh-3: 0 40px 70px -40px rgba(0, 0, 0, 0.45);
    --sh-panel: 0 40px 80px -45px rgba(0, 0, 0, 0.6);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --maxw: 1200px;
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-soft: #1d1d1f;
    --surface: #1d1d1f;
    --surface-2: #2c2c2e;

    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;

    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.28);

    --brand: #2997ff;
    --brand-soft: rgba(41, 151, 255, 0.16);

    --hover: rgba(255, 255, 255, 0.10);

    --btn-bg: #0071e3;
    --btn-fg: #ffffff;
    --btn-bg-hover: #2997ff;

    --panel: #1d1d1f;
    --panel-2: #2c2c2e;
    --panel-text: #f5f5f7;
    --panel-text-2: #a1a1a6;
    --panel-line: rgba(255, 255, 255, 0.16);
    --panel-soft: rgba(255, 255, 255, 0.08);

    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --sh-2: 0 14px 34px -18px rgba(0, 0, 0, 0.8);
    --sh-3: 0 40px 70px -40px rgba(0, 0, 0, 0.9);
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body {
    font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    background: var(--bg);
    color: var(--text-2);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.06;
    text-wrap: balance;
}

p { text-wrap: pretty; }

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

ul, ol { list-style: none; }

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

button {
    font: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

/* palabra acentuada: serif itálica en color sólido (sin degradado) */
h1 em, h2 em, h3 em {
    font-family: "Instrument Serif", Georgia, serif;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--brand);
}

/* sobre paneles oscuros el acento debe ser claro */
.band h1 em, .band h2 em, .band h3 em { color: var(--on-dark); }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   3. FONDOS: lienzo de puntos, barra de progreso
   -------------------------------------------------------------------------- */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1200;
    background: transparent;
    pointer-events: none;
}

.scroll-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--brand);
}

/* --------------------------------------------------------------------------
   4. HEADER / NAV
   -------------------------------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 24px;
    transition: padding 0.35s var(--ease);
}

header.is-scrolled { padding: 10px 24px; }

.nav {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 9px 10px 9px 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    box-shadow: var(--sh-1);
    transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

header.is-scrolled .nav {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--sh-2);
}

[data-theme="dark"] .nav,
[data-theme="dark"] header.is-scrolled .nav {
    background: rgba(0, 0, 0, 0.8);
}

/* marca */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.brand-mark {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #05070f;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.35s var(--ease);
}

/* recorte del símbolo dentro de logo.png (1664×928, símbolo centrado en 820,390) */
.brand-mark img {
    position: absolute;
    width: 332.8%;
    max-width: none;
    left: -114%;
    top: -28%;
}

.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
}

.brand-role {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* enlaces */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-2);
    white-space: nowrap;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-links a i { font-size: 0.76rem; opacity: 0.75; }

.nav-links a:hover,
.nav-links a.is-active {
    background: var(--hover);
    color: var(--text);
}

.nav-links a:hover i,
.nav-links a.is-active i { opacity: 1; }

/* acciones */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}


.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 0.95rem;
    transition: all 0.25s var(--ease);
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--hover);
    transform: translateY(-1px);
}

/* burger */
.burger {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.burger span {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: all 0.3s var(--ease);
}

.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 24px; }

.burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* menú móvil */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}

.mobile-menu.is-open { opacity: 1; pointer-events: auto; }

.mobile-links { text-align: center; }

.mobile-links li + li { margin-top: 8px; }

.mobile-links a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 26px;
    border-radius: 999px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f5f5f7;
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.mobile-links a i { font-size: 1rem; color: var(--panel-text-2); }

.mobile-links a:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }

.mobile-social {
    display: flex;
    gap: 10px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-social a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #a1a1a6;
    font-size: 0.85rem;
    transition: all 0.25s var(--ease);
}

.mobile-social a:hover { color: #fff; border-color: rgba(255, 255, 255, 0.45); }

/* --------------------------------------------------------------------------
   5. BOTONES
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 27px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
                background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
    white-space: nowrap;
}

.btn i { font-size: 0.82rem; transition: transform 0.3s var(--ease); }

.btn-primary {
    background: var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: var(--sh-1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-2);
    background: var(--btn-bg-hover);
    color: #fff;
}

.btn-primary:hover i { transform: translateX(4px); }

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: transparent;
    color: var(--text);
    background: var(--bg-soft);
}

.btn-ghost:hover i { transform: translateY(3px); }

.btn-accent {
    background: var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: var(--sh-2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    background: var(--btn-bg-hover);
    box-shadow: var(--sh-3);
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
    padding: 158px 24px 74px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px 7px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 600;
    color: var(--text-2);
    box-shadow: var(--sh-1);
    margin-bottom: 26px;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
    70%  { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.hero h1 {
    font-size: clamp(2.7rem, 6vw, 4.7rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
}

.hero h1 em { padding-right: 0.05em; }

.lead {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text-2);
    max-width: 520px;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 26px;
    font-size: 0.85rem;
    color: var(--text-3);
}

.hero-meta li { display: inline-flex; align-items: center; gap: 9px; }
.hero-meta i { color: var(--brand); font-size: 0.85rem; }

/* --- ventana de código --- */
.hero-visual { position: relative; }

.code-window {
    position: relative;
    z-index: 2;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-panel);
    transform: rotate(-1.2deg);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.code-window:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 0 50px 90px -45px rgba(0, 0, 0, 0.9);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.win-dots { display: flex; gap: 7px; }

.win-dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3a3a3c;
}

.win-dots i:nth-child(1) { background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }

.win-title {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    color: #a1a1a6;
}

.window-body { padding: 24px 24px 28px; overflow-x: auto; }

.window-body pre {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.9;
    color: #d7d7db;
}

.window-body .k { color: #2997ff; }
.window-body .s { color: #6cb58a; }
.window-body .f { color: #f5f5f7; }
.window-body .c { color: #a1a1a6; }
.window-body .d { color: #2997ff; }
.window-body .b { color: #ff9f0a; }
.window-body .cm { color: #6e6e73; font-style: italic; }

/* chips flotantes */
.float-chip {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    backdrop-filter: blur(10px);
    box-shadow: var(--sh-2);
    animation: bob 6s ease-in-out infinite;
}

.chip-php     { top: -16px; right: 26px; }
.chip-python  { bottom: 44px; left: -26px; animation-delay: -2s; }
.chip-fastapi { top: 46%; right: -30px; animation-delay: -1s; }
.chip-laravel { bottom: -18px; right: 14%; animation-delay: -3.5s; }

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}

/* --------------------------------------------------------------------------
   7. MARQUEE
   -------------------------------------------------------------------------- */
.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
    padding: 15px 0;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: slide 38s linear infinite;
}

.mq-set {
    display: flex;
    flex-shrink: 0;
}

.mq-set span {
    display: inline-flex;
    align-items: center;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 0 24px;
    white-space: nowrap;
}

.mq-set span::after {
    content: "✦";
    margin-left: 48px;
    color: var(--brand);
    opacity: 0.55;
    font-size: 0.7rem;
}

@keyframes slide {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee:hover .marquee-track { animation-play-state: paused; }

/* --------------------------------------------------------------------------
   8. SECCIONES / ENCABEZADOS
   -------------------------------------------------------------------------- */
.section {
    padding: clamp(74px, 9vw, 122px) 24px;
}

.section-tint {
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.label {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 18px;
}

.label::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

.section-head.center .label { justify-content: center; }

.label-light { color: var(--on-dark); }

.section-title {
    font-size: clamp(1.95rem, 3.7vw, 3.1rem);
    font-weight: 700;
}

.section-sub {
    margin-top: 16px;
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 560px;
}

.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   9. SERVICIOS (bento)
   -------------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.service-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 30px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

.service-card:hover {
    transform: translateY(-7px);
    border-color: var(--line-strong);
    box-shadow: var(--sh-2);
}

.card-featured { grid-column: span 3; }

/* tarjeta tinta (mezcla oscuro/claro) */
.service-card.card-featured {
    background: var(--panel);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--panel-text-2);
    box-shadow: var(--sh-panel);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.card-num {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--text-3);
}

.card-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: var(--r);
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 1.3rem;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}

.service-card:hover .card-icon {
    transform: translateY(-3px) rotate(-6deg);
    background: var(--brand);
    color: #fff;
}

.card-featured .card-num { color: rgba(255, 255, 255, 0.42); }
.card-featured .card-icon { background: rgba(255, 255, 255, 0.10); color: var(--on-dark); }
.card-featured:hover .card-icon { background: var(--on-dark); color: #fff; }

.service-card h3 {
    font-size: 1.24rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card-featured h3 { color: var(--panel-text); }

.service-card p {
    font-size: 0.93rem;
    line-height: 1.72;
    color: var(--text-2);
}

.service-card p strong { color: var(--text); font-weight: 600; }
.card-featured p { color: var(--panel-text-2); }
.card-featured p strong { color: var(--panel-text); }

.features { display: flex; flex-direction: column; gap: 9px; }

.features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
}

.features i {
    color: var(--green);
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    background: rgba(22, 163, 74, 0.12);
    border-radius: 50%;
    flex: 0 0 auto;
}

.card-featured .features li { color: var(--panel-text-2); }
.card-featured .features i { background: rgba(74, 222, 128, 0.16); color: #4ade80; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.tags span {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text-2);
    transition: all 0.25s var(--ease);
}

.card-featured .tags { border-top-color: rgba(255, 255, 255, 0.1); }
.card-featured .tags span {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #a1a1a6;
}

.tags span:hover { transform: translateY(-2px); }

.tags span:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--bg-soft);
}

/* --------------------------------------------------------------------------
   10. STACK
   -------------------------------------------------------------------------- */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 14px;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 26px 12px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    text-align: center;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.stack-item:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: var(--sh-2);
}

.stack-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: var(--r);
    font-size: 1.5rem;
    color: var(--c, var(--brand));
    background: var(--c-soft, var(--brand-soft));
    transition: all 0.35s var(--ease);
}

.stack-item:hover .stack-icon {
    background: var(--c, var(--brand));
    color: #fff;
    transform: scale(1.06);
}

.stack-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.stack-meta {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.is-php     { --c: #777bb4; --c-soft: rgba(119, 123, 180, 0.14); }
.is-laravel { --c: #ff2d20; --c-soft: rgba(255, 45, 32, 0.12); }
.is-python  { --c: #3776ab; --c-soft: rgba(55, 118, 171, 0.13); }
.is-fastapi { --c: #009688; --c-soft: rgba(0, 150, 136, 0.13); }
.is-docker  { --c: #2496ed; --c-soft: rgba(36, 150, 237, 0.13); }
.is-git     { --c: #f05033; --c-soft: rgba(240, 80, 51, 0.13); }
.is-pg      { --c: #336791; --c-soft: rgba(51, 103, 145, 0.13); }
.is-oracle  { --c: #c74634; --c-soft: rgba(199, 70, 52, 0.13); }
.is-linux   { --c: #e95420; --c-soft: rgba(233, 84, 32, 0.13); }

/* --------------------------------------------------------------------------
   11. BANDAS OSCURAS (enfoque + contacto)
   -------------------------------------------------------------------------- */
.band {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    color: var(--panel-text-2);
}

.band h2, .band h3 { color: var(--panel-text); }
.band h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }

.band p { color: var(--panel-text-2); }

.band-dark {
    padding: clamp(74px, 9vw, 118px) 24px;
}

.band-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 62px;
    align-items: start;
}

.band-copy p {
    margin-top: 20px;
    font-size: 1.03rem;
    line-height: 1.75;
    max-width: 500px;
}

.principles { display: flex; flex-direction: column; }

.principles li {
    display: flex;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid var(--panel-line);
}

.principles li:last-child { border-bottom: 1px solid var(--panel-line); }

.p-num {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--panel-text-2);
    padding-top: 5px;
    flex: 0 0 auto;
}

.principles h3 {
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 6px;
}

.principles p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--panel-text-2);
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   12. CONTACTO
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 0.92fr;
    gap: 58px;
    align-items: center;
}

.contact-copy p {
    margin-top: 18px;
    margin-bottom: 30px;
    font-size: 1.03rem;
    line-height: 1.75;
    max-width: 460px;
}

.contact-cards { display: flex; flex-direction: column; gap: 13px; }

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--panel-soft);
    border: 1px solid var(--panel-line);
    border-radius: var(--r-lg);
    transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.contact-card:hover {
    transform: translateX(6px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.30);
}

.cc-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.08);
    color: var(--panel-text);
    font-size: 1.05rem;
    transition: all 0.35s var(--ease);
}

.contact-card:hover .cc-icon { background: var(--on-dark); color: #fff; }

.cc-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.cc-label {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--panel-text-2);
    opacity: 0.75;
}

.cc-value {
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--panel-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-arrow {
    color: var(--panel-text-2);
    font-size: 0.82rem;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: all 0.3s var(--ease);
}

.contact-card:hover .cc-arrow { opacity: 1; transform: translate(0, 0); color: var(--on-dark); }

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
footer {
    background: var(--panel);
    border-top: 1px solid var(--panel-line);
    padding: 30px 24px;
}

.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.footer-brand .brand-name { color: var(--panel-text); }
.footer-brand .brand-role { color: var(--panel-text-2); opacity: 0.7; }

.footer-copy {
    font-size: 0.8rem;
    color: var(--panel-text-2);
    opacity: 0.7;
}

.footer-links { display: flex; gap: 9px; }

.footer-links a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--panel-line);
    background: var(--panel-soft);
    color: var(--panel-text-2);
    font-size: 0.95rem;
    transition: all 0.3s var(--ease);
}

.footer-links a:hover {
    color: #fff;
    background: var(--on-dark);
    border-color: transparent;
    transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   14. APARICIÓN AL HACER SCROLL
   -------------------------------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.js [data-reveal].is-in {
    opacity: 1;
    transform: translateY(0);
}

.js [data-delay="1"] { transition-delay: 0.08s; }
.js [data-delay="2"] { transition-delay: 0.16s; }
.js [data-delay="3"] { transition-delay: 0.24s; }
.js [data-delay="4"] { transition-delay: 0.32s; }
.js [data-delay="5"] { transition-delay: 0.40s; }
.js [data-delay="6"] { transition-delay: 0.48s; }
.js [data-delay="7"] { transition-delay: 0.56s; }
.js [data-delay="8"] { transition-delay: 0.64s; }

/* --------------------------------------------------------------------------
   15. SELECCIÓN / SCROLLBAR
   -------------------------------------------------------------------------- */
::selection { background: rgba(0, 113, 227, 0.22); color: var(--text); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* --------------------------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .hero-grid { grid-template-columns: 1fr; gap: 54px; }
    .hero-copy { text-align: center; }
    .lead { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-meta { justify-content: center; }
    .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }

    .nav-links { display: none; }
    .burger { display: block; }
    .mobile-menu { display: flex; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card { grid-column: span 1; }
    .service-card.card-featured { grid-column: span 2; }

    .band-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 720px) {
    header, header.is-scrolled { padding: 12px 16px; }
    .hero { padding: 132px 20px 60px; }
    .section, .band-dark { padding: 72px 20px; }
    footer { padding: 28px 20px; }

    .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
    .lead { font-size: 1rem; }

    .services-grid { grid-template-columns: 1fr; }
    .service-card,
    .service-card.card-featured { grid-column: span 1; }

    .stack-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stack-item { padding: 20px 8px 18px; }
    .stack-icon { width: 44px; height: 44px; font-size: 1.25rem; }

    .float-chip { display: none; }
    .code-window { transform: none; }
    .code-window:hover { transform: translateY(-4px); }
    .window-body pre { font-size: 0.72rem; }

    .btn { width: 100%; justify-content: center; }
    .hero-actions { flex-direction: column; }

    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 440px) {
    .brand-text { display: none; }
    .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-card { padding: 15px 16px; }
    .cc-value { font-size: 0.88rem; }
}

@media (min-width: 1081px) {
    .burger { display: none !important; }
}

/* --------------------------------------------------------------------------
   17. MOVIMIENTO REDUCIDO
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .js [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .marquee-track,
    .float-chip,
    .pulse {
        animation: none !important;
    }

    * { transition-duration: 0.01ms !important; }
}
