/* ============================================================================
   LCS — Luciano Colmano
   Editorial dark portfolio. Instrument Serif (display) + Inter (UI) +
   JetBrains Mono (mono). Acento electric lime + coral hover.
   ============================================================================ */

:root {
    --bg:            #0a0a0b;
    --bg-elev:       #131315;
    --bg-elev-2:     #1b1b1e;
    --surface:       #1e1e22;
    --border:        #2a2a2e;
    --border-strong: #3a3a40;
    --text:          #f4efe6;      /* warm ivory */
    --text-dim:      #a8a49b;
    --text-mute:     #6f6b62;
    --accent:        #c8ff2d;      /* electric lime */
    --accent-2:      #ff6b47;      /* warm coral */
    --accent-3:      #a58cff;      /* soft violet */
    --grid-tick:     rgba(200,255,45,.06);

    --f-display: "Instrument Serif", "Georgia", serif;
    --f-ui:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono:    "JetBrains Mono", "SF Mono", "Menlo", "Consolas", monospace;

    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 32px;

    --dur:  .35s;
    --ease: cubic-bezier(.2,.7,.2,1);

    --shadow-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -20px rgba(0,0,0,.6);
    --shadow-glow: 0 0 60px -10px rgba(200,255,45,.35);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-ui);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        linear-gradient(var(--grid-tick) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-tick) 1px, transparent 1px);
    background-size: 80px 80px;
    background-attachment: fixed;
    background-position: center;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Selección de texto */
::selection { background: var(--accent); color: #0b0b0b; }
::-moz-selection { background: var(--accent); color: #0b0b0b; }

/* ── Container ─────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ── Cursor blob (decoration) ──────────────────────────────────────────── */
.cursor-blob {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    width: 520px;
    height: 520px;
    left: 0; top: 0;
    transform: translate3d(-50%, -50%, 0);
    background: radial-gradient(circle, rgba(200,255,45,.22), rgba(200,255,45,0) 65%);
    filter: blur(60px);
    opacity: 0;
    transition: opacity .6s ease;
    mix-blend-mode: screen;
}
.cursor-blob.is-active { opacity: 1; }
@media (hover: none) { .cursor-blob { display: none; } }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    background: rgba(10,10,11,.6);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, background .3s ease;
}
.navbar.is-scrolled { border-bottom-color: var(--border); background: rgba(10,10,11,.82); }
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
    gap: 2rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: opacity var(--dur) var(--ease);
}
.brand:hover { opacity: .85; }
.brand-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
}
@media (max-width: 480px) {
    .brand-logo { height: 42px; max-width: 190px; }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
    font-size: .92rem;
}
.nav-menu a {
    position: relative;
    color: var(--text-dim);
    transition: color var(--dur) var(--ease);
    padding: .3rem 0;
    font-weight: 500;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: -4px;
    height: 1px;
    background: var(--accent);
    transition: right var(--dur) var(--ease);
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--text); }
.nav-menu a:hover::after,
.nav-menu a.active::after { right: 0; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.15rem;
    font-size: .88rem;
    font-weight: 600;
    color: #0b0b0b;
    background: var(--accent);
    border-radius: 999px;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); background: #d9ff4a; box-shadow: 0 6px 22px -8px var(--accent); }

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px; height: 44px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: border-color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 860px) {
    /* CRITICO: sin backdrop-filter en mobile — crea containing block que
       captura position:fixed de descendientes (menu overlay quedaria atrapado
       dentro del navbar). Con menos opacidad de fondo compensa el blur perdido. */
    .navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(10,10,11,.9);
    }
    .navbar.is-scrolled { background: rgba(10,10,11,.95); }

    .navbar-inner { padding: .85rem 0; }

    .nav-menu, .nav-cta { display: none; }
    .nav-toggle {
        display: inline-flex;
        position: relative;
        z-index: 210;
        margin-right: .5rem; /* respiro visual — el circulo con borde se ve pegado al edge */
    }

    /* Bloquear scroll del body cuando el menu esta abierto */
    body.nav-mobile-open { overflow: hidden; }

    /* Overlay full-screen SOLIDO — cubre incluso el navbar para que no bleed nada */
    .nav-mobile-open .nav-menu {
        display: flex;
        position: fixed;
        top: 0; right: 0; bottom: 0; left: 0;
        background: #0a0a0b;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 0;
        padding: 6rem clamp(1.5rem, 6vw, 3rem) 2.5rem;
        z-index: 200;
        overflow-y: auto;
    }
    .nav-mobile-open .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    .nav-mobile-open .nav-menu li:first-child { border-top: 1px solid var(--border); }
    .nav-mobile-open .nav-menu a {
        display: block;
        font-family: var(--f-display);
        font-size: 2.2rem;
        line-height: 1.15;
        padding: 1.1rem 0;
        color: var(--text);
        transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
    }
    .nav-mobile-open .nav-menu a:hover,
    .nav-mobile-open .nav-menu a.active {
        color: var(--accent);
        padding-left: .5rem;
    }
    .nav-mobile-open .nav-menu a::after { display: none; }

    /* CTA fija abajo del overlay, respetando el home-indicator de iOS */
    .nav-mobile-open .nav-cta {
        display: inline-flex;
        justify-content: center;
        position: fixed;
        left: clamp(1.5rem, 6vw, 3rem);
        right: clamp(1.5rem, 6vw, 3rem);
        bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
        padding: 1rem 1.4rem;
        font-size: 1rem;
        z-index: 210;
    }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: clamp(1.5rem, 3.5vw, 3rem) 0 clamp(3rem, 6vw, 5rem);
    isolation: isolate;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 300px at 20% 0%, rgba(200,255,45,.08), transparent 60%),
        radial-gradient(ellipse 600px 400px at 90% 80%, rgba(165,140,255,.08), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Hero grid: texto a la izquierda + logo grande decorativo a la derecha */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.hero-visual {
    position: relative;
    justify-self: end;
    max-width: 520px;
    width: 100%;
}
.hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 60px rgba(200,255,45,.18)) drop-shadow(0 4px 20px rgba(0,0,0,.5));
    animation: heroFloat 7s ease-in-out infinite;
    transform-origin: center;
}
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(-0.3deg); }
    50%      { transform: translateY(-14px) rotate(0.3deg); }
}
.hero-visual::before {
    content: '';
    position: absolute;
    inset: -10% -5% -10% -5%;
    background:
        radial-gradient(ellipse 60% 45% at 50% 50%, rgba(200,255,45,.14), transparent 70%);
    filter: blur(30px);
    z-index: -1;
    animation: heroPulse 5s ease-in-out infinite;
}
@keyframes heroPulse {
    0%, 100% { opacity: .6; transform: scale(1); }
    50%      { opacity: 1;  transform: scale(1.05); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; }   /* en mobile el logo del navbar ya cumple */
}
@media (prefers-reduced-motion: reduce) {
    .hero-visual img,
    .hero-visual::before { animation: none; }
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .9rem;
    background: rgba(200,255,45,.06);
    border: 1px solid rgba(200,255,45,.2);
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
}
.hero-eyebrow .dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .3; transform: scale(1.6); }
}

.hero-title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(3.2rem, 10vw, 8.5rem);
    line-height: .95;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1.25rem;
    max-width: 12ch;
}
.hero-title em {
    font-style: italic;
    color: var(--accent);
    font-family: var(--f-display);
}

.hero-subtitle {
    max-width: 620px;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: var(--text-dim);
    line-height: 1.55;
    margin-bottom: 2.5rem;
}
.hero-subtitle strong { color: var(--text); font-weight: 500; }

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 3.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .85rem 1.5rem;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}
.btn-primary {
    background: var(--accent);
    color: #0b0b0b;
    box-shadow: 0 8px 30px -12px var(--accent);
}
.btn-primary:hover { background: #d9ff4a; transform: translateY(-2px); box-shadow: 0 14px 40px -12px var(--accent); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }

/* Marquee (kinetic tech scroll) */
.marquee {
    position: relative;
    margin-top: 2rem;
    padding: 1.25rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.marquee-track {
    display: inline-flex;
    gap: 3rem;
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    font-family: var(--f-display);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    color: var(--text-dim);
    line-height: 1;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 3rem; }
.marquee-track span::after {
    content: '·';
    color: var(--accent);
    font-family: var(--f-ui);
    font-size: 1.4em;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Section header ────────────────────────────────────────────────────── */
.section {
    padding: clamp(4rem, 8vw, 7rem) 0;
    position: relative;
}
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.section-eyebrow::before {
    content: '';
    width: 24px; height: 1px; background: var(--accent);
}
.section-title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    max-width: 20ch;
}
.section-title em { font-style: italic; color: var(--accent-2); }
.section-lead {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 55ch;
    line-height: 1.65;
    margin-bottom: 3rem;
}
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.section-header-row .section-lead { margin-bottom: 0; }
.section-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .95rem;
    color: var(--text);
    padding: .6rem 0;
    border-bottom: 1px solid var(--border-strong);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
    white-space: nowrap;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }
.section-link .arrow { display: inline-block; transition: transform var(--dur) var(--ease); }
.section-link:hover .arrow { transform: translateX(4px); }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-top: 4rem;
}
.stat-cell {
    background: var(--bg);
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    transition: background var(--dur) var(--ease);
}
.stat-cell:hover { background: var(--bg-elev); }
.stat-num {
    font-family: var(--f-display);
    font-size: clamp(2.8rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: .1rem;
}
.stat-num .plus { color: var(--accent); font-size: .75em; }
.stat-label {
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-top: .4rem;
}

/* Card 4 (stack): en vez del numero gigante, listado de tecnologias como chips */
.stat-cell--stack {
    justify-content: flex-start;
}
.stat-cell--stack .stat-label {
    margin-top: 0;
    margin-bottom: .9rem;
    color: var(--accent);
}
.stat-stack {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0;
    margin: 0;
}
.stat-stack li {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .02em;
    color: var(--text);
    padding: .28rem .55rem;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.stat-cell--stack:hover .stat-stack li { border-color: var(--border-strong); }
.stat-stack li:hover { color: var(--accent); border-color: var(--accent); background: rgba(200,255,45,.06); }

/* ── Bento grid (portfolio featured) ───────────────────────────────────── */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 1.25rem;
}
.bento-item {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
    isolation: isolate;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    min-height: 220px;
    text-decoration: none;
    color: inherit;
}
.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--bg-image);
    filter: saturate(90%);
    opacity: .55;
    transition: opacity var(--dur) var(--ease), transform .6s var(--ease);
    z-index: -2;
}
.bento-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,11,0) 30%, rgba(10,10,11,.9) 100%);
    z-index: -1;
}
.bento-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
}
.bento-item:hover::before { opacity: .8; transform: scale(1.05); }

.bento-item.no-image::before,
.bento-item.no-image::after { display: none; }
.bento-item.no-image {
    background:
        linear-gradient(180deg, rgba(200,255,45,.03), transparent),
        var(--bg-elev);
}

.bento-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--f-mono);
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    padding: .3rem .65rem;
    background: rgba(0,0,0,.5);
    border: 1px solid rgba(200,255,45,.3);
    border-radius: 999px;
    align-self: flex-start;
    margin-bottom: auto;
    backdrop-filter: blur(6px);
}
.bento-title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: .35rem;
    max-width: 22ch;
}
.bento-sub {
    font-size: .9rem;
    color: var(--text-dim);
    max-width: 40ch;
}
.bento-arrow {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 38px; height: 38px;
    background: rgba(0,0,0,.55);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
    color: var(--text);
    font-size: .95rem;
    backdrop-filter: blur(6px);
}
.bento-item:hover .bento-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: #0b0b0b;
    transform: rotate(-45deg);
}

/* Bento layout — asymmetric */
.bento-item.wide { grid-column: span 8; grid-row: span 2; min-height: 460px; }
.bento-item.tall { grid-column: span 4; grid-row: span 2; min-height: 460px; }
.bento-item.reg  { grid-column: span 4; }
.bento-item.med  { grid-column: span 6; }

@media (max-width: 900px) {
    .bento { grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(200px, auto); }
    .bento-item.wide { grid-column: span 6; grid-row: span 1; min-height: 260px; }
    .bento-item.tall { grid-column: span 6; grid-row: span 1; min-height: 260px; }
    .bento-item.reg,
    .bento-item.med  { grid-column: span 3; min-height: 220px; }
}
@media (max-width: 600px) {
    .bento { grid-template-columns: 1fr; }
    .bento-item,
    .bento-item.wide,
    .bento-item.tall,
    .bento-item.reg,
    .bento-item.med { grid-column: span 1; min-height: 240px; }
}

/* ── About strip ───────────────────────────────────────────────────────── */
.about-strip {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(3rem, 6vw, 5rem) 0;
}
.about-body {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: var(--text-dim);
    line-height: 1.7;
}
.about-body p { margin-bottom: 1rem; }
.about-body strong { color: var(--text); font-weight: 500; }
.about-highlight {
    font-family: var(--f-display);
    font-style: italic;
    color: var(--accent);
    font-size: 1.15em;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease);
}
a.about-highlight:hover { border-bottom-color: var(--accent); }

/* Link a Anubis (marca de producto propio) — mantiene el <strong> pero
   marca visualmente que es clickeable. */
.link-anubis {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 2px;
    padding-bottom: 2px;
    transition: color var(--dur) var(--ease), background-size var(--dur) var(--ease);
}
.link-anubis:hover { color: var(--accent); background-size: 100% 100%; padding-bottom: 2px; }
.link-anubis:hover strong { color: #0b0b0b; }
.about-side {
    position: relative;
    padding: 2rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}
.about-side-title {
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.about-portrait {
    position: relative;
    margin: -2rem -2rem 1.5rem;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    isolation: isolate;
}
.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    filter: saturate(0.95) contrast(1.02);
    transition: transform .8s var(--ease), filter .5s var(--ease);
}
.about-side:hover .about-portrait img { transform: scale(1.03); filter: saturate(1.08) contrast(1.05); }
.about-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10,10,11,.7) 100%);
    pointer-events: none;
    z-index: 1;
}
.about-portrait-caption {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.about-portrait-caption .accent { color: var(--accent); }
.about-side ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; font-family: var(--f-mono); font-size: .88rem; color: var(--text-dim); }
.about-side ul li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .7rem; border-bottom: 1px dashed var(--border); }
.about-side ul li:last-child { border-bottom: 0; }
.about-side ul li strong { color: var(--text); font-weight: 500; }
@media (max-width: 800px) {
    .about-strip { grid-template-columns: 1fr; }
}

/* ── Portfolio page (grid completa) ────────────────────────────────────── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.p-card {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
    display: flex;
    flex-direction: column;
}
.p-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.p-card-img {
    aspect-ratio: 16 / 10;
    background: #1c1c20;
    overflow: hidden;
    position: relative;
}
.p-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease);
}
.p-card:hover .p-card-img img { transform: scale(1.06); }
.p-card-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    font-family: var(--f-display);
    font-size: 2.5rem;
    background: linear-gradient(135deg, #1a1a1f 0%, #24242a 100%);
}
.p-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.p-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-mute);
}
.p-card-meta .cat { color: var(--accent); }
.p-card-title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
}
.p-card-sub { font-size: .9rem; color: var(--text-dim); line-height: 1.5; }
.p-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .8rem; }
.tech-tag {
    display: inline-block;
    font-family: var(--f-mono);
    font-size: .7rem;
    color: var(--text-dim);
    padding: .2rem .55rem;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    letter-spacing: .02em;
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2.5rem;
    padding: .5rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 999px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.filter-chip {
    background: transparent;
    color: var(--text-dim);
    border: none;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
    white-space: nowrap;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.is-active { background: var(--accent); color: #0b0b0b; }

/* ── Proyecto detalle ──────────────────────────────────────────────────── */
.p-hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
    position: relative;
}
.p-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-dim);
    font-family: var(--f-mono);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 2.5rem;
    transition: color var(--dur) var(--ease);
}
.p-back:hover { color: var(--accent); }
.p-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    font-family: var(--f-mono);
    font-size: .8rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}
.p-meta-row .dot { color: var(--accent); }
.p-hero-title {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(2.5rem, 7vw, 6rem);
    line-height: .95;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    max-width: 18ch;
}
.p-hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 60ch;
    margin-bottom: 2rem;
}
.p-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.p-body { padding: 3rem 0; }
.p-body-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 800px) {
    .p-body-grid { grid-template-columns: 1fr; }
}
.p-content {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.7;
}
.p-content p { margin-bottom: 1.1rem; }
.p-content h2, .p-content h3 {
    color: var(--text);
    font-family: var(--f-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 2rem 0 1rem;
}
.p-content h2 { font-size: 2rem; }
.p-content h3 { font-size: 1.5rem; }
.p-content a { color: var(--accent); border-bottom: 1px solid rgba(200,255,45,.3); transition: border-color var(--dur) var(--ease); }
.p-content a:hover { border-color: var(--accent); }
.p-content ul, .p-content ol { margin: 1rem 0 1.1rem 1.5rem; }
.p-content li { margin-bottom: .4rem; }
.p-content code { background: var(--bg-elev); font-family: var(--f-mono); font-size: .85em; padding: .1rem .35rem; border-radius: 4px; color: var(--accent); }

.p-side {
    position: sticky;
    top: 90px;
    align-self: start;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.p-side-block h4 {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .7rem;
    font-weight: 600;
}
.p-side-block p { font-size: .95rem; color: var(--text); }
.p-side-block a:not(.p-side-url) { font-size: .95rem; color: var(--text); }
.p-side-block .tech-tag { margin-right: .3rem; margin-bottom: .3rem; }
.p-side-block a.p-side-url,
a.p-side-url {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.1rem;
    background: var(--accent);
    color: #0b0b0b;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
    word-break: break-all;
}
.p-side-block a.p-side-url:hover,
a.p-side-url:hover { transform: translateY(-1px); background: #d9ff4a; color: #0b0b0b; }
.p-side-block a.p-side-url i,
a.p-side-url i { color: #0b0b0b; }

/* Galería de screenshots */
.p-gallery {
    padding: 2rem 0 5rem;
}
.p-gallery-header { margin-bottom: 2rem; }
.p-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}
.p-gallery-item {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    cursor: zoom-in;
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.p-gallery-item:hover { transform: translateY(-3px); border-color: var(--accent); }
.p-gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease);
}
.p-gallery-item:hover img { transform: scale(1.05); }

/* ── Contacto ──────────────────────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    padding: 3rem 0;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.field input, .field textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .85rem 1rem;
    color: var(--text);
    font-family: var(--f-ui);
    font-size: 1rem;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    width: 100%;
}
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,255,45,.15);
}
.field textarea { min-height: 130px; resize: vertical; }

.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
    text-decoration: none;
    color: inherit;
}
.contact-item:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.contact-item .ci-icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(200,255,45,.08);
    color: var(--accent);
    border-radius: 999px;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-item .ci-label {
    font-family: var(--f-mono);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-mute);
    margin-bottom: .2rem;
    display: block;
}
.contact-item .ci-value { color: var(--text); font-size: .98rem; word-break: break-word; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.alert-success {
    background: rgba(200,255,45,.08);
    border: 1px solid rgba(200,255,45,.25);
    color: var(--accent);
}
.alert-error {
    background: rgba(255,107,71,.08);
    border: 1px solid rgba(255,107,71,.3);
    color: var(--accent-2);
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
    padding: clamp(3rem, 6vw, 5rem) 0 2rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand h3 {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 2.2rem;
    letter-spacing: -0.01em;
    line-height: 1;
    margin-bottom: .75rem;
}
.footer-logo {
    display: block;
    height: 82px;
    width: auto;
    max-width: 300px;
    margin-bottom: 1rem;
    object-fit: contain;
}
.footer-brand p { color: var(--text-dim); max-width: 40ch; font-size: .95rem; }
.footer-col h4 {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: var(--text-dim); font-size: .95rem; transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--f-mono);
    font-size: .78rem;
    color: var(--text-mute);
    letter-spacing: .04em;
}
.footer-bottom a { color: var(--text-dim); transition: color var(--dur) var(--ease); }
.footer-bottom a:hover { color: var(--accent); }
.footer-socials { display: flex; gap: .5rem; }
.footer-socials a {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
    font-size: .95rem;
}
.footer-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 800px) {
    .footer-top { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Scroll reveal ─────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track { animation: none; }
    * { transition: none !important; animation: none !important; }
}

/* ── Lightbox (from CEC_MonteBuey pattern, adapted to dark) ────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,6,7,.96);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn .3s ease;
    backdrop-filter: blur(6px);
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-stage {
    position: relative;
    max-width: 92vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    max-width: 100%;
    max-height: 82vh;
    display: block;
    box-shadow: 0 30px 90px rgba(0,0,0,.7);
    border-radius: 6px;
    animation: zoomIn .3s var(--ease);
}
.lightbox-close, .lightbox-nav {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
    backdrop-filter: blur(4px);
}
.lightbox-close { position: absolute; top: 20px; right: 20px; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); border-color: var(--accent); color: #0b0b0b; }
.lightbox-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: var(--f-mono);
    font-size: .85rem;
    background: rgba(0,0,0,.6);
    padding: .5rem 1rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: .75rem;
}
.lightbox-counter { color: var(--accent); }
.lightbox-target { cursor: zoom-in; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ── Page banner (proyectos.php etc.) ──────────────────────────────────── */
.page-banner {
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-banner .section-eyebrow { margin-bottom: 1.25rem; }
.page-banner h1 {
    font-family: var(--f-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    max-width: 20ch;
}
.page-banner h1 em { font-style: italic; color: var(--accent); }
.page-banner p { max-width: 55ch; color: var(--text-dim); font-size: 1.05rem; line-height: 1.6; }

/* ── Utility ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 1rem; }
.mt-2  { margin-top: 2rem; }
.mt-3  { margin-top: 3rem; }

/* Pagination */
.pagination { display: flex; gap: .35rem; justify-content: center; margin: 3rem 0 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: .55rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-dim);
    font-family: var(--f-mono);
    font-size: .85rem;
    text-decoration: none;
    transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .curr { background: var(--accent); color: #0b0b0b; border-color: var(--accent); }
