/* Main Stylesheet — Barbosa Design System (Marine + Studio) */
/* --- inlined: fonts.css --- */
/* Self-hosted variable fonts en WOFF2 con subset Latin. Era 2.4 MB
   TTF cada una (~7 MB total, LCP catastrófico ~17s en 4G). Subset
   Latin + WOFF2 → ~22 KB cada una (~67 KB total). format('woff2-variations')
   le dice al browser que es una variable font WOFF2 — todos los
   navegadores modernos lo soportan desde 2018. */

/* Bricolage Grotesque — variable (opsz + wdth + wght). Display font. */
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('/assets/fonts/BricolageGrotesque-Variable.woff2') format('woff2-variations'),
         url('/assets/fonts/BricolageGrotesque-Variable.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* JetBrains Mono — variable (wght). Reserved for real code. */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/fonts/JetBrainsMono-Variable.woff2') format('woff2-variations'),
         url('/assets/fonts/JetBrainsMono-Variable.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/fonts/JetBrainsMono-Italic-Variable.woff2') format('woff2-variations'),
         url('/assets/fonts/JetBrainsMono-Italic-Variable.woff2') format('woff2');
    font-weight: 100 800;
    font-style: italic;
    font-display: swap;
}

/* --- inlined: tokens.css --- */
/* ============================================================
   Barbosa Design Tokens — Marine palette + Studio type
   Dark-first; light mode via .light or prefers-color-scheme.
   HSL channel tokens, consumed via hsl(var(--x)).
   ============================================================ */

:root,
:root.dark {
    color-scheme: dark;

    /* ---------- HSL channel tokens (Marine) ---------- */
    --background: 195 21% 7%;
    --foreground: 171 18% 92%;
    --card: 191 20% 11%;
    --card-foreground: 171 18% 92%;
    --popover: 191 20% 11%;
    --popover-foreground: 171 18% 92%;

    --primary: 173 30% 52%;
    --primary-foreground: 195 21% 7%;
    --primary-deep: 174 39% 39%;

    --secondary: 187 17% 14%;
    --secondary-foreground: 171 18% 92%;

    --muted: 187 17% 20%;
    --muted-foreground: 172 10% 58%;

    --accent: 173 30% 52%;
    --accent-foreground: 195 21% 7%;

    --destructive: 0 70% 55%;
    --destructive-foreground: 171 18% 92%;

    --border: 187 17% 20%;
    --input: 187 17% 20%;
    --ring: 173 30% 52%;
}

:root.light,
.light {
    color-scheme: light;

    --background: 37 25% 90%;
    --foreground: 187 13% 12%;
    --card: 40 21% 86%;
    --card-foreground: 187 13% 12%;
    --popover: 40 21% 86%;
    --popover-foreground: 187 13% 12%;

    --primary: 173 42% 30%;
    --primary-foreground: 37 25% 90%;
    --primary-deep: 174 48% 24%;

    --secondary: 40 14% 80%;
    --secondary-foreground: 187 13% 12%;

    --muted: 44 8% 73%;
    --muted-foreground: 173 9% 39%;

    --accent: 173 42% 30%;
    --accent-foreground: 37 25% 90%;

    --destructive: 0 60% 45%;
    --destructive-foreground: 37 25% 90%;

    --border: 44 8% 73%;
    --input: 44 8% 73%;
    --ring: 173 42% 30%;
}

/* Auto-switch a light por prefers-color-scheme: ELIMINADO.
   El sitio se diseñó dark-only. Antes había un @media
   (prefers-color-scheme: light) que aplicaba tokens light si el SO
   reportaba light preference. iOS Safari hacía saltos visibles entre
   dark↔light que el usuario percibía como "el tema salta a light".
   La clase `.light` (rule arriba) sigue disponible para opt-in
   explícito si en algún momento se quiere ofrecer toggle de tema. */

:root {
    /* ---------- Geometry ---------- */
    --radius: 0.75rem;
    --radius-sm: 6px;
    --radius-md: 12px;

    /* ---------- Gradients ---------- */
    --gradient-primary: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-deep)) 100%);
    --gradient-subtle: linear-gradient(180deg, hsl(var(--card)) 0%, hsl(var(--background)) 100%);
    --gradient-text:   linear-gradient(to right, hsl(var(--primary)), hsl(var(--primary-deep)));

    /* ---------- Shadows ---------- */
    --shadow-glow:  0 0 60px -15px hsl(var(--primary) / 0.30);
    --shadow-card:  0 4px 30px -10px hsl(0 0% 0% / 0.45);
    --shadow-sm:    0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md:    0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
    --shadow-lg:    0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);

    --halo-color: hsl(var(--primary) / 0.18);

    /* ---------- Motion ---------- */
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast: 150ms;
    --dur-base: 300ms;
    --dur-slow: 800ms;
    --transition-fast: 0.2s ease-in-out;

    /* ---------- Type — Studio (Bricolage + JetBrains Mono) ---------- */
    --font-sans:    "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Bricolage Grotesque", system-ui, sans-serif;
    --font-main:    var(--font-sans);
    --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;
    --text-7xl:  4.5rem;
    --text-8xl:  6rem;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* ---------- Layout ---------- */
    --container-width: 1400px;

    /* ---------- Legacy variable aliases ----------
       Older component CSS in this theme references the previous palette
       variable names. Map them to the new HSL tokens so nothing breaks
       while components migrate. */
    --bg-color:        hsl(var(--background));
    --bg-surface:      hsl(var(--card));
    --bg-elevated:     hsl(var(--secondary));
    --card-bg:         hsl(var(--card));
    --code-bg:         hsl(var(--secondary));

    --text-color:      hsl(var(--foreground));
    --text-secondary:  hsl(var(--muted-foreground));
    --text-muted:      hsl(var(--muted-foreground));
    --accent-color:    hsl(var(--muted-foreground));

    --primary-color:   hsl(var(--primary));
    --primary-light:   hsl(var(--primary));
    --primary-dark:    hsl(var(--primary-deep));
    --primary-glow:    hsl(var(--primary) / 0.12);

    --border-color:    hsl(var(--border));

    --color-success:   hsl(155 50% 30%);
    --color-warning:   hsl(28 70% 45%);
    --color-error:     hsl(0 65% 45%);
    --color-info:      hsl(var(--primary));
    --secondary-color: hsl(var(--primary-deep));

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    --timeline-dot-bg: hsl(var(--primary));
}

/* --- inlined: buttons.css --- */
/* Buttons — Studio: Bricolage, -0.012em, radius 10px */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.012em;
    border-radius: 10px;
    text-decoration: none;
    transition: all var(--dur-base) var(--ease-standard);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    background: hsl(var(--primary-deep));
    color: hsl(var(--primary-foreground));
    text-decoration: none;
}

.btn-outline,
.btn-ghost {
    background: transparent;
    border-color: hsl(var(--foreground) / 0.38);
    color: hsl(var(--foreground));
}
.btn-outline:hover,
.btn-ghost:hover {
    background: hsl(var(--foreground) / 0.06);
    border-color: hsl(var(--foreground) / 0.7);
    color: hsl(var(--foreground));
    text-decoration: none;
}

.btn-danger {
    background: var(--color-error);
    color: #fff;
}
.btn-danger:hover {
    background: #B83232;
    color: #fff;
    text-decoration: none;
}

.btn .arrow {
    transition: transform var(--dur-base) var(--ease-standard);
}
.btn:hover .arrow {
    transform: translate(2px, -2px);
}

/* --- inlined: cards.css --- */
/* Componentes de Tarjetas (Cards) */

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Project Cards Specifics */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.7;
}

.project-header {
    border-bottom: none;
    padding-bottom: 1rem;
}

.project-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-role {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.project-body {
    font-size: 0.95rem;
    color: var(--text-color);
    /* Was muted, but description needs readability */
    line-height: 1.6;
    flex-grow: 1;
}

.project-body p {
    margin-bottom: 0;
}

/* Project Card as Link */
a.project-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.project-card:hover {
    text-decoration: none;
}

a.project-card:hover .project-title {
    color: var(--color-info);
}

/* Technology Tags */
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--primary-glow);
    color: var(--primary-color);
    border: 1px solid rgba(13, 162, 231, 0.25);
    border-radius: 4px;
    white-space: nowrap;
}

/* Project Card Footer */
.project-card-footer {
    margin-top: auto;
}

/* Status Badges */
.status-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 600;
}

.status-active {
    background: rgba(39, 103, 73, 0.15);
    color: var(--color-success);
}

.status-completed {
    background: rgba(160, 174, 192, 0.15);
    color: var(--accent-color);
}


/* Grid 3 columns for landing */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

/* ============================================================
   Projects index page — per design handoff
   (ui_kits/web/Projects.jsx ProjectsPage + ProjectCard).
   ============================================================ */
.projects-page {
    position: relative;
    background: hsl(var(--background));
}
.projects-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 120px 0 80px;
}
.projects-hero__inner {
    position: relative;
    z-index: 2;
}
.projects-h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.038em;
    font-variation-settings: "opsz" 96;
    color: hsl(var(--foreground));
    margin: 16px 0 0;
    max-width: 880px;
}
.projects-hero__lede {
    max-width: 620px;
    margin-top: 24px;
}
.projects-hero__lede strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

.projects-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 22px;
    border-bottom: 1px solid hsl(var(--border));
}
.projects-section-head__title {
    margin-top: 8px;
}
.projects-section-head__count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex: 0 0 auto;
}
.projects-section-head__num {
    font-family: var(--font-mono);
    font-size: 22px;
    color: hsl(var(--primary));
    line-height: 1;
    letter-spacing: -0.02em;
}
.projects-section-head__label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 720px) {
    .projects-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Project card (BEM, surface chrome) ---------- */
.project-card {
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.project-card--link:hover { text-decoration: none; color: inherit; }
.project-card__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.project-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.022em;
    line-height: 1.25;
    color: hsl(var(--foreground));
    margin: 0;
    font-variation-settings: "opsz" 28;
}
.project-card__role {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.02em;
}
.project-card__role .at { color: hsl(var(--border)); margin: 0 2px; }
.project-card__body {
    color: hsl(var(--muted-foreground));
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: -0.005em;
    margin: 0;
    flex: 1;
}
.project-card__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.project-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid hsl(var(--border) / 0.5);
}
.project-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    transition: color var(--dur-base) var(--ease-standard);
}
.project-card--link:hover .project-card__cta { color: hsl(var(--primary)); }
.project-card--link:hover .project-card__cta .arrow {
    transform: translate(2px, -2px);
}

@media (max-width: 640px) {
    .projects-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .projects-section-head__count { align-items: flex-start; }
}

/* --- inlined: hero.css --- */
/* Hero — Marine: halo-ellipse + grain overlay, wordmark with teal dot */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    padding: 96px 0;
}

/* Marine depth motif — radial halo behind the wordmark */
.halo-ellipse {
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 160%;
    background: radial-gradient(ellipse at 50% 35%, hsl(var(--primary) / 0.18), transparent 65%);
    z-index: 0;
    pointer-events: none;
}
.halo-ellipse.animate-pulse-glow {
    animation: pulse-glow 6s ease-in-out infinite;
}

/* Procedural grain overlay — paper-texture feel */
.grain-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.08;
    mix-blend-mode: overlay;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
    max-width: 1024px;
    margin: 0 auto;
}

/* Wordmark — Bricolage 700, tight tracking, teal closing dot */
.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.042em;
    color: hsl(var(--foreground));
    font-variation-settings: "opsz" 96;
    display: inline-flex;
    align-items: baseline;
    line-height: 1;
}
.wordmark .dot {
    color: hsl(var(--primary));
    font-weight: 800;
    margin-left: 0.04em;
    transform: translateY(-0.02em);
    display: inline-block;
}

.hero h1.wordmark {
    font-size: clamp(3rem, 9vw, 6.5rem);
    margin: 28px 0;
    justify-content: center;
}

/* Pill eyebrow — bullet + uppercase tracking, no pill chrome */
.pill-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: hsl(var(--primary));
}
.pill-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: hsl(var(--primary));
    flex: 0 0 auto;
}

/* Hero lede — serif Bricolage 500, mixes foreground / muted / primary */
.hero-lede {
    max-width: 640px;
    margin: 0 auto 48px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.125rem, 1.7vw, 1.4rem);
    line-height: 1.35;
    letter-spacing: -0.022em;
    color: hsl(var(--foreground));
    font-variation-settings: "opsz" 36;
}
.hero-lede .mut { color: hsl(var(--muted-foreground)); }
.hero-lede .accent {
    color: hsl(var(--primary));
    font-weight: 600;
}
.hero-lede .strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Scroll cue */
.scroll-indicator {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    z-index: 3;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: opacity 0.4s ease;
}
.scroll-indicator:hover {
    color: hsl(var(--foreground));
    text-decoration: none;
}
.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}
.scroll-indicator .chev {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50%      { transform: none;             animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.65; }
    50%      { opacity: 1; }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
    }
    .hero h1.wordmark {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}

/* --- inlined: sections.css --- */
/* ============================================================
   Section primitives — Marine + Studio
   Eyebrow, surface card, concept image, accordion, grids
   ============================================================ */

/* Section padding rhythm — generous vertical room */
.section {
    position: relative;
    padding: 96px 0;
}
@media (min-width: 768px) {
    .section {
        padding: 128px 0;
    }
}
.section .inner {
    padding-inline: 24px;
    max-width: 1024px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .section .inner {
        padding-inline: 48px;
    }
}
.section--alt {
    background: hsl(var(--secondary) / 0.30);
}

/* Eyebrow — Studio system (sans, wide tracking) */
.eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

/* ============================================================
   Display type utilities — Studio system (per design handoff
   project/colors_and_type.css). The system is utility-driven:
   any <h*> picks its size by applying .h1 / .h2, NOT by sitting
   under a scoping selector. Removing the previous `.section h2`
   rule was the root fix for headings rendering too small.
   ============================================================ */
.h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.875rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    font-variation-settings: "opsz" 64;
    color: hsl(var(--foreground));
    margin: 0;
}
.h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 36;
    color: hsl(var(--foreground));
    margin: 0;
}

/* Teal closing-dot / accent span — used across headings, the wordmark,
   anywhere a Marine accent reads well. Scoped overrides (e.g.
   `.wordmark .dot`) still win for positional tweaks. */
.dot,
.accent { color: hsl(var(--primary)); }

/* Section primer — serif Bricolage 500, sits under headline */
.section-primer {
    max-width: 640px;
    margin: 0 0 48px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1875rem;
    line-height: 1.4;
    letter-spacing: -0.018em;
    color: hsl(var(--muted-foreground));
    font-variation-settings: "opsz" 32;
}
.section-primer .strong { color: hsl(var(--foreground)); font-weight: 600; }
.section-primer .accent { color: hsl(var(--primary)); font-weight: 600; }

/* Text gradient — used sparingly */
.text-gradient {
    background-image: var(--gradient-text);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

/* ============================================================
   Surface card
   ============================================================ */
.surface {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: border-color var(--dur-base) var(--ease-standard);
    overflow: hidden;
    /* Flex-column so `.card-body--lg { flex: 1 }` can grow and anchor the
       pill to the bottom (services index pattern). Expertise cards are
       fine too — their body doesn't claim flex. */
    display: flex;
    flex-direction: column;
}
.surface-hover:hover {
    border-color: hsl(var(--primary) / 0.5);
}

/* Card body — dense (expertise/home cards: padding 22, h3 17) vs
   large (service-index cards: padding 28, h3 22 + pill anchored to
   bottom via flex). Faltaba en el SSG: el padding se aplicaba inline
   en los templates antiguos; al pasar a data-driven se quedó sin
   estilos hasta este commit. */
.surface .card-body {
    padding: 22px;
}
.surface .card-body--lg {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.surface .card-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.022em;
    line-height: 1.25;
    margin: 0 0 8px;
    font-variation-settings: "opsz" 24;
    color: hsl(var(--foreground));
}
.surface .card-body--lg h3 {
    font-size: 22px;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 36;
}
.surface .card-body p {
    color: hsl(var(--muted-foreground));
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    margin: 0;
}
.surface .card-body--lg p {
    font-size: 14.5px;
    margin-bottom: 16px;
}
.surface .card-body--lg .pill-format {
    align-self: flex-start;
    margin-top: auto;
}

/* ============================================================
   Concept image — replaces the icon badge on expertise + service cards
   Photo at /assets/images/cards/<slug>.jpg overrides the wash placeholder.
   ============================================================ */
.concept-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    isolation: isolate;
}
.concept-image .wash {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.concept-image .grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0.18;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.concept-image .frame {
    position: absolute;
    inset: 12px;
    border: 1px solid hsl(var(--foreground) / 0.10);
    border-radius: 6px;
    z-index: 3;
    pointer-events: none;
}
.concept-image .num {
    position: absolute;
    right: 16px;
    top: 14px;
    z-index: 4;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: hsl(var(--foreground) / 0.50);
}
.concept-image .tag {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 4;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    color: hsl(var(--foreground) / 0.78);
    text-transform: lowercase;
}
.concept-image .tag span { color: hsl(var(--primary)); }

/* Photo override — image takes the card when present */
/* .ci-photo-wrap es el <picture> contenedor — display:contents lo hace
   transparente al flow, así el <img> hijo sigue siendo positioned-absolute
   sobre .concept-image como antes. */
.concept-image .ci-photo-wrap {
    display: contents;
}
.concept-image .ci-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
}
.concept-image:has(.ci-photo) > .wash,
.concept-image:has(.ci-photo) > .grain,
.concept-image:has(.ci-photo) > .frame,
.concept-image:has(.ci-photo) > .num,
.concept-image:has(.ci-photo) > .tag { display: none; }

/* Wash variants — derived from Marine */
.wash-cloud     { background: linear-gradient(135deg, hsl(186 26% 22%) 0%, hsl(190 30% 14%) 70%, hsl(195 21% 8%) 100%); }
.wash-shield    { background: linear-gradient(150deg, hsl(173 28% 35%) 0%, hsl(180 22% 22%) 60%, hsl(190 22% 13%) 100%); }
.wash-users     { background: linear-gradient(120deg, hsl(35 14% 26%) 0%, hsl(28 12% 18%) 60%, hsl(195 21% 9%) 100%); }
.wash-code      { background: linear-gradient(160deg, hsl(195 24% 18%) 0%, hsl(187 22% 12%) 70%, hsl(195 21% 7%) 100%); }
.wash-server    { background: linear-gradient(135deg, hsl(173 32% 30%) 0%, hsl(180 26% 18%) 60%, hsl(190 22% 10%) 100%); }
.wash-chart     { background: linear-gradient(110deg, hsl(35 18% 22%) 0%, hsl(195 22% 14%) 70%, hsl(195 21% 8%) 100%); }
.wash-briefcase { background: linear-gradient(140deg, hsl(190 30% 22%) 0%, hsl(173 28% 18%) 60%, hsl(195 21% 8%) 100%); }
.wash-cpu       { background: linear-gradient(120deg, hsl(180 24% 28%) 0%, hsl(195 22% 14%) 60%, hsl(195 21% 7%) 100%); }
.wash-audit     { background: linear-gradient(160deg, hsl(35 14% 24%) 0%, hsl(190 24% 14%) 60%, hsl(195 21% 8%) 100%); }
.wash-rocket    { background: linear-gradient(135deg, hsl(173 36% 32%) 0%, hsl(186 28% 18%) 60%, hsl(195 21% 8%) 100%); }
.wash-tailor    { background: linear-gradient(125deg, hsl(196 22% 26%) 0%, hsl(180 22% 16%) 60%, hsl(195 21% 8%) 100%); }

/* Inline procedural grain for concept-image cards */
.concept-image .grain-svg,
.grain-overlay-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================
   Grids
   ============================================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; gap: 48px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Card body — typography for expertise / service cards
   ============================================================ */
.card-body {
    padding: 22px;
}
.card-body--lg {
    padding: 28px;
}
.card-body h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -0.022em;
    margin-bottom: 8px;
    font-variation-settings: "opsz" 28;
    color: hsl(var(--foreground));
}
.card-body--lg h3 {
    font-size: 22px;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    font-variation-settings: "opsz" 36;
}
.card-body p {
    color: hsl(var(--muted-foreground));
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    font-family: var(--font-sans);
}
.card-body--lg p {
    font-size: 14.5px;
    margin-bottom: 16px;
}

/* Service format pill */
.pill-format {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    background: hsl(var(--primary) / 0.12);
    border: 1px solid hsl(var(--primary) / 0.30);
    color: hsl(var(--primary));
}

/* ============================================================
   Accordion — FAQ
   ============================================================ */
.accordion {
    max-width: 768px;
    margin: 0 auto;
}
.accordion-item {
    border-bottom: 1px solid hsl(var(--border));
}
.accordion-item summary,
.accordion-item .accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 0;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.005em;
    color: hsl(var(--foreground));
    list-style: none;
    background: none;
    border: 0;
    text-align: left;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after,
.accordion-item .accordion-trigger .chev {
    content: '';
    display: inline-flex;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat center / contain;
    color: hsl(var(--muted-foreground));
    transition: transform var(--dur-base) var(--ease-standard);
    flex-shrink: 0;
}
.accordion-item:hover summary,
.accordion-item:hover .accordion-trigger {
    color: hsl(var(--primary));
}
.accordion-item[open] summary::after {
    transform: rotate(180deg);
    color: hsl(var(--primary));
}
.accordion-item .accordion-body,
.accordion-item p {
    font-size: 14.5px;
    color: hsl(var(--muted-foreground));
    padding-bottom: 18px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    font-family: var(--font-sans);
}
.accordion-item p {
    margin: 0;
    padding: 0 0 18px;
}

/* ============================================================
   Page header (servicios / about subroute)
   ============================================================ */
.page-header {
    padding: 22px 24px;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
}
@media (min-width: 768px) {
    .page-header { padding: 22px 48px; }
}
.page-header .back {
    font-size: 13px;
    letter-spacing: -0.005em;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-standard);
}
.page-header .back:hover {
    color: hsl(var(--primary));
}

/* Lockup — mini-monogram HB + wordmark */
.lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.mini-mono {
    position: relative;
    width: 22px;
    height: 22px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -0.06em;
    font-variation-settings: "opsz" 24;
    flex: 0 0 auto;
}
.mini-mono .h { position: absolute; top: 0; left: 0; color: hsl(var(--foreground)); }
.mini-mono .b { position: absolute; top: 0; left: 10px; color: hsl(var(--primary)); }
.lockup .word {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
}
.lockup .word .dot { color: hsl(var(--primary)); }

/* --- inlined: about.css --- */
/* ============================================================
   About page — credenciales / curriculum
   Metro-line timeline + git-graph bifurcation, stat strip, chip cloud
   ============================================================ */

.about-page {
    position: relative;
    background: hsl(var(--background));
}

/* Section padding rhythm lives in components/sections.css (.section).
   The about-hero gets its own padding because it leads the page. */

/* ----- Intro hero ----- */
.about-hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    isolation: isolate;
}
.about-hero-inner {
    position: relative;
    z-index: 2;
}
.about-hero .halo-ellipse {
    inset: -10% -10% auto auto;
    width: 70%;
    height: 130%;
}
.about-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.038em;
    margin-bottom: 24px;
    font-variation-settings: "opsz" 96;
    color: hsl(var(--foreground));
}
.about-hero h1 .dot { color: hsl(var(--primary)); }

/* .lede — utility used by the about-hero. Mirror of the design's
   colors_and_type .lede: muted-foreground prose at text-lg, tighter
   tracking, opsz 24. The `.about-hero__lede` modifier adds max-width
   and the top margin specific to the credentials page. */
.lede {
    font-size: var(--text-lg);
    line-height: 1.5;
    letter-spacing: -0.012em;
    color: hsl(var(--muted-foreground));
    font-variation-settings: "opsz" 24;
}
.about-hero__lede {
    max-width: 640px;
    margin-top: 24px;
}
.about-hero__lede strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

/* Legacy .about-hero .lead — kept for any straggler markup; new copy
   uses .lede above. */
.about-hero .lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.125rem, 1.75vw, 1.4rem);
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    max-width: 720px;
    font-variation-settings: "opsz" 36;
}
.about-hero .lead .mut { color: hsl(var(--muted-foreground)); }

/* Stat strip — numeric proof */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 48px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid hsl(var(--border));
    width: max-content;
    max-width: 100%;
}
@media (max-width: 640px) {
    .stat-strip {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}
.stat-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 56px;
    line-height: 1;
    letter-spacing: -0.05em;
    color: hsl(var(--primary));
    font-variation-settings: "opsz" 96;
}
.stat-unit {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-top: 6px;
    max-width: 12ch;
    line-height: 1.4;
}

/* Anchor sub-navigation */
.about-anchors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 36px;
}
.about-anchors a {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease-standard);
}
.about-anchors a:hover {
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.4);
}

/* ----- About section heading ----- */
.about-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
    padding-bottom: 22px;
    border-bottom: 1px solid hsl(var(--border));
}
.about-section-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.875rem, 3.5vw, 2.75rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
    font-variation-settings: "opsz" 64;
    margin: 0;
}
.about-section-head h2 .dot { color: hsl(var(--primary)); }
.about-section-head .index {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
}

/* ============================================================
   Timeline — metro-line with git-graph bifurcation
   ============================================================ */
.timeline {
    position: relative;
    padding-block: 12px;
}

/* The metro line — `top` y `bottom` los mide el JS de about.ejs en
   función del centro del primer y último .timeline-item (offsetTop +
   offsetHeight/2 / rail.offsetHeight - lastCenter). El fallback 36px
   cubre el render inicial antes de que el observer dispare.
   Geometría: rail centrado en el gap del grid (140px col + 28px gap =
   contenido inicia en 168px, rail en x=154 = mitad del gap). */
.timeline::before {
    content: "";
    position: absolute;
    left: 154px;
    top: var(--rail-top, 36px);
    bottom: var(--rail-bottom, 36px);
    width: 2px;
    background: linear-gradient(
        hsl(var(--primary)) 0%,
        hsl(var(--primary)) 8%,
        hsl(var(--primary) / 0.35) 30%,
        hsl(var(--primary) / 0.20) 100%
    );
    border-radius: 999px;
    z-index: 0;
}

/* Timeline-item alineado al sistema .stack-row: misma grid
   (140px 1fr, gap 28). Esto garantiza que la columna de label
   (date / stack-cat) y la de contenido terminen en los mismos
   x-coordinates en ambas secciones. align-items se mantiene en
   `center` aquí (Timeline tiene cards con altura mucho mayor que la
   del date — baseline las dejaría mal alineadas). */
.timeline-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    padding: 18px 0;
    position: relative;
    z-index: 1;
    align-items: center;
}

/* Station marker — hollow ring, centered en el rail (x=154 → bullet
   14px en left=147) y vertical-center contra la card via top:50%. */
.timeline-item::before {
    content: "";
    position: absolute;
    left: 147px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: hsl(var(--background));
    border: 2px solid hsl(var(--primary) / 0.55);
    z-index: 2;
    transition: all var(--dur-base) var(--ease-standard);
}

/* Current station — filled "you are here" marker.
   Scoped a `.is-now` (emitido por la plantilla cuando frontmatter
   item.isNow === true), no a `:first-child`. Bullet 18px → left = 154 - 9 = 145. */
.timeline-item.is-now::before {
    width: 18px;
    height: 18px;
    left: 145px;
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.18);
}

.timeline-item:hover::before {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.15);
}
.timeline-item.is-now:hover::before {
    background: hsl(var(--primary));
}

/* Modifier para timelines donde TODOS los nodos son "activos" — usado
   en Certificaciones (cada cert = logro adquirido y vigente). Aplica
   el mismo tratamiento que .is-now (bullet 18px filled + glow ring 4px)
   a todos los .timeline-item. No incluye el shift de -2px en `left`
   que usa .is-now porque aquí TODOS son grandes y la simetría se
   mantiene con el rail centrado. */
.timeline--all-active .timeline-item::before {
    width: 18px;
    height: 18px;
    left: 145px;
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.18);
}
.timeline--all-active .timeline-item:hover::before {
    background: hsl(var(--primary));
}

/* Git-graph bifurcation (.is-branch) — REMOVED. Aportaba complejidad
   sin valor visual claro y rompía el alineamiento del primer bullet
   en mobile. Timeline ahora es una metro line recta de bullet a
   bullet sin ramas. */

/* Date label — alineado con .stack-cat (mono 11px / 0.14em / uppercase). */
.timeline-date {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}
.timeline-date .now {
    color: hsl(var(--primary));
    font-weight: 500;
}

.timeline-content {
    margin-left: 24px;
    padding: 22px 24px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: border-color var(--dur-base) var(--ease-standard);
}
.timeline-item:hover .timeline-content {
    border-color: hsl(var(--primary) / 0.35);
}

.timeline-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.timeline-logo {
    width: 112px;
    height: 112px;
    border-radius: 14px;
    background: rgb(255, 254, 255);
    border: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 14px;
}
.timeline-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.timeline-logo.no-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    color: hsl(187 13% 12%);
    padding: 0;
}

.timeline-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.022em;
    color: hsl(var(--foreground));
    line-height: 1.3;
    font-variation-settings: "opsz" 24;
}
.timeline-title .at {
    color: hsl(var(--muted-foreground));
    font-weight: 400;
}

.timeline-desc {
    font-size: 14px;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
    letter-spacing: -0.005em;
    max-width: 640px;
}
.timeline-desc strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

/* Mobile — single column, trunk hugs the left edge */
@media (max-width: 720px) {
    .timeline::before { left: 6px; }
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-left: 28px;
    }
    .timeline-item::before {
        left: 0;
        top: 50%;
    }
    .timeline-item.is-now::before {
        left: -2px;
        top: 50%;
    }
    /* Modifier "all-active" (Certificaciones) — el desktop usa left:145px
       para alinear contra el rail centrado a x=154. En mobile el rail
       está pegado a la izquierda (left:6px), así que el bullet (18px)
       debe alinearse a left:-2px igual que .is-now. */
    .timeline--all-active .timeline-item::before {
        left: -2px;
        top: 50%;
    }
    .timeline-content {
        margin-left: 0;
        padding: 16px 18px;
    }
    .timeline-logo {
        width: 72px;
        height: 72px;
        padding: 10px;
    }
    .timeline-logo.no-logo {
        font-size: 28px;
    }
}

/* ============================================================
   Stack — category + chip cloud
   ============================================================ */
.stack-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.stack-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 28px;
    align-items: baseline;
    padding: 18px 0;
    border-top: 1px solid hsl(var(--border));
}
.stack-row:first-child {
    border-top: 0;
    padding-top: 4px;
}
.stack-cat {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}
.stack-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stack-chip {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.005em;
    padding: 6px 12px;
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    color: hsl(var(--foreground));
    background: hsl(var(--card));
    transition: all var(--dur-fast) var(--ease-standard);
}
.stack-chip:hover {
    border-color: hsl(var(--primary) / 0.4);
    color: hsl(var(--primary));
}
@media (max-width: 640px) {
    .stack-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ============================================================
   Jump-bar — anchors del intro de Sobre mí (3 columnas).
   Reemplaza la .about-anchors antigua (pills uppercase) por una
   grid rica con num + plus icon + label + meta. Underline animado
   en hover, rotación del + a × ligera, sweep horizontal del icono.
   ============================================================ */
.anchors-bar {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
    border-top: 1px solid hsl(var(--border));
}
.jb {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: center;
    padding: 18px 26px 18px 0;
    border-bottom: 1px solid hsl(var(--border));
    text-decoration: none;
    color: hsl(var(--foreground));
    position: relative;
    transition: padding var(--dur-base) var(--ease-standard);
}
.jb + .jb {
    padding-left: 26px;
    border-left: 1px solid hsl(var(--border));
}
.jb::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: hsl(var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-standard);
}
.jb:hover::after,
.jb:focus-visible::after { transform: scaleX(1); }
.jb:focus-visible { outline: none; }
.jb:hover { text-decoration: none; color: hsl(var(--foreground)); }

.jb-num {
    grid-column: 1; grid-row: 1;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: hsl(var(--muted-foreground));
}
.jb-arr {
    grid-column: 2; grid-row: 1 / span 3;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    color: hsl(var(--primary));
    transition: transform var(--dur-base) var(--ease-standard),
                color var(--dur-base) var(--ease-standard);
}
.jb-arr__plus {
    display: block;
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    transition: transform var(--dur-base) var(--ease-standard);
}
.jb:hover .jb-arr,
.jb:focus-visible .jb-arr { transform: translateX(3px); }
.jb:hover .jb-arr__plus,
.jb:focus-visible .jb-arr__plus { transform: rotate(90deg); }

.jb-label {
    grid-column: 1; grid-row: 2;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 21px;
    letter-spacing: -0.025em;
    line-height: 1.05;
    font-variation-settings: "opsz" 32;
    color: hsl(var(--foreground));
}
.jb-meta {
    grid-column: 1 / span 2; grid-row: 3;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.01em;
    color: hsl(var(--muted-foreground));
    margin-top: 4px;
}
.jb-meta .sep {
    color: hsl(var(--border));
    margin: 0 6px;
}
/* Todas las metas del jump-bar usan flex space-between para distribuir
   sus ítems entre los extremos del bloque:
   - 1 ítem  → queda a la izquierda (default flex con un solo hijo).
   - 2 ítems → uno a la izq, otro a la der.
   - 3 ítems → start / center / end ("16 años · 7 puestos · 5 empresas").
   El separador `·` se oculta porque flex se encarga del spacing. */
.anchors-bar .jb-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.anchors-bar .jb-meta .sep {
    display: none;
}
@media (max-width: 720px) {
    .anchors-bar {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .jb + .jb {
        padding-left: 0;
        border-left: 0;
    }
}

/* --- inlined: home.css --- */
/* ============================================================
   Home page — Marine + Studio
   Estilos extraídos de los inline styles para que home.ejs sea
   100% plantilla de datos (sin styling decisions).
   ============================================================ */

/* ----- Intro / Sobre mí ----- */
.intro-headline {
    margin-top: 12px;
    margin-bottom: 32px;
    max-width: 720px;
}
.intro-grid {
    margin-top: 48px;
}
.intro-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.intro-col p {
    color: hsl(var(--muted-foreground));
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    margin: 0;
}
.intro-col p:first-child {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 19px;
    line-height: 1.4;
    letter-spacing: -0.018em;
    color: hsl(var(--foreground));
    font-variation-settings: "opsz" 32;
}
.intro-col p strong {
    font-weight: 600;
}

/* ----- Expertise ----- */
.expertise-head {
    text-align: center;
    margin-bottom: 64px;
}

/* ----- FAQ ----- */
.faq-inner {
    /* 820px per design reference — gives long Q's a bit more breathing room
       than the default 768. */
    max-width: 820px;
}
.faq-headline {
    margin-top: 12px;
    margin-bottom: 32px;
}

/* ----- Services page heading ----- */
.services-headline {
    margin-top: 12px;
    margin-bottom: 16px;
}
.services-grid {
    gap: 24px;
}

/* Cards del catálogo de servicios que sí tienen detail page (las 4 actuales)
   se renderizan como <a>: aseguro que la tipografía no se subraye y que el
   color sea heredado del contexto. */
.service-card-link,
.service-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ----- Contacto ----- */
.contact-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.contact-halo {
    inset: auto -10% -30% -10%;
    height: 140%;
}
.contact-inner {
    max-width: 768px;
    position: relative;
    z-index: 2;
    text-align: center;
}
.contact-headline {
    margin-top: 12px;
    margin-bottom: 24px;
}
.contact-copy {
    max-width: 576px;
    margin: 0 auto 48px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.4;
    letter-spacing: -0.022em;
    color: hsl(var(--muted-foreground));
    font-variation-settings: "opsz" 32;
}
.contact-copy .strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}

/* --- inlined: aio-shortcodes.css --- */
/* ============================================================
   AIO shortcodes — {{< tldr >}}, {{< faq >}}, {{< keypoint >}}
   High-extractability blocks designed for LLM citation.
   ============================================================ */

/* ----- TL;DR block — executive summary at top of post ----- */
.tldr-block {
    margin: 2rem 0 2.5rem;
    padding: 1.25rem 1.5rem;
    background: hsl(var(--secondary) / 0.5);
    border: 1px solid hsl(var(--border));
    border-left: 3px solid hsl(var(--primary));
    border-radius: var(--radius);
}
.tldr-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--primary));
    margin-bottom: 0.5rem;
}
.tldr-body {
    font-size: 15px;
    line-height: 1.6;
    color: hsl(var(--foreground));
}
.tldr-body p:first-child { margin-top: 0; }
.tldr-body p:last-child  { margin-bottom: 0; }
.tldr-body ul,
.tldr-body ol {
    margin: 0;
    padding-left: 1.25rem;
}
.tldr-body li {
    margin: 0.25rem 0;
}

/* ----- FAQ list — numbered Q01…QNN list, all answers visible -----
   Sustituye al acordeón en el sistema. Compartido por:
   · home.ejs (sección "Preguntas frecuentes")
   · shortcode {{< faq >}} en el cuerpo de cualquier .md
   · futuros service-detail pages
   Mismo lenguaje visual que .stack-row / .timeline-item: hairlines +
   mono num primary + display q + body a. */
.faq-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
}
.faq-list__row {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 28px;
    padding: 22px 0;
    border-top: 1px solid hsl(var(--border) / 0.55);
}
.faq-list__row:first-child {
    border-top: 0;
    padding-top: 4px;
}
.faq-list__num {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    color: hsl(var(--primary));
    line-height: 1;
    padding-top: 6px;
}
.faq-list__q {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    line-height: 1.3;
    margin-bottom: 8px;
    font-variation-settings: "opsz" 28;
}
.faq-list__a {
    color: hsl(var(--muted-foreground));
    font-size: 14.5px;
    line-height: 1.65;
    letter-spacing: -0.005em;
    max-width: 62ch;
}
@media (max-width: 640px) {
    .faq-list__row { grid-template-columns: 1fr; gap: 8px; }
    .faq-list__num { padding-top: 0; }
}

/* ----- Keypoint — extractable single-claim callout ----- */
.keypoint {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: hsl(var(--primary) / 0.06);
    border-left: 3px solid hsl(var(--primary));
    border-radius: 0 var(--radius) var(--radius) 0;
}
.keypoint-mark {
    color: hsl(var(--primary));
    font-weight: 700;
    line-height: 1.5;
    flex: 0 0 auto;
}
.keypoint-text {
    color: hsl(var(--foreground));
    font-size: 15.5px;
    line-height: 1.5;
    font-weight: 500;
}

/* --- inlined: service-detail.css --- */
/* ============================================================
   Service detail page — per design handoff
   (ui_kits/web/Services.jsx + styles.css svc-* block).
   Layout pattern: project-hero + project-layout 2-col + project-pagination
   reused from the project detail page. Adds .svc-* primitives for the
   numbered content blocks unique to service pages.
   ============================================================ */

/* ---------- Hero (shared by project + service detail) ----------
   Overrides the legacy .project-hero from cards.css (which set 0.5rem
   top padding, too tight for the new chrome). Padding-bottom reducido
   (era 64/80) para que no se acumule con el padding-top del body
   (48/64) — gap total entre hero y "01 Qué obtienes" pasa de 160px
   a 80/120px, mucho más leíble. */
.project-hero,
.service-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 96px 0 32px;
}
@media (min-width: 768px) {
    .project-hero,
    .service-hero { padding: 120px 0 48px; }
}
.service-hero__inner {
    position: relative;
    z-index: 2;
    /* Anchos sincronizados: el body usa max-width 1100, el hero hereda
       del .inner global 1024 — esto creaba un salto visual de ~38px por
       lado al pasar de hero a body. Forzamos 1100 también en el hero.
       Aplico margin auto + padding-inline porque el .inner global de
       sections.css está scopeado a `.section .inner` y aquí el padre
       es .service-hero / .project-hero (no .section). */
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: 24px;
}
@media (min-width: 768px) {
    .service-hero__inner { padding-inline: 48px; }
}

.project-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 28px;
}
.project-crumb a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-standard);
}
.project-crumb a:hover {
    color: hsl(var(--primary));
    text-decoration: none;
}
.project-crumb .sep { color: hsl(var(--border)); }
.project-crumb .cur { color: hsl(var(--foreground)); }

.project-meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.project-dates {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.project-dates .sep { color: hsl(var(--border)); }

/* Project / service detail title. Shared by project.ejs and service.ejs. */
.project-title,
.service-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 5.6vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-variation-settings: "opsz" 96;
    color: hsl(var(--foreground));
    margin: 0 0 24px;
}
.project-description {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    line-height: 1.45;
    letter-spacing: -0.018em;
    color: hsl(var(--muted-foreground));
    font-variation-settings: "opsz" 32;
    max-width: 760px;
    margin: 16px 0 0;
}

/* Service-area callout — frase corta debajo de la description que
   declara dónde se presta el servicio (geo). Más sutil que la
   description: peso 400, tamaño menor, color muted. */
.service-area {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 0.9375rem;
    line-height: 1.5;
    /* Antes era / 0.85 alpha que en dark theme dejaba contraste por
       debajo de WCAG AA (PSI flagged accessibility 95). Sin alpha el
       contraste pasa AA en ambos themes. */
    color: hsl(var(--muted-foreground));
    max-width: 760px;
    margin: 10px 0 0;
}

/* Role row (project hero) — sits between title and description.
   "Rol · @ · Empresa" in mono micro caps. */
.project-role-row {
    margin: -8px 0 8px;
}
.project-role-line {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.02em;
}
.project-role-line .at { color: hsl(var(--border)); margin: 0 4px; }

/* Sidebar link variant (project detail "Enlaces"). */
.project-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-sm, 6px);
    color: hsl(var(--foreground));
    text-decoration: none;
    font-size: 13px;
    transition: border-color var(--dur-base) var(--ease-standard),
                color var(--dur-base) var(--ease-standard);
    margin-bottom: 6px;
}
.project-sidebar__link:last-child { margin-bottom: 0; }
.project-sidebar__link:hover {
    border-color: hsl(var(--primary) / 0.4);
    color: hsl(var(--primary));
    text-decoration: none;
}
.project-sidebar__link:hover .arrow {
    transform: translate(2px, -2px);
}
.project-sidebar__link .arrow {
    transition: transform var(--dur-base) var(--ease-standard);
}

/* Muted variant of tech-tag for "Categorías" (tags) vs "Tecnologías". */
.tech-tag--muted {
    background: hsl(var(--muted) / 0.25);
    color: hsl(var(--muted-foreground));
}

/* ---------- Body section + 2-column layout ----------
   Padding-top reducido (era 64/80) para emparejar con el padding-bottom
   menor del hero (32/48). Gap total entre hero y body ahora 80/112px.
   .service-body__inner sincroniza max-width con .service-hero__inner. */
.project-body-section {
    padding: 48px 0 96px;
}
@media (min-width: 768px) {
    .project-body-section { padding: 64px 0 128px; }
}
/* Mismo razonamiento que .service-hero__inner: el padre es
   .project-body-section (no .section), así que las reglas globales
   de .inner no aplican y hay que centrar + padear aquí. */
.service-body__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: 24px;
}
@media (min-width: 768px) {
    .service-body__inner { padding-inline: 48px; }
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}
@media (min-width: 960px) {
    .project-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 72px;
    }
}
.project-content { min-width: 0; }

/* ---------- Numbered block (svc-block) ---------- */
.svc-block {
    margin-bottom: 56px;
}
.svc-block:last-child { margin-bottom: 0; }
.svc-block__head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 24px;
    border-bottom: 1px solid hsl(var(--border));
}
.svc-block__num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: hsl(var(--muted-foreground));
    flex: 0 0 auto;
}
.svc-block__head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.4vw, 1.875rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variation-settings: "opsz" 48;
    margin: 0;
    color: hsl(var(--foreground));
}

/* ---------- "Qué obtienes" bullets ---------- */
.svc-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.svc-bullets li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: 14px;
    align-items: baseline;
    position: relative;
}
.svc-bullets li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: hsl(var(--primary));
    transform: translateY(7px);
}
.svc-bullets li span {
    color: hsl(var(--foreground));
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.005em;
}

/* ---------- Cómo trabajo — proceso paso a paso ---------- */
.svc-process {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.svc-process__step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid hsl(var(--border) / 0.55);
}
.svc-process__step:first-child { border-top: 0; padding-top: 4px; }
.svc-process__num {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: hsl(var(--primary));
    line-height: 1;
    padding-top: 3px;
}
.svc-process__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    margin-bottom: 6px;
    font-variation-settings: "opsz" 28;
}
.svc-process__desc {
    color: hsl(var(--muted-foreground));
    font-size: 14.5px;
    line-height: 1.6;
    letter-spacing: -0.005em;
}

/* ---------- Para quién — personas grid ----------
   Salto a 3 columnas a 768px (no a 640) — en tablet pequeño las cards
   de 220px hacían que títulos como "Startups en seed/series A"
   wrappearan a 3 líneas. */
.svc-personas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .svc-personas { grid-template-columns: 1fr 1fr 1fr; }
}
.svc-persona {
    padding: 22px 22px 24px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: border-color var(--dur-base) var(--ease-standard);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.svc-persona:hover { border-color: hsl(var(--primary) / 0.4); }
.svc-persona__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.018em;
    color: hsl(var(--foreground));
    line-height: 1.25;
}
.svc-persona__desc {
    color: hsl(var(--muted-foreground));
    font-size: 13.5px;
    line-height: 1.55;
    letter-spacing: -0.005em;
}

/* ---------- Casos de uso — lista densa ---------- */
.svc-cases {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.svc-cases li {
    padding: 14px 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    color: hsl(var(--foreground));
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.005em;
}
.svc-cases li:last-child { border-bottom: 0; }

/* ---------- Proyectos relacionados ----------
   2 columnas a partir de 768px (no 640) — mismo razonamiento que
   .svc-personas: en tablet las cards quedaban apretadas con título +
   role + tags + pill apilados. */
.svc-related {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .svc-related { grid-template-columns: 1fr 1fr; }
}
.svc-related__card {
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.svc-related__card:hover { text-decoration: none; color: inherit; }
.svc-related__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.svc-related__arr {
    color: hsl(var(--muted-foreground));
    transition: transform var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard);
}
.svc-related__card:hover .svc-related__arr {
    transform: translate(2px, -2px);
    color: hsl(var(--primary));
}
.svc-related__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    line-height: 1.3;
    font-variation-settings: "opsz" 24;
}
.svc-related__role {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.02em;
}
.svc-related__role .at { color: hsl(var(--border)); margin: 0 2px; }
.svc-related__tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.tech-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    background: hsl(var(--muted) / 0.4);
    color: hsl(var(--muted-foreground));
}

/* ---------- Status pill (proyecto en curso / completado) ---------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
}
.status-pill__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: hsl(var(--muted-foreground));
}
.status-pill.status-active { color: hsl(var(--primary)); }
.status-pill.status-active .status-pill__dot {
    background: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.18);
}

/* ---------- Sidebar — list + tickets + cta ---------- */
.service-sidebar { position: sticky; top: 96px; align-self: start; }
@media (max-width: 959px) {
    .service-sidebar { position: static; }
}
.svc-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.svc-sidebar-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid hsl(var(--border) / 0.5);
    font-size: 13px;
}
.svc-sidebar-list li:first-child { border-top: 0; padding-top: 4px; }
.svc-sidebar-list .k {
    font-family: var(--font-mono);
    color: hsl(var(--muted-foreground));
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.svc-sidebar-list .v {
    color: hsl(var(--foreground));
    text-align: right;
    font-size: 13px;
    letter-spacing: -0.005em;
}
.svc-sidebar-tickets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.svc-sidebar-tickets li {
    padding: 8px 10px;
    background: hsl(var(--muted) / 0.4);
    border-radius: 6px;
    color: hsl(var(--foreground));
    font-size: 12.5px;
    line-height: 1.4;
    letter-spacing: -0.005em;
}
.project-sidebar__cta p {
    color: hsl(var(--muted-foreground));
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 14px;
}
.svc-sidebar__cta-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 13.5px;
    justify-content: center;
}

/* ---------- Pagination — reused for services ---------- */
.project-pagination-section {
    padding: 0 0 96px;
}
.service-pagination__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: 24px;
}
@media (min-width: 768px) {
    .service-pagination__inner { padding-inline: 48px; }
}
.project-pagination__rule {
    border: 0;
    border-top: 1px solid hsl(var(--border) / 0.5);
    margin: 0 0 32px;
}
.project-pagination {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 720px) {
    .project-pagination--paired {
        grid-template-columns: 1fr 1px 1fr;
        gap: 32px;
    }
}
.project-pagination__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    padding: 12px 0;
}
.project-pagination__col:hover { text-decoration: none; }
.project-pagination__col--next { text-align: right; align-items: flex-end; }
.project-pagination__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    transition: color var(--dur-base) var(--ease-standard);
}
.project-pagination__col:hover .project-pagination__label { color: hsl(var(--primary)); }
.project-pagination__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: hsl(var(--foreground));
    line-height: 1.3;
}
.project-pagination__spine {
    display: none;
}
@media (min-width: 720px) {
    .project-pagination__spine {
        display: block;
        background: hsl(var(--border) / 0.5);
    }
}

/* ============================================================
   .prose — tipografía rich-text para cuerpos markdown.
   Generalizado (era scoped a .project-content.prose). Aplica a:
   · project detail (.project-content.prose en project.ejs)
   · service detail (no aplica — body es estructurado, no markdown)
   · legal pages (.page-article.prose en page.ejs: privacidad, etc.)
   · futuros posts cuando se renderice <article class="prose">
   La constraint de width específica de project detail (720px, porque
   vive en grid 2-col) sigue scoped abajo.
   ============================================================ */
.prose p,
.prose ul,
.prose ol {
    font-size: 15.5px;
    line-height: 1.7;
    letter-spacing: -0.005em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 20px;
}
.prose p:last-child,
.prose ul:last-child,
.prose ol:last-child { margin-bottom: 0; }
.prose strong {
    color: hsl(var(--foreground));
    font-weight: 600;
}
.prose a {
    color: hsl(var(--primary));
    text-decoration: underline;
    text-decoration-color: hsl(var(--primary) / 0.3);
    text-underline-offset: 3px;
}
.prose a:hover { text-decoration-color: hsl(var(--primary)); }
.prose code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.10);
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0;
}
.prose h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.025em;
    margin-top: 40px;
    margin-bottom: 16px;
    color: hsl(var(--foreground));
    font-variation-settings: "opsz" 36;
}
.prose h2:first-child { margin-top: 0; }
.prose ul,
.prose ol {
    padding-left: 1.4rem;
}
.prose li { margin-bottom: 6px; }
.prose li strong { color: hsl(var(--foreground)); }

/* Project detail siembra dentro de un grid 2-col, por eso necesita
   constraint de width adicional sobre la prose. */
.project-content.prose { max-width: 720px; }

/* ============================================================
   .page-layout / .page-article — wrapper para legal pages (page.ejs).
   El diseño coloca el <article class="prose"> centrado con max-width 768
   y padding generoso (120/24/96 mobile, igual desktop). Sin sidebar.
   ============================================================ */
.page-layout {
    position: relative;
}
.page-article {
    max-width: 768px;
    margin: 0 auto;
    padding: 96px 24px 80px;
}
@media (min-width: 768px) {
    .page-article {
        padding: 120px 48px 96px;
    }
}
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
    font-variation-settings: "opsz" 64;
}
.page-updated {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 48px;
}

/* ---------- Sidebar — plano + sticky ---------- */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-self: start;
}
@media (min-width: 960px) {
    .project-sidebar { position: sticky; top: 32px; }
}
.project-sidebar__section {
    padding: 18px 20px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    transition: border-color var(--dur-base) var(--ease-standard);
}
.project-sidebar__section:hover {
    border-color: hsl(var(--primary) / 0.30);
}
.project-sidebar__title {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 14px;
}
.project-sidebar__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.project-sidebar__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
/* .project-sidebar__link ya existe arriba — ya usa el design del
   reference (border, padding 10/12, hover primary). No re-declaro. */

/* --- inlined: nav-topics.css --- */
/* Topic Pills Navigation */
.topic-nav-container {
    position: sticky;
    top: 73px;
    /* Just below header (approx header height) */
    z-index: 80;
    background: rgba(8, 12, 22, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}

.topic-scroll-wrapper {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 var(--spacing-md);
    max-width: var(--container-width);
    margin: 0 auto;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.topic-scroll-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.topic-pill {
    white-space: nowrap;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
}

.topic-pill:hover {
    color: var(--color-info);
    border-color: var(--color-info);
    background: var(--primary-glow);
    text-decoration: none;
}

.topic-pill.active {
    background: var(--color-info);
    color: #fff;
    border-color: var(--color-info);
    font-weight: 600;
}

/* Make sure it fits nicely on mobile */
@media (max-width: 768px) {
    .topic-nav-container {
        top: 60px;
        /* Adjust for smaller mobile header if needed */
        padding: 0.5rem 0;
    }

    .topic-pill {
        font-size: 0.85rem;
        padding: 0.35rem 0.85rem;
    }
}
/* --- inlined: services-index.css --- */
/* services-index.css — clases nuevas del rediseño del índice de servicios.
   Tres grupos:
     .svc-compare*  → tabla comparativa 4 servicios × 6 atributos
     .svc-profile*  → perfiles ampliados (head + 2-col layout)
     .case-ref*     → tarjetas compactas de Productos a medida → /projects/
   Reusa tokens existentes (var(--primary), var(--font-display), etc.). */

/* ---------- Tabla comparativa ---------- */
.svc-compare {
  margin-top: 12px;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow-x: auto;
  background: hsl(var(--card));
  -webkit-overflow-scrolling: touch;
}
.svc-compare table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.svc-compare th,
.svc-compare td {
  text-align: left;
  vertical-align: top;
  padding: 14px 18px;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
}
.svc-compare tbody tr:last-child th,
.svc-compare tbody tr:last-child td { border-bottom: 0; }

.svc-compare thead th {
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: top;
}
.svc-compare__corner { width: 130px; }
.svc-compare__corner-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.svc-compare__svc { width: auto; }
.svc-compare__svc a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}
.svc-compare__svc-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: hsl(var(--primary));
}
.svc-compare__svc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.018em;
  color: hsl(var(--foreground));
  line-height: 1.2;
  transition: color 0.18s ease;
}
.svc-compare__svc a:hover .svc-compare__svc-name { color: hsl(var(--primary)); }
.svc-compare__svc-type {
  font-size: 11.5px;
  color: hsl(var(--muted-foreground));
  letter-spacing: -0.005em;
  line-height: 1.3;
}

/* Selector con `th` para ganar (0,2,1) > (0,1,1) a `.svc-compare th`,
   que si no impone su vertical-align: top sobre las celdas-titulo de fila. */
.svc-compare th.svc-compare__attr {
  position: sticky;
  left: 0;
  z-index: 1;
  vertical-align: middle;
  background: hsl(var(--card));
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}
.svc-compare tbody tr:nth-child(even) td,
.svc-compare tbody tr:nth-child(even) .svc-compare__attr {
  background: hsl(var(--background) / 0.5);
}
.svc-compare td {
  color: hsl(var(--foreground));
  letter-spacing: -0.005em;
  line-height: 1.45;
}
.svc-compare__hint {
  margin: 14px 0 0;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  letter-spacing: -0.005em;
}

/* ---------- Perfiles ampliados ---------- */
.svc-profiles { padding-top: 8px; }
.svc-profile {
  padding: 56px 0;
  border-top: 1px solid hsl(var(--border));
}
.svc-profile:first-child { border-top: 0; }

.svc-profile__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 32px;
}
.svc-profile__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: hsl(var(--primary));
  padding-top: 8px;
  flex: 0 0 auto;
}
.svc-profile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  letter-spacing: -0.03em;
  color: hsl(var(--foreground));
  line-height: 1.05;
  margin: 0 0 12px;
  font-variation-settings: "opsz" 48;
}

.svc-profile__grid { align-items: start; }

.project-content.prose .svc-profile__lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.014em;
  color: hsl(var(--foreground));
  margin: 0 0 8px;
  font-variation-settings: "opsz" 28;
}
.svc-profile__sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin: 38px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid hsl(var(--border));
}

/* Cancela el indent heredado de .project-content.prose ol/ul para que las
   listas casos de uso + FAQ queden flush-left con lede y subheadings. */
.svc-profile .project-content.prose .svc-cases,
.svc-profile .project-content.prose .faq-list {
  padding-left: 0;
  margin-left: 0;
}

/* ---- Referencia a proyecto — tarjeta de caso (Productos a medida) ---- */
.case-ref {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 30px 24px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.case-ref__accent {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--primary-deep)));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s ease;
}
.case-ref:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 20px 44px -26px hsl(var(--primary) / 0.55);
}
.case-ref:hover .case-ref__accent { transform: scaleX(1); }

.case-ref__top { display: flex; align-items: center; gap: 14px; }
.case-ref__num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: hsl(var(--primary)); white-space: nowrap;
}
.case-ref__title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; line-height: 1.22; letter-spacing: -0.02em;
  color: hsl(var(--foreground)); text-wrap: pretty;
}
.case-ref__lede {
  margin: 0; color: hsl(var(--muted-foreground));
  font-size: 15px; line-height: 1.65; letter-spacing: -0.005em;
  max-width: 68ch;
}
.case-ref__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  margin-top: 2px; padding-top: 18px;
  border-top: 1px solid hsl(var(--border) / 0.7);
}
.case-ref__tags { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.case-ref__tag {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding: 4px 10px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: hsl(var(--muted) / 0.25);
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.case-ref:hover .case-ref__tag {
  border-color: hsl(var(--primary) / 0.3);
  color: hsl(var(--foreground));
}
.case-ref__cta {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: hsl(var(--foreground)); white-space: nowrap;
}
.case-ref:hover .case-ref__cta { color: hsl(var(--primary)); }
.case-ref__cta .arrow { transition: transform .2s ease; }
.case-ref:hover .case-ref__cta .arrow { transform: translateX(3px); }

@media (max-width: 560px) {
  .case-ref { padding: 24px 22px 20px; }
  .case-ref__foot { flex-direction: column; align-items: flex-start; gap: 14px; }
}


/* ============================================================
   Base + reset
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-color: hsl(var(--border));
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 48;
    margin: 0;
}

a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-standard);
}

a:hover {
    color: hsl(var(--foreground));
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================
   SiteHeader — sticky transparent nav per design handoff
   (ui_kits/web/primitives.jsx SiteHeader pattern).
   Header is fixed, centered, no brand. Backdrop blur only when
   .is-revealed (always revealed on inner pages; scroll-revealed
   on home after 240px).
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity var(--dur-slow) var(--ease-standard),
        transform var(--dur-slow) var(--ease-standard),
        background var(--dur-base) var(--ease-standard),
        backdrop-filter var(--dur-base) var(--ease-standard);
}
.site-header.is-revealed {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: hsl(var(--background) / 0.55);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
}
@media (min-width: 768px) {
    .site-header { padding: 18px 48px; }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    flex-wrap: wrap;
    justify-content: center;
}
.site-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 14.5px;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 24;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color var(--dur-base) var(--ease-standard);
}
.site-nav__link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 1px;
    background: hsl(var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-standard);
}
.site-nav__link:hover,
.site-nav__link:focus-visible {
    color: hsl(var(--foreground));
    outline: none;
    text-decoration: none;
}
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__link.is-active { color: hsl(var(--foreground)); }
.site-nav__link.is-active::after { transform: scaleX(1); }

/* ============================================================
   Mobile nav — hamburger drawer (per mobile-nav-handoff.md spec)
   Visible solo <768px. Desktop conserva la nav inline arriba.
   ============================================================ */
.mnav-bar { display: none; }
.mnav-sheet { display: none; }
.mnav-scrim { display: none; }

/* Breakpoint extendido a tablet portrait (≤1023.98px): a 768px en el
   home no había nav visible — ni el drawer (que era ≤767.98) ni la
   nav inline desktop (que en home está reveal-on-scroll). Subiendo
   el corte a 1023.98 los tablets tienen hamburger desde el primer
   pixel; los laptops (≥1024) conservan la nav horizontal inline. */
@media (max-width: 1023.98px) {
    /* Ocultar nav inline desktop en mobile + tablet */
    .site-header .site-nav { display: none; }

    /* Header — siempre revealed en mobile/tablet (el reveal-on-scroll
       del home solo controla el desktop transparente). Damos opacity
       y pointer-events de entrada para que el hamburger sea tappeable
       sin necesidad de scroll. space-between coloca brand a la
       izquierda y trigger a la derecha. */
    .site-header[data-mobile-nav] {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 10px 16px;
        justify-content: space-between;
    }

    .mnav-bar {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        width: 100%;
        height: 36px;
    }

    /* Trigger button — 40x40 round, hamburger morpheado en X cuando open */
    .mnav-trigger {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 999px;
        border: 1px solid hsl(var(--border));
        /* Fondo sólido (no transparent): el header en estado glass es
           translúcido, y al hacer scroll las imágenes claras de las
           cards pasan por detrás. Con el trigger transparente las
           barras casi-blancas perdían contraste sobre ese fondo claro
           y el hamburger "desaparecía". Un fondo sólido lo convierte
           en un chip siempre legible sea cual sea el contenido detrás. */
        background: hsl(var(--background));
        color: hsl(var(--foreground));
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background var(--dur-base) var(--ease-standard),
                    border-color var(--dur-base) var(--ease-standard),
                    color var(--dur-base) var(--ease-standard);
    }
    .mnav-trigger:hover,
    .mnav-trigger:focus-visible {
        outline: none;
        /* Hover: un paso más claro pero igualmente sólido (antes era
           background/0.6, translúcido — incoherente con el nuevo
           fondo sólido por defecto). */
        background: hsl(var(--secondary));
    }
    .mnav-trigger.is-open {
        background: hsl(var(--primary) / 0.14);
        border-color: hsl(var(--primary) / 0.6);
        color: hsl(var(--primary));
    }
    .mnav-trigger__bars {
        position: relative;
        width: 16px;
        height: 12px;
        display: inline-block;
    }
    .mnav-trigger__bars span {
        position: absolute;
        left: 0;
        right: 0;
        height: 1.5px;
        background: currentColor;
        transform-origin: center;
        transition: transform var(--dur-base) var(--ease-standard),
                    opacity var(--dur-base) var(--ease-standard),
                    top var(--dur-base) var(--ease-standard),
                    bottom var(--dur-base) var(--ease-standard);
    }
    .mnav-trigger__bars span:nth-child(1) { top: 0; }
    .mnav-trigger__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); width: 11px; }
    .mnav-trigger__bars span:nth-child(3) { bottom: 0; }
    .mnav-trigger.is-open .mnav-trigger__bars span:nth-child(1) {
        top: 50%; transform: translateY(-50%) rotate(45deg);
    }
    .mnav-trigger.is-open .mnav-trigger__bars span:nth-child(2) {
        opacity: 0; transform: translateY(-50%) scaleX(0);
    }
    .mnav-trigger.is-open .mnav-trigger__bars span:nth-child(3) {
        bottom: 50%; transform: translateY(50%) rotate(-45deg);
    }

    /* Scrim — capa entre contenido y sheet */
    .mnav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 28;
        background: hsl(var(--background) / 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--dur-base) var(--ease-standard);
    }
    .mnav-scrim.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sheet — drawer top con backdrop blur fuerte */
    .mnav-sheet {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        padding: 70px 18px 28px;
        background: hsl(var(--background) / 0.95);
        backdrop-filter: blur(20px) saturate(160%);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
        border-bottom: 1px solid hsl(var(--border) / 0.7);
        box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 320ms cubic-bezier(.2, .7, .2, 1),
                    opacity 250ms ease;
    }
    .mnav-sheet.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* List items */
    .mnav-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .mnav-list li + li {
        border-top: 1px solid hsl(var(--border) / 0.4);
    }
    .mnav-link {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 16px 12px;
        text-decoration: none;
        color: hsl(var(--foreground));
        border-radius: 10px;
        position: relative;
        transition: background var(--dur-base) var(--ease-standard);
    }
    .mnav-link__num {
        flex: 0 0 36px;
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: 0.08em;
        color: hsl(var(--muted-foreground));
        text-transform: uppercase;
    }
    .mnav-link__body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    .mnav-link__label {
        font-family: var(--font-display);
        font-size: 22px;
        line-height: 1.15;
        font-weight: 600;
        letter-spacing: -0.02em;
        color: hsl(var(--foreground));
    }
    .mnav-link__sub {
        font-size: 11px;
        line-height: 1.4;
        color: hsl(var(--muted-foreground));
        letter-spacing: 0.01em;
    }
    .mnav-link__arrow {
        flex: 0 0 16px;
        font-size: 16px;
        color: hsl(var(--muted-foreground));
        transition: transform var(--dur-base) var(--ease-standard),
                    color var(--dur-base) var(--ease-standard);
    }
    .mnav-link:hover .mnav-link__arrow,
    .mnav-link:focus-visible .mnav-link__arrow {
        transform: translateX(2px);
        color: hsl(var(--foreground));
    }
    .mnav-link.is-active {
        background: hsl(var(--primary) / 0.10);
        box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.28);
    }
    .mnav-link.is-active .mnav-link__num,
    .mnav-link.is-active .mnav-link__label,
    .mnav-link.is-active .mnav-link__arrow {
        color: hsl(var(--primary));
    }

    /* Stagger de entrada — items aparecen con desfase */
    .mnav-sheet .mnav-list a {
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity .3s ease, transform .3s ease;
    }
    .mnav-sheet.is-open .mnav-list a {
        opacity: 1;
        transform: none;
    }
    .mnav-sheet.is-open .mnav-list li:nth-child(1) a { transition-delay: 0.05s; }
    .mnav-sheet.is-open .mnav-list li:nth-child(2) a { transition-delay: 0.10s; }
    .mnav-sheet.is-open .mnav-list li:nth-child(3) a { transition-delay: 0.15s; }
    .mnav-sheet.is-open .mnav-list li:nth-child(4) a { transition-delay: 0.20s; }

    /* Footer del sheet — Contacto + Email/LinkedIn */
    .mnav-foot {
        margin-top: 16px;
        padding-top: 18px;
        border-top: 1px solid hsl(var(--border) / 0.4);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .mnav-foot__label {
        font-size: 11px;
        color: hsl(var(--muted-foreground));
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }
    .mnav-foot__links {
        display: inline-flex;
        gap: 12px;
    }
    .mnav-foot__links a {
        font-size: 13px;
        color: hsl(var(--primary));
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    /* Header glass override en mobile cuando sheet abierto */
    .site-header[data-mobile-nav].is-revealed,
    .site-header[data-mobile-nav] .mnav-bar.is-open {
        /* delegado al state .is-open en el bar; el header padre sigue
           con sus tokens visuales — no duplicamos. */
    }
}

/* Inner pages need top breathing room so their first section clears
   the fixed header. Home does NOT need this — su hero es full-bleed
   y el header es invisible hasta el scroll. */
.content-wrapper:not(.content-wrapper--flush) {
    padding-top: 72px;
}
@media (min-width: 768px) {
    .content-wrapper:not(.content-wrapper--flush) {
        padding-top: 88px;
    }
}

/* ============================================================
   Footer — minimal, per design handoff
   Copyright on left, secondary links on right.
   The fixed SiteHeader carries primary nav; this stays small.
   ============================================================ */
footer {
    padding: 32px 0 28px;
    margin-top: 64px;
}
.footer-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
@media (min-width: 768px) {
    .footer-row {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
footer .copyright,
.footer-legal {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    /* 11px en mono con / 0.75 alpha fallaba WCAG AA (PSI flagged
       accessibility 95). Sin alpha cumple AA, sigue siendo visualmente
       discreto por ser font-size 11px + muted-foreground base. */
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    margin: 0;
    transition: color var(--dur-fast) var(--ease-standard);
}
.footer-legal:hover {
    color: hsl(var(--foreground));
    text-decoration: none;
}

/* ============================================================
   Content wrapper
   ============================================================ */
.content-wrapper {
    margin-top: 2rem;
    min-height: 60vh;
}

.content-wrapper--flush {
    margin-top: 0;
}

/* ============================================================
   Utilities
   ============================================================ */
.section-title {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.card-desc {
    color: hsl(var(--muted-foreground));
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0.5rem 0;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    font-family: var(--font-mono);
}

/* Reveal on scroll — wired por el IntersectionObserver de base.ejs.
   Solo anima transform, NO opacity. Razón: Chrome excluye del cálculo
   de LCP cualquier elemento que arranca con opacity:0 y se desvanece
   — en las páginas internas todo el hero era .reveal, así que no
   había LCP candidate y Lighthouse reportaba NO_LCP (performance sin
   métricas). Animando solo el translate, el contenido se pinta desde
   el primer frame (opacity 1) → LCP válido, y si el JS/IO no corre el
   contenido sigue visible (solo sin el slide-up). Mismo criterio que
   @keyframes hero-fade-up. */
.reveal {
    transform: translateY(40px);
    transition: transform 0.8s ease;
}
.reveal.visible {
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Hero stagger (kept for non-section heroes).
   Previo: el @keyframes animaba opacity 0→1 con fill-mode:both → si la
   animación no progresaba (prefers-reduced-motion en iPhone, browser
   pausando timeline, JS deshabilitado, etc.) el contenido quedaba
   invisible durante el delay (0-0.3s) y nunca aparecía. Fix: solo
   animamos transform. Si la animación no corre, los elementos
   permanecen visibles en su posición final por defecto. */
@keyframes hero-fade-up {
    from { transform: translateY(30px); }
    to   { transform: none; }
}
.hero-animate-1 { animation: hero-fade-up 0.8s ease forwards; }
.hero-animate-2 { animation: hero-fade-up 0.8s ease 0.1s both; }
.hero-animate-3 { animation: hero-fade-up 0.8s ease 0.2s both; }
.hero-animate-4 { animation: hero-fade-up 0.8s ease 0.3s both; }

/* Badge pill (legacy callers) */
.badge-pill {
    display: inline-block;
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-sans);
}

/* ============================================================
   Post layout
   ============================================================ */
.post-header {
    padding: 3rem 0 1.5rem;
}

.post-header h1 {
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: hsl(var(--muted-foreground));
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.separator {
    height: 1px;
    background: hsl(var(--border));
    margin: 2rem 0;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 1rem;
}

.post-nav-btn {
    text-align: left;
    max-width: 45%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-nav-btn--right {
    text-align: right;
    margin-left: auto;
}

.post-nav-label {
    font-size: 0.75rem;
    opacity: 0.6;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   Markdown content
   ============================================================ */
.markdown-body {
    font-size: 1.1rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: hsl(var(--foreground));
    margin-top: 2rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.markdown-body pre {
    background: hsl(var(--secondary));
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid hsl(var(--border));
}

.markdown-body code {
    font-family: var(--font-mono);
    background: hsl(var(--muted) / 0.6);
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 85%;
}

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
    padding: 1rem 0 0 0;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    font-family: var(--font-sans);
}

.breadcrumbs ol {
    display: flex !important;
    flex-wrap: wrap;
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
    align-items: center;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
    font-size: 1.1em;
    line-height: 1;
}

.breadcrumbs a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: hsl(var(--primary));
    text-decoration: none;
}

.breadcrumbs span[aria-current="page"] {
    color: hsl(var(--primary));
    font-weight: 500;
    background: hsl(var(--primary) / 0.12);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ============================================================
   Projects index helpers
   ============================================================ */
.projects-page-header {
    margin-bottom: 2rem;
    border-bottom: none;
}

.projects-page-desc {
    color: hsl(var(--muted-foreground));
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.projects-section {
    margin-bottom: 3rem;
}

.projects-section h2 {
    font-size: 1.5rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.landing-section {
    padding: 3rem 0;
}

.landing-section.alt-bg {
    background: hsl(var(--secondary) / 0.30);
}

.section-footer {
    margin-top: 2rem;
    text-align: center;
}

.link-arrow {
    color: hsl(var(--primary));
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
}

.link-arrow:hover {
    color: hsl(var(--primary-deep));
    text-decoration: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    header nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }
    /* Garantizar visibilidad de elementos con animaciones de entrada
       cuando reduced-motion está activo: si por timing/fill-mode el
       animation jamás avanza, forzamos opacity 1 + transform reset.
       Esto resuelve el bug en iPhone con accessibility reduce-motion
       donde el hero quedaba completamente invisible. */
    .reveal,
    .hero-animate-1,
    .hero-animate-2,
    .hero-animate-3,
    .hero-animate-4 {
        opacity: 1 !important;
        transform: none !important;
    }
}
