/* The header stays light independently of the page theme and section colors. */
body .site-header {
    color-scheme:light; --bg:#fff; --surface:#fafafa; --soft:#f1f1f3;
    --text:#171719; --muted:#64646c; --border:#17171914; --accent:#6c47ff; --accent-soft:#6c47ff0c;
    color:var(--text);
}
.site-header .mobile-nav { background:var(--bg); }
.site-header .brand,.site-header .mobile-nav a { color:var(--text); }
.site-header .theme-button { color:var(--text); }
.site-header .main-nav > a,.site-header .monogram > span { transition:color .35s; }

/* Small labels share the same violet edge light as the interactive cards. */
.tech-chips > span,.about-traits > span {
    position:relative; isolation:isolate; display:inline-flex; align-items:center;
    gap:6px; padding:5px 10px; border:1px solid var(--border); border-radius:6px;
    background:var(--surface); color:var(--muted);
    transition:color .25s,border-color .25s,background-color .25s,box-shadow .35s,transform .3s;
}
.about-traits { gap:8px; }
.about-traits > span::before { margin-right:0; }
.tech-chips > span::after,.about-traits > span::after {
    content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
    background:linear-gradient(120deg,transparent,color-mix(in srgb,var(--accent) 9%,transparent),transparent);
    opacity:0; transition:opacity .3s;
}
.tech-chips > span:hover,.about-traits > span:hover {
    color:var(--accent); border-color:color-mix(in srgb,var(--accent) 55%,var(--border));
    box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 9%,transparent),0 0 20px color-mix(in srgb,var(--accent) 17%,transparent),inset 0 0 12px color-mix(in srgb,var(--accent) 5%,transparent);
    transform:translateY(-2px);
}
.tech-chips > span:hover::after,.about-traits > span:hover::after { opacity:1; }
.skill-family:hover .tech-chips > span { border-color:color-mix(in srgb,var(--accent) 28%,var(--border)); }
.availability,.stage-tag,.section-icon,.profile-socials > a,.tech-logo {
    transition:color .25s,border-color .25s,box-shadow .35s,transform .3s;
}
.availability:hover,.stage-tag:hover,.section-icon:hover,.profile-socials > a:hover,.profile-socials > a:focus-visible,.tech-logo:hover,.tech-logo:focus-visible {
    border-color:color-mix(in srgb,var(--accent) 45%,var(--border));
    box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 7%,transparent),0 0 24px color-mix(in srgb,var(--accent) 14%,transparent);
}
@media(prefers-reduced-motion:reduce) {
    body .site-header { transition:none; }
    .tech-chips > span:hover,.about-traits > span:hover { transform:none; }
}


/* Frosted glass: solid surfaces remain the fallback when blur is unsupported. */
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
    body .floating-card,
    body #proyectos .project-card,
    body #perfil .about-portrait,
    body #contacto .contact-form {
        background:color-mix(in srgb,var(--surface) 70%,transparent);
        backdrop-filter:blur(18px) saturate(115%);
        -webkit-backdrop-filter:blur(18px) saturate(115%);
        border-color:color-mix(in srgb,var(--text) 12%,transparent);
        box-shadow:inset 0 1px 0 #ffffff12,0 10px 35px #0000000c;
    }
    body #perfil .about-portrait { background:color-mix(in srgb,var(--surface) 66%,transparent); }
    body #contacto .contact-form { background:color-mix(in srgb,var(--surface) 78%,transparent); }
    body #proyectos .project-card:hover,
    body #perfil .about-portrait:hover {
        border-color:color-mix(in srgb,var(--accent) 35%,var(--border));
        box-shadow:inset 0 1px 0 #ffffff16,0 12px 35px #00000018,0 0 24px color-mix(in srgb,var(--accent) 8%,transparent);
    }
}
@media(prefers-reduced-transparency:reduce) {
    body .site-header { background:var(--bg); backdrop-filter:none; -webkit-backdrop-filter:none; }
    body .floating-card,body #proyectos .project-card,body #perfil .about-portrait,body #contacto .contact-form { background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
}
