/* ══════════════════════════════════════
   RESET & VARIABLES
══════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --bg:           #0a0e1a;
    --surface:      #0f1525;
    --surface-2:    #141c30;
    --primary:      #4a8fff;
    --primary-light:#7bb3ff;
    --text:         #e0e8ff;
    --text-muted:   rgba(160, 180, 220, 0.6);
    --border:       rgba(60, 130, 255, 0.15);
    --border-hover: rgba(60, 130, 255, 0.35);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ══════════════════════════════════════
   FONDO ANIMADO (fixed layer)
══════════════════════════════════════ */
canvas#bgCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.grid-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(30, 60, 180, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 60, 180, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0%   { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.code-lines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.code-line {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(60, 130, 255, 0.06);
    white-space: nowrap;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0%   { transform: translateY(100vh); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100px) translateX(30px); opacity: 0; }
}

.circuit {
    position: fixed;
    z-index: 0;
    pointer-events: none;
}
.circuit-h {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(60, 140, 255, 0.25), transparent);
    animation: circuitPulseH 4s ease-in-out infinite;
}
.circuit-v {
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(60, 140, 255, 0.25), transparent);
    animation: circuitPulseV 4s ease-in-out infinite;
}
@keyframes circuitPulseH {
    0%, 100% { opacity: 0; transform: scaleX(0); }
    50%       { opacity: 1; transform: scaleX(1); }
}
@keyframes circuitPulseV {
    0%, 100% { opacity: 0; transform: scaleY(0); }
    50%       { opacity: 1; transform: scaleY(1); }
}

.node {
    position: fixed;
    width: 4px; height: 4px;
    background: rgba(80, 150, 255, 0.5);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(80, 150, 255, 0.3);
    animation: nodePulse 3s ease-in-out infinite;
}
@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50%       { transform: scale(2); opacity: 0.7; }
}

.orb {
    position: fixed;
    border-radius: 50%;
    z-index: 0;
    filter: blur(80px);
    pointer-events: none;
    animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(20, 60, 200, 0.12), transparent); top: -100px; right: -100px; }
.orb-2 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(40, 80, 220, 0.10), transparent); bottom: -80px; left: -80px; animation-delay: -4s; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(60, 100, 240, 0.08), transparent); top: 40%; left: 50%; animation-delay: -8s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%       { transform: translate(30px, -20px) scale(1.1); }
    50%       { transform: translate(-20px, 30px) scale(0.95); }
    75%       { transform: translate(20px, 20px) scale(1.05); }
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 22px 0;
    transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}

.navbar.scrolled {
    background: rgba(10, 14, 26, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 50px;
    filter: drop-shadow(0 0 6px rgba(60, 130, 255, 0.1));
    transition: filter 0.3s;
}
.nav-logo:hover img {
    filter: drop-shadow(0 0 10px rgba(60, 130, 255, 0.22));
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-links .nav-cta {
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 22px;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.nav-links .nav-cta:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--bg);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
}
.nav-mobile-menu.is-open { max-height: 360px; }
.nav-mobile-menu ul {
    list-style: none;
    padding: 12px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nav-mobile-menu a {
    display: block;
    padding: 13px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}
.nav-mobile-menu li:last-child a { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--text); }
.nav-mobile-menu .nav-cta {
    color: var(--primary);
    border-bottom: none;
    margin-top: 8px;
}

/* ══════════════════════════════════════
   LAYOUT BASE
══════════════════════════════════════ */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    position: relative;
    z-index: 10;
    padding: 110px 0;
}

.section-label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
}
.section-label.center { text-align: center; }

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 300;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.section-title span {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-title.center { text-align: center; }

.section-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}
.section-description.center {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 64px;
}

/* Alternating section bg */
.section.alt-bg {
    background: linear-gradient(180deg,
        transparent,
        rgba(15, 21, 37, 0.55) 15%,
        rgba(15, 21, 37, 0.55) 85%,
        transparent
    );
}

/* ══════════════════════════════════════
   ABOUT — Header interior
══════════════════════════════════════ */
.about-hero {
    position: relative;
    z-index: 10;
    padding: 140px 40px 64px;
    text-align: center;
}

.about-hero-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--text);
    margin-top: 12px;
}

.about-hero-title span {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 190px 40px 60px;
}

.hero-inner {
    max-width: 700px;
    width: 100%;
}

.logo-container {
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out both;
}
.logo-container img {
    max-width: 240px;
    width: 70vw;
    filter: drop-shadow(0 0 30px rgba(60, 130, 255, 0.2));
    transition: filter 0.5s;
}
.logo-container img:hover {
    filter: drop-shadow(0 0 50px rgba(60, 130, 255, 0.4));
}

.hero-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 14px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero-title span {
    font-weight: 600;
    color: #66bddc;
}

.divider {
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 0 auto;
    position: relative;
    z-index: 10;
}
.divider::after {
    content: '';
    position: absolute;
    top: -3px; left: 0;
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary);
    animation: dividerDot 3.5s ease-in-out infinite;
}
@keyframes dividerDot {
    0%, 100% { left: 0; }
    50%       { left: calc(100% - 6px); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: rgba(160, 180, 220, 0.85);
    letter-spacing: 2px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    margin-bottom: 56px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
    margin-bottom: 40px;
}

.hero-cta {
    display: inline-block;
    color: var(--primary);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 14px 0;
    width: 172px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}
.hero-cta:hover {
    background: rgba(74, 143, 255, 0.1);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
}
.hero-cta--ghost {
    color: var(--text-muted);
    border-color: rgba(160, 180, 220, 0.15);
}
.hero-cta--ghost:hover {
    color: var(--text);
    border-color: rgba(160, 180, 220, 0.35);
    background: rgba(160, 180, 220, 0.05);
}

/* Flecha scroll */
.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--primary);
    text-decoration: none;
    opacity: 0;
    animation: fadeInArrow 1s ease-out 1.6s forwards, arrowBounce 2.4s ease-in-out 2.6s infinite;
    filter: drop-shadow(0 0 10px rgba(74, 143, 255, 0.5));
}
@keyframes fadeInArrow {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes arrowBounce {
    0%, 100% { transform: translateX(-50%) translateY(0);    }
    50%       { transform: translateX(-50%) translateY(12px); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   BIO
══════════════════════════════════════ */
.bio-formation {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.bio-formation .bio-subtitle {
    margin-bottom: 24px;
}
.bio-formation-list {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.bio-formation-list li {
    padding: 10px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
}
.bio-formation-list li:hover {
    border-color: var(--border-hover);
    color: var(--text);
}
.bio-formation-list li strong {
    font-weight: 500;
}

.bio-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 80px;
    align-items: center;
}

.about-bio-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 72px;
    align-items: stretch;
}

.about-photo {
    border-radius: 12px;
    overflow: visible;
    border: 1px solid var(--border);
    height: 100%;
    position: relative;
}

.about-github-link {
    position: absolute;
    bottom: -18px;
    right: -18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.about-github-link svg {
    width: 24px;
    height: 24px;
}

.about-github-link::after {
    content: 'Ver GitHub';
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.about-github-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.about-github-link:hover {
    background: rgba(99, 179, 237, 0.15);
    border-color: rgba(99, 179, 237, 0.6);
    color: #fff;
    transform: scale(1.08);
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 11px;
}

/* ── Formación con video de fondo ── */
.formation-video-section {
    position: relative;
    overflow: hidden;
}

.formation-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.formation-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1;
}

.formation-video-section .section-inner {
    position: relative;
    z-index: 2;
}

.bio-lead {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.75;
    margin-bottom: 18px;
}
.bio-more-btn {
    display: block;
    text-align: center;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.bio-more-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255,255,255,0.03);
}

.bio-body {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 8px;
}

.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    list-style: none;
}
.about-skill-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(74, 143, 255, 0.07);
    border: 1px solid rgba(74, 143, 255, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
}
.about-skill-tag svg {
    color: var(--primary);
}

.bio-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 320px;
}

.bio-subtitle {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
    font-weight: 600;
}

.bio-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bio-list li {
    border-left: 2px solid var(--border);
    padding-left: 14px;
    transition: border-color 0.2s;
}
.bio-list li:hover {
    border-color: var(--primary);
}
.bio-list li strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
}
.bio-list li span {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

/* Bio visual */
.bio-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.bio-avatar {
    position: relative;
    width: 180px;
    height: 180px;
}
.avatar-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(transparent 60%, rgba(74, 143, 255, 0.5) 100%);
    animation: rotateSlow 10s linear infinite;
}
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.avatar-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg);
}
.avatar-photo {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: cover;
    object-position: center top;
}

.bio-stats {
    width: 100%;
}
.bio-stat-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    transition: border-color 0.2s;
}
.stat:hover { border-color: var(--border-hover); }
.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    min-width: 60px;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════
   HERO LOGOS (integrado en hero)
══════════════════════════════════════ */
.hero-logos {
    width: 100vw;
    padding: 140px 0 0;
}

.hero-logos-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

.logos-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 30%, black 70%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 30%, black 70%, transparent);
}

.logos-track {
    display: flex;
    width: max-content;
    animation: logoScroll 42s linear infinite;
}
.logos-track:hover { animation-play-state: paused; }

@keyframes logoScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logos-slide {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 0 32px;
}

.brand-logo-img {
    height: 50px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.35);
    transition: filter 0.25s;
    flex-shrink: 0;
    display: block;
}
.brand-logo-img:hover {
    filter: brightness(0) invert(1) opacity(0.7);
}

/* ══════════════════════════════════════
   SERVICIOS
══════════════════════════════════════ */

/* Filtro */
.services-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 48px 0 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.filter-btn {
    padding: 9px 26px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Selector de perfil — duelo de paneles */
/* Primer click: grid-template-columns se anima (crecimiento inicial visible).
   Switch: JS suprime la transición del grid para evitar text-reflow; la inactiva
   sale del flujo con position:absolute y queda solapada detrás de la activa. */
.profile-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    margin-bottom: 0;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.profile-hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.profile-duel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    position: relative;
    transition: grid-template-columns 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.profile-duel:has([data-profile="a"].is-active) { grid-template-columns: 2.4fr 1fr; }
.profile-duel:has([data-profile="b"].is-active) { grid-template-columns: 1fr 2.4fr; }
/* Ancla cada activa a su columna — sin esto la auto-colocación la manda a col 1 */
.profile-duel:has([data-profile="a"].is-active) .profile-card.is-active { grid-column: 1; }
.profile-duel:has([data-profile="b"].is-active) .profile-card.is-active { grid-column: 2; }

.profile-card {
    min-width: 0;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    transition: border-color 0.35s,
                transform 0.4s ease,
                opacity 0.4s ease,
                box-shadow 0.35s;
}
.profile-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.profile-card.is-active {
    z-index: 2;
    border-color: rgba(74, 143, 255, 0.32);
    background:
        linear-gradient(135deg, rgba(74, 143, 255, 0.07), transparent 60%),
        var(--surface);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
/* Inactiva: sale del flujo, fijada al borde exterior, solapa detrás de la activa */
.profile-duel:has([data-profile="a"].is-active) .profile-card.is-other {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: calc(50% - 8px); z-index: 1; opacity: 0.5; transform: none;
}
.profile-duel:has([data-profile="b"].is-active) .profile-card.is-other {
    position: absolute; left: 0; top: 0; bottom: 0;
    width: calc(50% - 8px); z-index: 1; opacity: 0.5; transform: none;
}
.profile-duel:has(.is-active) .profile-card.is-other:hover {
    border-color: var(--border-hover);
    transform: none;
}
/* Ambas imágenes crecen al activar la sección por primera vez */
.profile-duel.is-engaged .profile-visual {
    height: clamp(300px, 30vw, 380px);
}

.profile-visual {
    height: clamp(260px, 26vw, 340px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 143, 255, 0.14), rgba(74, 143, 255, 0.02));
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    overflow: hidden;
    transition: height 0.4s ease;
}
.profile-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-text {
    padding: 26px 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.profile-question {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    transition: color 0.3s;
}
.profile-card.is-active .profile-question { color: var(--primary); }
.profile-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Conector — línea de tiempo vertical y centrada, mismo lenguaje que los bordes del sitio.
   Funciona igual apilado (mobile) o lado a lado (desktop). */
.profile-connector {
    width: 1px;
    height: 40px;
    margin: 0 auto;
    background: var(--border-hover);
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
}
.profile-connector.is-visible {
    opacity: 1;
    transform: scaleY(1);
}

/* Pasos — revelados solo tras elegir perfil */
.profile-steps-wrap {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.55s ease, opacity 0.4s ease;
}
.profile-steps-wrap.is-visible {
    grid-template-rows: 1fr;
    opacity: 1;
}
.steps-inner {
    overflow: hidden;
    min-height: 0;
    padding: 36px 36px 40px;
    background: var(--surface);
    border: 1px solid rgba(74, 143, 255, 0.22);
    border-radius: 16px;
}
.steps-label {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.steps-label.hidden { display: none; }

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.steps-list.hidden { display: none; }
.step-item {
    display: flex;
    gap: 16px;
    padding: 30px 28px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(74, 143, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}
.step-title {
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--text);
}
.step-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}
.service-card[data-cat] { transition: opacity 0.25s, transform 0.25s, border-color 0.3s, box-shadow 0.3s; }
.service-card.hidden {
    display: none;
}

/* Formation items — interactivos */
.formation-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}
.bio-formation-list li[data-discipline] {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: border-color 0.2s, color 0.2s;
}
.bio-formation-list li[data-discipline]:hover,
.bio-formation-list li.formation-active {
    border-color: var(--primary);
    color: var(--text);
}
.formation-hint {
    font-size: 0.72rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.bio-formation-list li[data-discipline]:hover .formation-hint,
.bio-formation-list li.formation-active .formation-hint {
    opacity: 1;
    transform: translateX(0);
}

/* Panel inline */
.formation-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    min-height: 200px;
    animation: panelFadeIn 0.3s ease;
}
@keyframes panelFadeIn {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.formation-panel .service-tag { margin-bottom: 8px; }
.formation-panel .service-title { margin-bottom: 12px; }
.formation-panel .service-items { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

.service-card {
    padding: 36px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 143, 255, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.service-card:hover::before { opacity: 1; }

.service-card.featured {
    border-color: rgba(74, 143, 255, 0.28);
    background: linear-gradient(135deg, rgba(74, 143, 255, 0.07), var(--surface));
}
.service-card.featured::after {
    content: '★';
    position: absolute;
    top: 16px; right: 20px;
    font-size: 0.75rem;
    color: var(--primary);
    opacity: 0.5;
}

.service-icon {
    width: 54px;
    height: 54px;
    background: rgba(74, 143, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
    transition: background 0.2s, border-color 0.2s;
}
.service-card:hover .service-icon {
    background: rgba(74, 143, 255, 0.14);
    border-color: var(--border-hover);
}

.service-tag {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.service-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 22px;
}

.service-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.service-items li {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
}
.service-items li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    opacity: 0.7;
}

/* ══════════════════════════════════════
   PAÍSES
══════════════════════════════════════ */
.countries-banner {
    position: relative;
    z-index: 10;
    padding: 64px 0;
    background: linear-gradient(135deg,
        rgba(20, 40, 100, 0.38),
        rgba(10, 20, 60, 0.38)
    );
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.countries-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 32px;
    list-style: none;
}

.country-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 124px;
    cursor: default;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.country-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}
.country-flag { font-size: 2.2rem; line-height: 1; }
.country-name {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ══════════════════════════════════════
   TESTIMONIOS
══════════════════════════════════════ */
#testimonios {
    background-image: url('assets/dark-pattern-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
#testimonios::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 28, 0.72);
    z-index: 0;
}
#testimonios .section-inner {
    position: relative;
    z-index: 1;
}
.testimonials-slider {
    max-width: 740px;
    margin: 0 auto;
}

.testimonials-track {
    min-height: 240px;
    position: relative;
}

.testimonial-item {
    display: none;
}
.testimonial-item.active {
    display: block;
    animation: testimonialIn 0.5s ease both;
}
@keyframes testimonialIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.82;
    font-style: italic;
    margin-bottom: 26px;
    padding: 32px 36px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
}
.testimonial-text::before {
    content: '"';
    position: absolute;
    top: -18px; left: 28px;
    font-size: 5rem;
    line-height: 1;
    color: var(--primary);
    opacity: 0.25;
    font-style: normal;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 8px;
}

.testimonial-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #2040aa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 2px solid var(--border);
    letter-spacing: 1px;
}
.testimonial-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 2px;
}
.testimonial-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

.testimonial-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.testimonial-btn:hover {
    border-color: var(--border-hover);
    color: var(--primary);
    background: rgba(74, 143, 255, 0.05);
}

.testimonials-dots { display: flex; gap: 8px; align-items: center; }
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s, transform 0.25s;
}
.dot.active {
    background: var(--primary);
    transform: scale(1.4);
}

/* ══════════════════════════════════════
   CONTACTO
══════════════════════════════════════ */
#contacto {
    padding-bottom: 70px;
}
#contacto::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg in oklab, rgba(10, 14, 26, 0.88) 0%, rgba(42, 78, 140, 0.5) 100%);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    z-index: 0;
    pointer-events: none;
}
#contacto .section-inner {
    position: relative;
    z-index: 1;
}
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 680px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 28px 32px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
}
.contact-info--centered {
    flex-wrap: nowrap;
    justify-content: center;
    text-align: center;
}

.contact-item {
    display: flex;
    gap: 14px;
    align-items: center;
    text-align: left;
}
.contact-icon {
    width: 44px; height: 44px;
    background: rgba(74, 143, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.contact-item strong {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.contact-item span { font-size: 0.92rem; color: var(--text); }
.contact-link {
    font-size: 0.92rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}
.contact-link:hover { color: var(--primary); }

.contact-availability {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.availability-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    flex-shrink: 0;
    animation: availPulse 2s ease-in-out infinite;
}
@keyframes availPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.5); opacity: 0.7; }
}
.contact-availability span {
    font-size: 0.8rem;
    color: #4ade80;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 36px;
    max-width: 740px;
    margin: 0 auto;
    width: 100%;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label .req { display: none; }
.form-group label {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 150, 255, 0.25);
    border-radius: 8px;
    padding: 14px 18px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(160, 180, 220, 0.35);
}
.form-group input:hover,
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(100, 150, 255, 0.4);
}
.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 143, 255, 0.1);
}

.form-submit {
    align-self: center;
    width: 100%;
    max-width: 320px;
    margin-top: 28px;
    margin-bottom: 44px;
    background: rgba(74, 143, 255, 0.06);
    color: var(--primary-light);
    border: 1px solid rgba(74, 143, 255, 0.25);
    padding: 16px 38px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.form-submit:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 143, 255, 0.15);
}
.form-submit:active { transform: translateY(0); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Pill selector (etapa / presupuesto) */
.form-group--centered {
    text-align: center;
}
.form-group--centered .pill-selector {
    justify-content: center;
}

@media (max-width: 600px) {
    .form-group--centered {
        text-align: left;
    }
    .form-group--centered .pill-selector {
        justify-content: flex-start;
    }
}

.pill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pill-opt {
    padding: 8px 18px;
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
#etapaSelector .pill-opt:first-child {
    min-width: 120px;
    text-align: center;
}

@media (max-width: 600px) {
    #etapaSelector {
        flex-wrap: nowrap;
        gap: 6px;
    }
    #etapaSelector .pill-opt {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 6px;
        font-size: 0.74rem;
        text-align: center;
    }
}

.pill-opt:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}
.pill-opt.selected {
    border-color: var(--primary);
    background: rgba(74, 143, 255, 0.12);
    color: #ffffff;
}

/* Select */
.contact-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(100, 150, 255, 0.2);
    border-radius: 8px;
    padding: 13px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a8fff' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: border-color 0.2s, background-color 0.2s;
}
.contact-form select:focus {
    border-color: rgba(74, 143, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(74, 143, 255, 0.1);
}
.contact-form select option { background: #0f1525; color: var(--text); }
.contact-form select optgroup { color: var(--text-muted); font-size: 0.78rem; }

/* Asterisco requerido */
.req { color: var(--primary); font-weight: 400; }

/* Hint de campo */
.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: -4px;
    margin-bottom: 4px;
    font-style: italic;
}

/* Honeypot — invisible para humanos, trampa para bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ══════════════════════════════════════
   PROYECTOS — Slider
══════════════════════════════════════ */
.projects.section {
    padding-top: 80px;
    padding-bottom: 0;
}
.projects-slider {
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    padding: 10px 0;
    margin-top: 0;
}

.projects-track {
    display: flex;
    gap: 48px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.project-slide {
    flex: 0 0 76%;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    position: relative;
}

.project-slide figure {
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

.project-slide figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.4;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.projects-slider.is-paused .project-slide.is-active {
    outline: 2px solid rgba(99, 179, 237, 0.7);
    outline-offset: 0px;
    filter: drop-shadow(0 0 10px rgba(99, 179, 237, 0.4));
    transition: filter 0.3s ease, outline 0.3s ease;
}

.pc-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    margin-bottom: 4px;
}

.pc-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.pc-desc {
    margin: 0 0 12px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.5;
}

.pc-link {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 6px;
    padding: 5px 12px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pc-link:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.9);
}

.projects-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 20px 0 32px;
}

.projects-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.projects-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: var(--surface-2);
}

.projects-dots {
    display: flex;
    gap: 14px;
}

.projects-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(160, 180, 220, 0.25);
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
    padding: 0;
}

.projects-dots .dot.active {
    background: var(--primary);
    transform: scale(1.35);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
    position: relative;
    z-index: 10;
    padding: 20px 0;
    background: #050810;
    border-top: 1px solid var(--border);
}
.footer .section-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.footer-copy {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.footer-logo {
    height: 36px;
    opacity: 0.55;
    filter: drop-shadow(0 0 8px rgba(60, 130, 255, 0.15));
}
.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.footer-projects {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.footer-projects-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(160, 180, 220, 0.25);
}
.footer-personal {
    font-size: 0.68rem;
    color: rgba(160, 180, 220, 0.35);
    letter-spacing: 0.5px;
}
.footer-personal-link {
    color: rgba(160, 180, 220, 0.35);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-personal-link:hover {
    color: rgba(160, 180, 220, 0.7);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .bio-grid {
        grid-template-columns: 1fr 260px;
        gap: 40px;
    }
    .about-bio-grid {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }
    .formation-layout { grid-template-columns: 1fr; }
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    .contact-item { text-align: left; width: 220px; }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }
    .section-inner,
    .nav-inner { padding: 0 24px; }

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

    .hero { padding: 190px 24px 20px; }
    .hero-logos { padding-top: 80px; }
    .scroll-arrow { position: static; margin-top: auto; padding-bottom: 32px; left: auto; transform: none; }
    @keyframes fadeInArrow { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes arrowBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

    .bio-grid { grid-template-columns: 1fr; gap: 40px; }
    .bio-columns { grid-template-columns: 1fr; }
    .bio-visual { flex-direction: column; align-items: center; }
    .bio-stats { flex-direction: column; }

    .about-bio-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-photo { max-width: 480px; margin: 0 auto; }

    .profile-duel {
        display: flex;
        flex-direction: column;
        position: relative;
        gap: 16px;
    }
    /* Overlap vertical — card inactiva asoma su imagen por arriba.
       !important necesario para ganar sobre las reglas de desktop (mayor especificidad). */
    .profile-duel:has(.is-active) {
        padding-top: 56px;
        overflow: hidden;
        transition: none;
    }
    .profile-duel:has(.is-active) .profile-card.is-active {
        position: relative;
        z-index: 2;
        grid-column: auto !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .profile-duel:has(.is-active) .profile-card.is-other {
        position: absolute !important;
        top: 0 !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        bottom: auto !important;
        z-index: 1;
        transform: scale(0.97) !important;
        transform-origin: top center;
        opacity: 0.5 !important;
        pointer-events: auto;
    }
    .profile-card.is-other .profile-visual { height: clamp(160px, 42vw, 260px); }

    .steps-list {
        grid-template-columns: 1fr;
    }

    .projects-slider { max-width: 100%; }
    .project-slide { flex: 0 0 calc(100% - 48px); aspect-ratio: 4 / 3; }
    .project-slide figcaption {
        transform: translateY(0);
        padding: 64px 16px 14px;
        background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.75) 50%, rgba(0,0,0,0.2) 80%, rgba(0,0,0,0) 100%);
    }

    .form-row { grid-template-columns: 1fr; }

    .services-filter {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 6px;
        padding: 6px;
        background: transparent;
        border: none;
    }
    .filter-btn {
        padding: 10px 8px;
        text-align: center;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--bg);
        color: var(--text-muted);
    }
    .filter-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }

    .services-grid {
        display: flex;
        flex-direction: row;
        grid-template-columns: unset;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        max-width: unset;
        margin-left: 0;
        margin-right: 0;
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 4px;
    }
    .services-grid::-webkit-scrollbar { display: none; }
    .services-grid .service-card {
        flex-shrink: 0;
        width: 76vw;
        max-width: 320px;
        scroll-snap-align: start;
    }

    .testimonials-slider { padding: 0 4px; }

    .countries-grid { gap: 10px; }
    .country-item { padding: 18px 20px; min-width: 90px; }
}

@media (max-width: 600px) {
    .contact-info { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .hero-title { letter-spacing: 3px; }
    .contact-info { padding: 24px; align-items: center; }
    .contact-item { text-align: left; width: 220px; }
    .testimonial-text { padding: 24px 22px 20px; font-size: 0.92rem; }
    .footer-role { display: block; }
}

/* Short viewports: MacBook Air 13" and landscape/compact mobile */
@media (max-height: 820px) {
    .hero-logos { padding-top: 64px; }
}
