/* ===== Reset / Base ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #1d1e22;
    background: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== Nav ===== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffffd9;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
}

body.dark-theme .site-nav {
    background: #0f1620d9;
    border-color: #1e293b;
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 0;
}

.site-nav__brand {
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: #111;
    letter-spacing: .5px;
    white-space: nowrap;
}

.nav-cv { display:none; font-weight:700; color:#000; }
.nav-cv svg { color:#000; }
.nav-cv:hover { background:#ffe666; transform:translate(-3px,-3px); box-shadow:7px 7px 0 #000; }
.nav-cv:active { transform:translate(1px,1px); box-shadow:2px 2px 0 #000; }
body.dark-theme .nav-cv { background:#fff08a; color:#000; }
body.dark-theme .nav-cv svg { color:#000; }
body.dark-theme .nav-cv:hover { background:#ffe666; }

body.dark-theme .site-nav__brand {
    color: #f1f5f9;
}

.site-nav__links {
    list-style: none;
    display: flex;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
}

.site-nav__links a {
    text-decoration: none;
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #334155;
    position: relative;
}

body.dark-theme .site-nav__links a {
    color: #cbd5e1;
}

/* Removed underline/line effect under nav links per request */
.site-nav__links a::after { content:none; }

.site-nav__menuBtn {
    display: none;
    background: none;
    border: 2px solid #000;
    padding: .4rem .55rem;
    border-radius: .5rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
}

body.dark-theme .site-nav__menuBtn {
    border-color: #fff;
    box-shadow: 4px 4px 0 #000;
    color: #fff;
}

.theme-toggle {
    background: #f1f5f9;
    border: 2px solid #000;
    padding: .45rem .6rem;
    border-radius: .65rem;
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
    box-shadow: 4px 4px 0 #000;
}

body.dark-theme .theme-toggle {
    background: #1e293b;
    color: #f1f5f9;
}

.theme-toggle:active,
.site-nav__menuBtn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

/* Nav social icons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.nav-social {
    display: flex;
    gap: .55rem;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 2px solid #000;
    border-radius: 10px;
    background: #fff;
    box-shadow: 4px 4px 0 #000;
    color: #111;
    text-decoration: none;
    transition: .25s;
}

body.dark-theme .nav-icon {
    background: #fff;
    color: #000;
}

.nav-icon:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.nav-icon:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

@media (max-width: 820px) {
    .nav-social {
        display: none;
    }
}

@media (max-width:760px) {
    .site-nav__menuBtn {
        display: inline-block;
    }

    .site-nav__links {
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem 1.25rem;
        border: 2px solid #000;
        border-radius: 1rem;
        box-shadow: 8px 8px 0 #000;
        min-width: 180px;
    }

    body.dark-theme .site-nav__links {
        background: #182635;
    }

    .site-nav__links[data-collapsed="true"] {
        display: none;
    }
}

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

:root {
    --grid-color: #f1f3f5;
    --accent: #2563eb;
    --accent-rgb: 37 99 235;
    --cta-accent: #2563eb;
    --cta-accent-alt: #4f46e5;
    --radius-sm: 4px;
        /* Color palette */
        --color-bg-dark: #0f172a;
        --color-bg-light: #ffffff;
        --color-text: #111827;
        --color-text-light: #f1f5f9;
        --color-accent: #2563eb;
        --color-accent-alt: #4338ca;
        --color-accent-warm: #facc15;
        --color-border: #000;
        --space-1: .25rem;
        --space-2: .5rem;
        --space-3: .75rem;
        --space-4: 1rem;
        --space-5: 1.5rem;
        --space-6: 2rem;
        --radius-sm: 6px;
        --radius-md: 14px;
        --radius-lg: 22px;
        --shadow-offset: 8px;
    --radius: 10px;
    --shadow: 0 4px 16px -4px rgba(0 0 0 / .08);
    --gradient-accent: linear-gradient(135deg, rgb(var(--accent-rgb)) 0%, #5b21b6 100%);
}

/* Dark mode variables override */
.dark-theme {
    --grid-color: #1f242b;
    --accent: #3b82f6;
    --accent-rgb: 59 130 246;
    --shadow: 0 4px 16px -4px rgba(0 0 0 / .6);
    color-scheme: dark;
    background: #0f1620;
}

body.dark-theme {
    background: #0f1620;
    color: #e2e8f0;
}

body.dark-theme .section.alt {
    background: #13202d;
}

/* Redesigned footer */
.footer { margin-top: var(--space-6); background: linear-gradient(145deg,#0f172a,#1e293b); color: var(--color-text-light); border-top:4px solid #000; position:relative; overflow:hidden; }
.footer::before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 20% 30%, rgba(255,255,255,.06), transparent 60%); pointer-events:none; }
.footer__inner { display:grid; gap:1.25rem; padding:1.8rem 0; }
@media (min-width:640px){ .footer__inner { grid-template-columns:1fr auto; align-items:center; } }
.footer-brand { font-weight:600; letter-spacing:.5px; }
.footer-meta { font-size:.8rem; opacity:.8; }
.footer-nav { display:flex; flex-wrap:wrap; gap:.85rem; }
.footer-nav a { position:relative; padding:.35rem .65rem; border:1px solid rgba(255,255,255,.25); border-radius:var(--radius-sm); font-size:.8rem; backdrop-filter:blur(2px); }
.footer-nav a:hover { background:rgba(255,255,255,.1); }
.footer-nav a:focus-visible { outline:2px solid var(--color-accent); outline-offset:2px; }
.footer-col { display:flex; flex-direction:column; gap:.6rem; }
.footer-social { display:inline-flex; align-items:center; gap:.4rem; padding:.4rem .55rem; font-size:.75rem; line-height:1; color:#cbd5e1; text-decoration:none; }
.footer-social svg { opacity:.5; transition:opacity .25s, transform .35s; }
.footer-social span { position:relative; }
.footer-social:hover { color:#fff; }
.footer-social:hover svg { opacity:.9; transform:translateY(-2px); }
.footer-social:focus-visible { outline:2px solid var(--color-accent); outline-offset:3px; border-radius:6px; }
.footer-cv { font-weight:600; }
.footer-simple .footer-meta { opacity:.85; }

body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
    background: #182635;
    border-color: #2f4455;
    color: #e2e8f0;
}

body.dark-theme .contact-form input:focus,
body.dark-theme .contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb)/.4);
}

body.dark-theme .footer {
    background: #0d1219;
}

/* Make hero subtitle use dark-card styling in dark mode */
body.dark-theme .hero__subtitle {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 8px 8px 0 #475569;
    color: #cbd5e1;
    padding: .9rem 1rem;
    border: 2px solid #475569;
    border-radius: 12px;
}

body.dark-theme .hero__hi {
    color: #94a3b8;
}

body.dark-theme .box-button {
    background: #334155;
}

body.dark-theme .box-button .button {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-theme .box-button:hover {
    background: #475569;
}

body.dark-theme .tech-band {
    background: #0b1116;
}

body.dark-theme .tech-band::before {
    background: linear-gradient(90deg, #0b1116, rgba(11, 17, 22, 0));
}

body.dark-theme .tech-band::after {
    background: linear-gradient(-90deg, #0b1116, rgba(11, 17, 22, 0));
}

/* Hero avatar: mantener contraste blanco incluso en dark */
body.dark-theme .hero__avatar {
    background: #ffffff;
    border-color: #000;
    box-shadow: 12px 12px 0 #000;
}

body.dark-theme .hero__photo {
    border-radius: 18px;
    background: #fff;
}

/* ensure single rule for hero subtitle above; removing duplicate background override */
body.dark-theme .badge-stack {
    background: #facc15;
}

body.dark-theme .project-badge {
    background: #facc15;
}

body.dark-theme .card {
    background: #fff;
    border-color: #000;
    box-shadow: 0.7em 0.7em 0 #000;
    color: #050505;
}

body.dark-theme .card-title-area {
    background: #ff3e00;
    color: #fff;
}

body.dark-theme .card-tag {
    background: #fff;
    color: #000;
}

body.dark-theme .card-description {
    color: #050505;
}

body.dark-theme .feature-icon {
    background: #4d61ff;
}

body.dark-theme .footer a.social__link {
    color: #94a3b8;
}

body.dark-theme .project-card__cover {
    background: #1e293b;
    border-color: #2f4457;
}

body.dark-theme .project-card__cover img {
    filter: brightness(.95);
}

body.dark-theme .project-cover {
    background: #1e293b;
}

body.dark-theme .gallery figure {
    background: #1e293b;
}

body.dark-theme .project-detail-header h1 {
    color: #f1f5f9;
}

body.dark-theme .project-intro {
    color: #cbd5e1;
}

body.dark-theme .project-body {
    color: #e2e8f0;
}

/* Additional dark containers */
body.dark-theme .hero__avatar {
    border-color: #e2e8f0; /* light border so avatar stands out on dark bg */
    box-shadow: 12px 12px 0 #475569;
}

/* Make the role badge border/offset visible in dark mode */
body.dark-theme .hero__badge-wrap .badge-stack {
    background: #facc15;
    color: #000;
    border-color: #e2e8f0;
    box-shadow: 6px 6px 0 #475569;
}

/* Dark variant for the small CV / contact card inside profile */
body.dark-theme .cv-mini {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 8px 8px 0 #475569;
    color: #e2e8f0;
}

body.dark-theme .cv-mini .cv-label {
    background: transparent;
    color: #94a3b8;
    border: none;
}

body.dark-theme .cv-mini .cv-value {
    color: #e2e8f0; /* default light for contrast */
}

/* However, inside the main profile card (quién soy) keep the profile text values black for legibility on white background */
/* Use light gray for profile texts in dark mode so paragraphs remain readable */
body.dark-theme .card--profile-min .profile-lead,
body.dark-theme .card--profile-min .profile-text p,
body.dark-theme .card--profile-min .cv-value {
    color: #cbd5e1;
}

body.dark-theme .hero__subtitle {
    color: #e2e8f0;
}

body.dark-theme .projects-grid {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

body.dark-theme #contacto .container {
    background: #0f1724; /* dark section background */
    color: #e2e8f0;
    padding: 2.25rem 1.75rem 2.5rem;
    border: 2px solid #475569;
    border-radius: 30px;
    box-shadow: 14px 14px 0 #0b1220;
}

@media (max-width:700px) {
    body.dark-theme #contacto .container {
        padding: 1.75rem 1.25rem 2rem;
        border-radius: 24px;
    }
}

body.dark-theme .contact-form label {
    color: #1e293b;
}

body.dark-theme .contact-form input,
body.dark-theme .contact-form textarea {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.dark-theme .contact-form input:focus,
body.dark-theme .contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb)/.35);
}

body.dark-theme .contact-form .btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 6px 6px 0 #000;
    border: 2px solid #000;
}

body.dark-theme .contact-form .btn.primary:hover {
    filter: brightness(1.08);
}

body.dark-theme .contact-form label {
    color: #cbd5e1;
}

body.dark-theme .contact-form input::placeholder,
body.dark-theme .contact-form textarea::placeholder {
    color: #64748b;
}

body.dark-theme .contact-form .btn.primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 6px 6px 0 #000;
    border: 2px solid #000;
}

body.dark-theme .contact-form .btn.primary:hover {
    filter: brightness(1.08);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px, 40px 40px;
    pointer-events: none;
    mask: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.95));
    z-index: -1;
}

body.dark-theme::before {
    background-image:
        linear-gradient(#1f2d3b 1px, transparent 1px),
        linear-gradient(90deg, #1f2d3b 1px, transparent 1px);
    background-color: #0f1620;
    mask: linear-gradient(to bottom, rgba(15, 22, 32, .9), rgba(15, 22, 32, .94));
}

/* Containers */
.container {
    width: min(1100px, 92%);
    margin-inline: auto;
}

.section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.section.alt {
    background: #f8fafc;
}

.section__title {
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    margin: 0 0 1rem;
    letter-spacing: -1px;
}

.section__intro {
    margin: 0 0 2.5rem;
    max-width: 60ch;
}

/* Tech Band Separator */
.tech-band {
    --h: 70px;
    background: #0d1117;
    color: #f1f5f9;
    position: relative;
    overflow: hidden;
    border-block: 2px solid #111827;
}

.tech-band::before,
.tech-band::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
}

.tech-band::before {
    left: 0;
    background: linear-gradient(90deg, #0d1117, rgba(13, 17, 23, 0));
}

.tech-band::after {
    right: 0;
    background: linear-gradient(-90deg, #0d1117, rgba(13, 17, 23, 0));
}

.tech-band__inner {
    position: relative;
    height: var(--h);
    display: flex;
    align-items: center;
}

.tech-band__track {
    display: flex;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    animation: scroll-left 28s linear infinite;
    font-size: clamp(.8rem, 1.6vw, 1rem);
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
    padding-inline: 2rem;
}

.tech-band__inner.is-hover .tech-band__track {
    animation-play-state: paused;
}

.tech-item {
    position: relative;
}

.tech-item--learning {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}



.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;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Duplicate track for seamless loop (JS will clone if not already) */

/* Section separators using modifier class */
.section--bar {
    position: relative;
}

.section--bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(120px, 30%, 240px);
    height: 4px;
    background: linear-gradient(90deg, rgba(var(--accent-rgb)/0), rgba(var(--accent-rgb)/0.55), rgba(var(--accent-rgb)/0));
    border-radius: 4px;
}

.section--bar:first-of-type::before {
    display: none;
}

/* Alternative style options (swap by changing class) */
.section--bar.angle::before {
    height: 10px;
    background: none;
    width: 100%;
    left: 0;
    transform: none;
    border-radius: 0;
    background-image: linear-gradient(135deg, rgba(var(--accent-rgb)/0.15), rgba(91 33 182 / 0.15));
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.section--bar.dots::before {
    background: none;
    height: 8px;
    width: clamp(160px, 40%, 320px);
    mask: radial-gradient(circle at 4px 50%, #000 2px, transparent 3px) repeat-x;
    -webkit-mask: radial-gradient(circle at 4px 50%, #000 2px, transparent 3px) repeat-x;
    background-color: rgba(var(--accent-rgb)/0.45);
    background-size: 18px 8px;
}

.section--bar.wave::before {
    background: none;
    height: 20px;
    width: 100%;
    left: 0;
    transform: none;
    background: linear-gradient(90deg, rgba(var(--accent-rgb)/0.25), rgba(91 33 182 / 0.25));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23000' d='M0 60h60c60 0 180 0 300-6s240-18 360-12 240 30 360 24 240-42 300-54l60-12v120H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23000' d='M0 60h60c60 0 180 0 300-6s240-18 360-12 240 30 360 24 240-42 300-54l60-12v120H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    opacity: .7;
}

/* Hero */
.hero {
    padding: clamp(3.5rem, 7vw, 6.5rem) 0 3rem;
    position: relative;
}

/* Hero main layout: keep horizontal on most widths */
.hero__inner {
    display: grid;
    grid-template-columns: minmax(200px,250px) 1fr; /* flexible avatar column */
    align-items: center;
    column-gap: 52px; /* spacing between photo and text */
}

.hero__content {
    text-align: left;
}

/* Stack only on very small screens */
@media (max-width:480px) {
    .hero__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 32px; }
    .hero__avatar { width: 70vw; max-width: 300px; margin-bottom: .75rem; }
    .hero__content { text-align: center; }
}

/* simplified greeting */
.hero__hi {
    margin: 0 0 .4rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #334155;
}

.hero__hi {
    font-size: 1.1rem;
    margin: 0 0 .5rem;
    opacity: .8;
}

.hero__title {
    font-size: clamp(2.2rem, 6.5vw, 3.8rem);
    margin: 0 0 .35rem;
    line-height: 1.08;
}

.hero__title .accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Wrap below title when badge separated */
.hero__badge-wrap {
    margin: 4px 0 1rem; /* restored slight separation from título */
}

.hero__title .badge-stack--inline {
    white-space: nowrap;
}

.hero__subtitle {
    max-width: 58ch;
    margin: 0 0 1.6rem;
    font-size: 1.02rem;
    line-height: 1.45;
    position: relative;
    background: #fff;
    border: 2px solid #000;
    padding: 1rem 1.05rem 1.05rem;
    border-radius: 14px;
    box-shadow: 8px 8px 0 #000;
}

@media (max-width:699px) {
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Contact block refined */
/* New contact CTA panel */
.contact-ctas { display:grid; gap:1rem; max-width:720px; margin:0 auto; }
.contact-panel { background:#fff; border:2px solid #000; box-shadow:6px 6px 0 #000; padding:1.6rem 1.7rem 1.8rem; border-radius:22px; max-width:880px; margin:0 auto; }
/* Dark mode: make contact panel adopt dark-card style */
body.dark-theme .contact-panel {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 8px 8px 0 #475569;
    color: #e2e8f0;
}
/* Section head with right aligned back link in proyectos.html */
.section__head { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1.25rem; }
.section__head .back-link { margin-left:auto; }
.contact-btn { position:relative; display:flex; align-items:center; gap:1rem; text-decoration:none; background:#fff; border:2px solid #000; padding:1rem 1.25rem 1.05rem; border-radius:18px; box-shadow:6px 6px 0 #000; font-weight:600; color:#111; font-size:.95rem; letter-spacing:.3px; line-height:1.2; transition:.25s cubic-bezier(.23,1,.32,1); }
.contact-btn--mail { flex-wrap:nowrap; }
.contact-btn__body { display:flex; flex-direction:column; gap:.4rem; }
.contact-email-row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.contact-email { font-size:.8rem; font-weight:600; background:#f1f5f9; padding:.35rem .55rem .4rem; border:2px solid #000; border-radius:10px; text-decoration:none; color:#111; box-shadow:3px 3px 0 #000; }
.contact-email:hover { background:#e2e8f0; }
.copy-email-btn { font:inherit; cursor:pointer; font-size:.65rem; font-weight:700; letter-spacing:.5px; padding:.45rem .65rem .5rem; border:2px solid #000; background:#ffe44d; border-radius:8px; box-shadow:3px 3px 0 #000; text-transform:uppercase; }
.copy-email-btn:hover { background:#ffd633; }
.copy-email-btn:active { transform:translate(1px,1px); box-shadow:1px 1px 0 #000; }
.copy-feedback { font-size:.65rem; font-weight:600; letter-spacing:.4px; color:#16a34a; min-height:1em; }
.contact-email { font-size:.8rem; font-weight:600; background:#f1f5f9; padding:.35rem .55rem .4rem; border:2px solid #000; border-radius:10px; text-decoration:none; color:#111; box-shadow:3px 3px 0 #000; }
.contact-email:hover { background:#e2e8f0; }
.copy-email-btn { font:inherit; cursor:pointer; font-size:.65rem; font-weight:700; letter-spacing:.5px; padding:.45rem .65rem .5rem; border:2px solid #000; background:#ffe44d; border-radius:8px; box-shadow:3px 3px 0 #000; text-transform:uppercase; }
.copy-email-btn:hover { background:#ffd633; }
.copy-email-btn:active { transform:translate(1px,1px); box-shadow:1px 1px 0 #000; }
.copy-feedback { font-size:.65rem; font-weight:600; letter-spacing:.4px; color:#16a34a; min-height:1em; }
body.dark-theme .contact-email { background:#334155; color:#e2e8f0; border-color:#475569; }
body.dark-theme .copy-email-btn { background:#facc15; }
.contact-btn__icon { width:42px; height:42px; flex:0 0 42px; display:flex; align-items:center; justify-content:center; border:2px solid #000; border-radius:12px; background:#f1f5f9; font-weight:700; font-size:1rem; box-shadow:4px 4px 0 #000; }
.contact-btn:hover { transform:translate(-4px,-4px); box-shadow:10px 10px 0 #000; }
.contact-btn:active { transform:translate(1px,1px); box-shadow:3px 3px 0 #000; }
.contact-btn--mail { background:linear-gradient(#ffffff,#f8fafc); }
.contact-btn--linkedin { background:linear-gradient(#ffffff,#eef6ff); }
.contact-btn--github { background:linear-gradient(#ffffff,#f1f5f9); }
/* Ensure variant gradients do not override dark mode - use dark variants when body.dark-theme is active */
body.dark-theme .contact-btn--mail,
body.dark-theme .contact-btn--linkedin,
body.dark-theme .contact-btn--github {
    background: linear-gradient(#1b2430,#1e293b);
    border-color: #475569;
}
/* Dark mode for contact buttons */
body.dark-theme .contact-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
    box-shadow: 6px 6px 0 #475569;
}

body.dark-theme .contact-btn__icon {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
@media (min-width:640px){ .contact-ctas { gap:1.1rem; } }

body.dark-theme .contact-icon {
    background: #fff;
    color: #111;
}

.contact-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.contact-label {
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: .58rem;
    background: #fff;
    color: #111;
    padding: .34em .65em .4em;
    border: 2px solid #000;
    border-radius: 8px;
    box-shadow: 3px 3px 0 #000;
    display: inline-block;
}

body.dark-theme .contact-label {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
    box-shadow: 3px 3px 0 #0b1220;
}

/* Taglines */
.contact-note {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .35px;
    background: #ffe44d;
    border: 2px solid #000;
    padding: .4em .6em .45em;
    border-radius: 10px;
    box-shadow: 4px 4px 0 #000;
    margin-left: .4rem;
    align-self: flex-start;
}

body.dark-theme .contact-note {
    background: #ffe44d;
    color: #000;
}

@media (max-width:640px) {
    .contact-note {
        display: block;
        margin: .45rem 0 0 0;
    }
}

.contact-link {
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .25s, border-color .25s;
}

.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width:699px) {
    .contact-block {
        margin-left: auto;
        margin-right: auto;
        padding: 1.3rem 1.1rem 1.4rem;
    }

    .contact-list li {
        grid-template-columns: 38px 1fr;
    }

    .contact-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}

/* separate role line */
.hero__role {
    margin: -.2rem 0 .85rem;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .5px;
    color: #111;
}

.hero__media {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .05;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__roles {
    margin: .6rem 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
}

@media (min-width:780px) {
    .hero__roles {
        justify-content: flex-start;
    }
}

/* Role badge (yellow label with offset black shadow like a notebook tab) */
.badge-stack {
    --offset: 6px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: #facc15;
    /* amarillo */
    color: #000;
    /* texto negro como en captura */
    padding: .55rem 1rem;
    /* padding vertical igual */
    font-size: .9rem;
    letter-spacing: .5px;
    line-height: 1;
    /* evitar extra space */
    border: 2px solid #000;
    border-radius: .25rem;
    text-transform: none;
    box-shadow: var(--offset) var(--offset) 0 #000;
    /* sombra desplazada */
    transition: transform .18s ease, box-shadow .18s ease;
    transform: rotate(-2deg);
}

/* Inline variant inside heading */
/* Inline variant no longer used after revert but keep for potential future */
.badge-stack--inline {
    display: none;
}

.badge-stack:hover {
    transform: rotate(-2deg) translate(-2px, -2px);
    box-shadow: calc(var(--offset) + 2px) calc(var(--offset) + 2px) 0 #000;
}

.badge-stack:active {
    transform: rotate(-2deg) translate(0, 0);
    box-shadow: var(--offset) var(--offset) 0 #000;
}

/* Avatar: notebook card style (remove glow, add offset shadow) */
/* Avatar container simplified */
.hero__avatar {
    position: relative;
    width: 240px;
    aspect-ratio: 1;
    background: #fff;
    border: 3px solid #000;
    border-radius: 26px;
    box-shadow: 10px 10px 0 #000;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.23,1,.32,1), box-shadow .35s cubic-bezier(.23,1,.32,1);
}

.hero__avatar::before,
.hero__avatar::after {
    content: none;
}

.hero__avatar:hover { transform: translate(-6px,-6px); box-shadow: 16px 16px 0 #000; }

.hero__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    display: block;
}

@media (min-width:780px) {
    .hero__avatar { width: 260px; }
}

@media (min-width:900px) {
    .hero__inner {
        grid-template-columns: 300px 1fr;
        column-gap: 60px; /* 3.75rem (~60px) */
    }

    .hero__avatar { width: 300px; }
}

@media (min-width:1200px) {
    .hero__inner {
        grid-template-columns: 340px 1fr;
        column-gap: 68px; /* 100px era excesivo, ajuste refinado */
    }

    .hero__avatar { width: 340px; }
}

/* Buttons */
.btn {
    --btn-bg: #e2e8f0;
    --btn-color: #1e293b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .95rem;
    padding: .9rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1;
    transition: background .25s, color .25s, box-shadow .25s, border-color .25s;
}

.btn.primary {
    --btn-bg: var(--accent);
    --btn-color: #fff;
}

.btn.ghost {
    background: transparent;
    border-color: #cbd5e1;
}

.btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 2px 8px -2px rgba(var(--accent-rgb) / .35);
}

.btn:active {
    transform: translateY(1px);
}

/* Notebook style boxed buttons (hero) */
.hero__cta {
        display:flex;
        gap:.9rem;
        flex-wrap:nowrap;
        align-items:stretch;
        justify-content:flex-start;
}

.hero__cta .box-button { flex:1 1 auto; min-width:150px; }
.hero__cta .box-button .button { font-size:.9rem; padding:4px 10px 6px; text-align:center; display:flex; align-items:center; justify-content:center; }

@media (max-width:900px){
    .hero__cta { justify-content:center; }
}
@media (max-width:640px){
    .hero__cta { justify-content:center; gap:.7rem; }
    .hero__cta .box-button { min-width:140px; }
        .hero__cta .box-button .button { font-size:.78rem; letter-spacing:.4px; padding:4px 8px 6px; text-align:center; display:flex; align-items:center; justify-content:center; }
}

.box-button {
    --press-shift: 10px;
    position: relative;
    cursor: pointer;
    border: 4px solid #000;
    background: #9ca3af;
    /* gray */
    padding: 0 0 var(--press-shift);
    text-decoration: none;
    line-height: 1;
    display: inline-block;
    user-select: none;
    transition: transform .12s cubic-bezier(.4, 0, .2, 1), box-shadow .12s, background .25s;
    box-shadow: 6px 6px 0 #000;
}

.box-button:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
}

.box-button .button {
    background: #f1f5f9;
    border: 4px solid #fff;
    padding: 4px 14px 6px;
    /* ligero extra bottom para percepción centrada */
    display: block;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .5px;
    color: #111;
    text-transform: uppercase;
    position: relative;
    box-shadow: inset 0 0 0 2px #00000010;
    transition: filter .2s;
}

.box-button .button span {
    font-size: 1.05em;
    letter-spacing: .06em;
}

.box-button:hover {
    background: #6b7280;
}

.box-button:hover .button {
    filter: brightness(1.03);
}

.box-button:active {
    padding: 0;
    /* elimina espacio inferior -> efecto "hundido" */
    margin-top: var(--press-shift);
    box-shadow: 2px 2px 0 #000;
    transform: translateY(var(--press-shift));
}

@media (prefers-reduced-motion:reduce) {
    .box-button {
        transition: none;
    }

    .box-button .button {
        transition: none;
    }
}

/* Projects */
.projects-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.project-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 1.2rem 1.15rem 1.4rem;
    border-radius: var(--radius);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    box-shadow: var(--shadow);
    transition: border-color .25s, transform .25s, box-shadow .25s;
}

/* Project cover image */
.project-card__cover {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 0 0 1px #fff;
}

.project-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.project-card__cover img[data-project="timetotag"] {
    object-position: 50% 38%;
}

.project-card:hover .project-card__cover img {
    transform: scale(1.05);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 6px 22px -6px rgba(0 0 0 / .18);
}

.project-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

/* Badge Destacado */
.project-badge {
    display: inline-block;
    background: #fde047;
    color: #000;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .28rem .45rem .3rem;
    border: 2px solid #000;
    border-radius: .4rem;
    margin-left: .45rem;
    position: relative;
    line-height: 1;
    box-shadow: 4px 4px 0 #000;
    transform: rotate(-3deg);
    transition: transform .25s ease, box-shadow .25s ease;
}

.project-badge:hover {
    transform: rotate(-3deg) translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.project-card__desc {
    margin: 0;
    font-size: .9rem;
    opacity: .85;
}

.tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.tags li {
    background: #f1f5f9;
    font-size: .65rem;
    letter-spacing: .5px;
    padding: .35rem .55rem .3rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #334155;
}

.project-card__links {
    display: flex;
    gap: .9rem;
    margin-top: auto;
    /* empuja los enlaces al fondo de la tarjeta */
    padding-top: .75rem;
    border-top: 1px dashed #e2e8f0;
}

.link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: .85rem;
    position: relative;
}

.link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s;
}

.link:hover::after {
    transform: scaleX(1);
}

/* ===== Upcoming Projects Styles ===== */
.project-card.upcoming {
    opacity: 0.85;
    position: relative;
}

.project-card.upcoming::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(99, 102, 241, 0.05));
    border-radius: 18px;
    z-index: 1;
    pointer-events: none;
}

.upcoming-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    color: #64748b;
    text-align: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.upcoming-placeholder::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    animation: shine 3s infinite;
    z-index: 1;
}

.upcoming-placeholder svg {
    z-index: 2;
    position: relative;
}

.upcoming-placeholder span {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    position: relative;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.project-card.upcoming:hover {
    opacity: 1;
    transform: translateY(-4px);
}

.project-card.upcoming h3 {
    color: #475569;
}

.project-card.upcoming .project-card__desc {
    color: #64748b;
    font-style: italic;
}

/* Dark theme support for upcoming projects */
body.dark-theme .upcoming-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #94a3b8;
}

body.dark-theme .project-card.upcoming::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(99, 102, 241, 0.1));
}

body.dark-theme .project-card.upcoming h3 {
    color: #cbd5e1;
}

body.dark-theme .project-card.upcoming .project-card__desc {
    color: #94a3b8;
}

/* ===== More Projects CTA ===== */
.more-projects-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* About */
.about {
    display: grid;
    gap: 2.5rem;
}

.about {
    justify-items: center;
}

/* Center about section with flex (simpler single column) */
#sobre-mi .about {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 900px) {
    .about {
        grid-template-columns: 1fr 320px;
        align-items: start;
    }
}

.about__skills h3 {
    margin-top: 0;
}

.chips {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.chip {
    --c: var(--accent);
    position: relative;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .55rem .75rem;
    border-radius: 999px;
    background: linear-gradient(#fff, #f1f5f9);
    border: 1px solid #cbd5e1;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0 0 0 / .06);
}

.chip:hover {
    border-color: var(--accent);
}

/* Contact */
.contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 640px;
}

.field {
    display: grid;
    gap: .45rem;
}

label {
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}

input,
textarea {
    font: inherit;
    padding: .85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    background: #fff;
    resize: vertical;
    transition: border-color .25s, box-shadow .25s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb) / .25);
}

.error {
    border-color: #dc2626 !important;
}

.error-msg {
    color: #dc2626;
    font-size: .7rem;
    min-height: 1em;
}

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

.form-status {
    font-size: .8rem;
    font-weight: 500;
}

/* Footer */
.footer {
    padding: 2.5rem 0;
    background: #0f172a;
    color: #e2e8f0;
    margin-top: 2rem;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .footer__inner {
        flex-direction: row;
        align-items: center;
    }
}

.social {
    display: flex;
    gap: 1.25rem;
}

.social__link {
    color: #94a3b8;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.social__link:hover {
    color: #fff;
}

/* Utilities */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: #000;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: .5rem;
    z-index: 1000;
}

.accent {
    color: var(--accent);
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==== Card Component (Fancy Project Card) ==== */
.card {
    --primary: #ff3e00;
    --primary-hover: #ff6d43;
    --secondary: #4d61ff;
    --secondary-hover: #5e70ff;
    --accent: #00e0b0;
    --text: #050505;
    --bg: #ffffff;
    --shadow-color: #000000;
    --pattern-color: #cfcfcf;
    position: relative;
    width: 20em;
    background: var(--bg);
    border: 0.35em solid var(--text);
    border-radius: 0.6em;
    box-shadow: 0.7em 0.7em 0 var(--shadow-color), inset 0 0 0 0.15em rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    font-family: inherit;
    transform-origin: center;
}

/* Wide variation for About section */
.card.card--wide {
    width: 100%;
    max-width: 760px;
}

@media (min-width:1000px) {
    .card.card--wide {
        max-width: 880px;
    }
}

/* === Tech band redesign: colored icons + labels vertically === */
.tech-band .tech-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: .55rem .8rem .6rem;
    min-width: 70px;
}

.tech-band .tech-item i {
    font-size: 28px;
    line-height: 1;
    filter: none;
}

/* Bash icon visibility: force white glyph with subtle outline */
.tech-band .devicon-bash-plain.colored { color:#1f2937; filter:drop-shadow(0 0 2px #fff); }
body.dark-theme .tech-band .devicon-bash-plain.colored { color:#ffffff; filter:drop-shadow(0 0 2px #000); }

body.dark-theme .tech-band .tech-item i {
    filter: none;
}

.tech-band .badge-learning {
    display: none !important;
}

.tech-band .tech-label {
    display: block;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    background: #fff;
    color: #111;
    padding: .25em .5em .3em;
    border: 1.5px solid #000;
    border-radius: 6px;
    box-shadow: 2px 2px 0 #000;
}

body.dark-theme .tech-band .tech-label {
    background: #fff;
    color: #111;
}

/* Optional: reduce animation speed if needed */

/* About (Quién Soy) adjustments */
.card.card--wide {
    margin-left: auto;
    margin-right: auto;
}

.card.card--wide .card-pattern-grid {
    display: none;
}

/* Center text */
.card.card--wide .card-body {
    text-align: center;
}

.card.card--wide .card-description {
    margin-left: auto;
    margin-right: auto;
}

/* Feature grid centered and spacing */
.card.card--wide .feature-grid {
    justify-items: center;
}

.card.card--wide .feature-item {
    justify-content: center;
}

/* Enlarge tag (Perfil) */
.card.card--wide .card-tag {
    font-size: 0.65em;
    padding: 0.5em 1.05em;
}

/* Enlarge feature icons & soften color */
.card.card--wide .feature-icon {
    width: 2.1em;
    height: 2.1em;
    background: #f1f5f9;
    color: #111;
    border-color: #000;
}

.card.card--wide .feature-icon svg {
    width: 1.3em;
    height: 1.3em;
}

.card.card--wide .feature-text {
    font-size: 0.95rem;
}

/* Softer overall secondary color within card--wide to reduce blue saturation */
.card.card--wide {
    --secondary: #6975ff30;
    --secondary-hover: #6975ff50;
}

/* Adjust card tag shadow slightly lighter */
.card.card--wide .card-tag {
    box-shadow: 0.25em 0.25em 0 #000;
}

/* Minimal profile variant */
.card--profile-min {
    position: relative;
    border: 2px solid #000;
    box-shadow: 6px 6px 0 #000;
    padding: 1.75rem 1.85rem 2.05rem;
    background: #fff;
    width: 100%;
    max-width: 880px;
    border-radius: 22px;
}

body.dark-theme .card--profile-min {
    background: #fff;
}

.profile-head {
    margin: 0 0 .75rem;
}

.profile-title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 800;
}

.profile-body {
    text-align: center;
}

.profile-lead {
    margin: .15rem 0 1rem;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.45;
    max-width: 60ch;
    text-align: left;
}

.profile-text {
    max-width: 60ch;
    margin: 0 0 1.1rem;
    text-align: left;
    display: grid;
    gap: .75rem;
    font-size: .94rem;
    line-height: 1.5;
}

.profile-text p {
    margin: 0;
}

/* Chips + CTA shared layout */
.profile-meta-wrapper { display:none; }
.profile-meta { display:flex; flex-wrap:wrap; gap:.3rem .4rem; margin:10px 0 10px; padding:0; overflow:visible; justify-content:flex-start; }
.profile-meta--inline { justify-content:flex-start; }
.profile-cta--block { display:block; width:100%; text-align:center; margin-top:4px; }
@media (max-width:640px){ .profile-meta-wrapper { grid-template-columns:1fr; } .profile-cta { justify-self:start; } }

.pill { background:#fff; color:#111; padding:.34em .58em .4em; font-size:.55rem; letter-spacing:.45px; font-weight:700; text-transform:uppercase; border:2px solid #000; border-radius:999px; box-shadow:3px 3px 0 #000; position:relative; line-height:1; white-space:nowrap; }

.pill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .12));
    mix-blend-mode: multiply;
    border-radius: inherit;
    pointer-events: none;
}

body.dark-theme .pill {
    background: #fff;
    color: #111;
}

.profile-cta {
    display: inline-block;
    background: #f8fafc;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .9em 1.45em .95em;
    border: 2px solid #111;
    border-radius: 16px;
    box-shadow: 4px 4px 0 #111;
    transition: .28s cubic-bezier(.23, 1, .32, 1);
    font-size: .78rem;
    text-transform: uppercase;
}

.profile-cta:hover {
    background: #111;
    color: #fff;
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 #111;
}

.profile-cta:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #111;
}

body.dark-theme .profile-cta {
    background: #fff;
    color: #111;
}

body.dark-theme .profile-cta:hover {
    background: #111;
    color: #fff;
}
/* Accent variant */
/* Unified accent CTA */
.profile-cta--accent { background:linear-gradient(135deg,var(--color-accent),var(--color-accent-alt)); color:#fff; border:2px solid var(--color-border); box-shadow:5px 5px 0 var(--color-border); position:relative; overflow:hidden; }
.profile-cta--accent::after { content:""; position:absolute; inset:0; background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 60%); mix-blend-mode:overlay; pointer-events:none; }
.profile-cta--accent:hover { background: linear-gradient(135deg,#1d4ed8,#4338ca); color:#fff; box-shadow:9px 9px 0 var(--color-border); transform: translate(-4px,-4px); }
.profile-cta--accent:active { transform: translate(1px,1px); box-shadow:2px 2px 0 var(--color-border); }
body.dark-theme .profile-cta--accent { background: linear-gradient(135deg,#3b82f6,#6366f1); }
body.dark-theme .profile-cta--accent:hover { background: linear-gradient(135deg,#2563eb,#4f46e5); }

/* Value line under badge */
.value-line { margin:.4rem 0 0; font-size:.85rem; font-weight:500; background:#fff; border:2px solid #000; display:inline-block; padding:.45rem .7rem .5rem; border-radius:10px; box-shadow:4px 4px 0 #000; max-width:19ch; }
@media (max-width:520px){ .value-line { font-size:.78rem; max-width:22ch; } }

/* Mobile improvements */
@media (max-width:640px){
    .hero__inner { gap:1.75rem; }
    .hero__avatar { width:200px; }
    .hero__badge-wrap { display:flex; flex-direction:column; align-items:center; text-align:center; width:100%; }
    .projects-grid { gap:1.4rem; }
    .project-card__cover img { width:100%; height:auto; }
    .footer__inner { padding:2rem 0; }
    .site-nav__inner { padding:.55rem .75rem; }
    .site-nav__menuBtn { display:block; margin-left:.4rem; order:5; max-height:38px; }
    .nav-spacer { order:2; flex:1 0 12px; }
    .nav-cv { display:inline-flex; align-items:center; gap:.3rem; order:3; font-size:.62rem; padding:.4rem .6rem .43rem; margin-left:.3rem; background:#fff; border:2px solid #000; border-radius:.55rem; box-shadow:4px 4px 0 #000; font-weight:700; letter-spacing:.5px; text-decoration:none; color:#000; }
    .nav-cv svg { color:#000; }
    body.dark-theme .nav-cv { background:#fff; color:#000; }
    body.dark-theme .nav-cv svg { color:#000; }
    .theme-toggle { order:4; margin-left:.45rem; height:38px; padding:.4rem .55rem; box-shadow:4px 4px 0 #000; }
    .site-nav__brand { order:1; }
    .nav-theme { order:3; margin-left:.5rem; }
    .site-nav__brand { order:1; }
    .site-nav__links { font-size:.9rem; }
        .hero-cv-btn { display:none; }
}
@media (min-width:641px){ .hero-cv-btn { display:inline-flex; } }

/* Hero CV botón amarillo destacado en desktop */
@media (min-width:641px){
    .hero-cv-btn { background:#facc15; box-shadow:6px 6px 0 #000; padding:0 0 10px; }
    .hero-cv-btn .button { background:#fffdf0; border-color:#fff; color:#000; font-size:.8rem; padding:4px 14px 6px; letter-spacing:.45px; width:100%; display:block; }
    .hero-cv-btn .button span { display:inline-block; width:100%; text-align:center; }
    .hero-cv-btn:hover { background:#ffd633; }
    body.dark-theme .hero-cv-btn { background:#facc15; }
    body.dark-theme .hero-cv-btn .button { background:#fff; color:#000; }
}

/* Textos sobre tarjetas blancas en dark mode forzar negro (excluye hero subtitle which has its own dark-card style) */
body.dark-theme .project-card__desc,
body.dark-theme .project-card h3,
body.dark-theme .tags li { color:#000; }
body.dark-theme .project-card { color:#000; }
body.dark-theme .tags li { background:#f1f5f9; }

/* Mobile cover position tweaks for logos visibility */
@media (max-width:640px){
    img[data-project="clariveye"] { object-position:50% 40%; }
    img[data-project="timetotag"] { object-position:50% 32%; }
}

/* Smaller tap target adjustments */
@media (max-width:480px){
    .box-button .button { padding:.75rem 1rem; }
    .contact-btn { padding:1rem 1.1rem; }
}

/* CV button variant */
/* Removed old hero CV button variant; nav-cv now primary */

@media (max-width:640px) {
    .card--profile-min {
        padding: 1.4rem 1.1rem 1.6rem;
    }

    .profile-points {
        font-size: .92rem;
    }
}

.card:hover {
    transform: translate(-0.4em, -0.4em) scale(1.02);
    box-shadow: 1em 1em 0 var(--shadow-color);
}

.card:hover .card-pattern-grid,
.card:hover .card-overlay-dots {
    opacity: 1;
}

.card:active {
    transform: translate(0.1em, 0.1em) scale(0.98);
    box-shadow: 0.5em 0.5em 0 var(--shadow-color);
}

.card::before {
    content: "";
    position: absolute;
    top: -1em;
    right: -1em;
    width: 4em;
    height: 4em;
    background: var(--accent);
    transform: rotate(45deg);
    z-index: 1;
}

.card::after {
    content: "★";
    position: absolute;
    top: 0.4em;
    right: 0.4em;
    color: var(--text);
    font-size: 1.2em;
    font-weight: bold;
    z-index: 2;
}

.card-pattern-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 0.5em 0.5em;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.card-overlay-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--pattern-color) 1px, transparent 1px);
    background-size: 1em 1em;
    background-position: -0.5em -0.5em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.bold-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 6em;
    height: 6em;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.card-title-area {
    position: relative;
    padding: 1.4em;
    background: var(--primary);
    color: var(--bg);
    font-weight: 800;
    font-size: 1.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.35em solid var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    overflow: hidden;
}

.card-title-area::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 0.5em, transparent 0.5em, transparent 1em);
    pointer-events: none;
    opacity: 0.3;
}

.card-tag {
    background: var(--bg);
    color: var(--text);
    font-size: 0.55em;
    font-weight: 800;
    padding: 0.4em 0.8em;
    border: 0.15em solid var(--text);
    border-radius: 0.3em;
    box-shadow: 0.2em 0.2em 0 var(--shadow-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: rotate(3deg);
    transition: all 0.3s ease;
}

.card:hover .card-tag {
    transform: rotate(-2deg) scale(1.1);
    box-shadow: 0.25em 0.25em 0 var(--shadow-color);
}

.card-body {
    position: relative;
    padding: 1.5em;
    z-index: 2;
}

.card-description {
    margin-bottom: 1.4em;
    color: #111;
    font-size: 1.02em;
    /* bigger for readability */
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: .15px;
    max-width: 60ch;
}

body.dark-theme .card-description {
    color: #111;
}

/* Improve feature list readability */
.feature-grid {
    gap: 1em;
}

.feature-item {
    font-size: .95em;
}

.feature-text {
    font-weight: 600;
    letter-spacing: .3px;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85em;
    margin-bottom: 1.1em;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6em;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateX(0.3em);
}

.feature-icon {
    width: 1.4em;
    height: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border: 0.12em solid var(--text);
    border-radius: 0.3em;
    box-shadow: 0.2em 0.2em 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.feature-item:hover .feature-icon {
    background: var(--secondary-hover);
    transform: rotate(-5deg);
}

.feature-icon svg {
    width: 0.9em;
    height: 0.9em;
    fill: var(--bg);
}

.feature-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text);
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.1em;
    padding-top: 1em;
    border-top: 0.15em dashed rgba(0, 0, 0, 0.15);
    position: relative;
}

.card-actions::before {
    content: "✂";
    position: absolute;
    top: -0.8em;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    background: var(--bg);
    padding: 0 0.5em;
    font-size: 1em;
    color: rgba(0, 0, 0, 0.4);
}

.price {
    position: relative;
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text);
    background: var(--bg);
}

.price::before {
    content: "";
    position: absolute;
    bottom: 0.15em;
    left: 0;
    width: 100%;
    height: 0.2em;
    background: var(--accent);
    z-index: -1;
    opacity: 0.5;
}

.price-currency {
    font-size: 0.55em;
    font-weight: 700;
    vertical-align: top;
    margin-right: 0.1em;
}

.price-period {
    display: block;
    font-size: 0.38em;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    margin-top: 0.15em;
}

.card-button {
    position: relative;
    background: var(--secondary);
    color: var(--bg);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.6em 1.1em;
    border: 0.2em solid var(--text);
    border-radius: 0.4em;
    box-shadow: 0.3em 0.3em 0 var(--shadow-color);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    transition: left 0.6s ease;
}

.card-button:hover {
    background: var(--secondary-hover);
    transform: translate(-0.1em, -0.1em);
    box-shadow: 0.4em 0.4em 0 var(--shadow-color);
}

.card-button:hover::before {
    left: 100%;
}

.card-button:active {
    transform: translate(0.1em, 0.1em);
    box-shadow: 0.15em 0.15em 0 var(--shadow-color);
}

.dots-pattern {
    position: absolute;
    bottom: 2em;
    left: -2em;
    width: 8em;
    height: 4em;
    opacity: 0.3;
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: 1;
}

.accent-shape {
    position: absolute;
    width: 2.5em;
    height: 2.5em;
    background: var(--secondary);
    border: 0.15em solid var(--text);
    border-radius: 0.3em;
    transform: rotate(45deg);
    bottom: -1.2em;
    right: 2em;
    z-index: 0;
    transition: transform 0.3s ease;
}

.card:hover .accent-shape {
    transform: rotate(55deg) scale(1.1);
}

.stamp {
    position: absolute;
    bottom: 1.5em;
    left: 1.5em;
    width: 4em;
    height: 4em;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.15em solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transform: rotate(-15deg);
    opacity: 0.2;
    z-index: 1;
}

.stamp-text {
    font-size: 0.5em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.corner-slice {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1.5em;
    height: 1.5em;
    background: var(--bg);
    border-right: 0.25em solid var(--text);
    border-top: 0.25em solid var(--text);
    border-radius: 0 0.5em 0 0;
    z-index: 1;
}

/* Utility layout for card inside existing grid */
.projects-grid .card {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
}

/* Wide variant used in About section as textual callout */
.card-button--wide {
    width: 100%;
    display: block;
    text-align: left;
    line-height: 1.4;
    font-size: .8rem;
    padding: 1.1em 1.2em 1.25em;
    white-space: normal;
}

.card-button--wide .about-callout {
    display: block;
}

/* Remove background fill from alt section variant now unused for About */
section#sobre-mi.section {
    background: transparent;
}

body.dark-theme section#sobre-mi.section {
    background: transparent;
}

/* Layout Sobre mí (simplified: left content flexible, right auto width) */
.profile-grid { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:36px; align-items:start; }
.profile-side { width:340px; max-width:360px; }
@media (max-width:1000px){ .profile-side { width:320px; } }
@media (max-width:900px){ .profile-grid { grid-template-columns:1fr; } .profile-side { width:100%; max-width:100%; } }

/* CV mini block (Rol, Stack, etc) refined spacing */
.cv-mini { background:#fff; border:2px solid #000; border-radius:14px; padding:12px 16px 14px; box-shadow:6px 6px 0 #000; display:flex; flex-direction:column; gap:4px; }
.cv-row { display:grid; grid-template-columns:90px 1fr; align-items:center; gap:4px 10px; font-size:.78rem; line-height:1.25; padding:2px 0; }
.cv-label { background:#000; color:#fff; padding:.32em .55em .36em; font-weight:600; border-radius:7px; font-size:.6rem; letter-spacing:.45px; text-transform:uppercase; text-align:center; white-space:nowrap; }
.cv-value { font-size:.72rem; line-height:1.3; font-weight:500; }
@media (min-width:640px){ .cv-row { font-size:.8rem; grid-template-columns:105px 1fr; } .cv-value { font-size:.74rem; } }
@media (min-width:900px){ .cv-row { font-size:.82rem; } .cv-value { font-size:.75rem; } }

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

.certification-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 8px 8px 0 #000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certification-card:hover {
  transform: translateY(-2px);
  box-shadow: 10px 10px 0 #000;
}

.certification-card--placeholder {
  border-style: dashed;
  background: #f8fafc;
  opacity: 0.8;
}

.certification-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.certification-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
}

.certification-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.certification-icon svg {
  color: #64748b;
}

.certification-info {
  flex: 1;
  min-width: 0;
}

.certification-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.25rem 0;
  color: #0f172a;
}

.certification-org {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.125rem 0;
  font-weight: 500;
}

.certification-level {
  font-size: 0.8rem;
  color: #059669;
  font-weight: 600;
  margin: 0;
}

.certification-body {
  margin-bottom: 1.25rem;
}

.certification-description {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 1rem 0;
}

.certification-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: #e2e8f0;
  color: #334155;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #cbd5e1;
}

.certification-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.certification-date {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.certification-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2563eb;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid #2563eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.certification-link:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}

.certification-link svg {
  flex-shrink: 0;
}

/* Logos específicos */
.ibm-text {
  font-family: 'Arial', sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: #000;
  letter-spacing: 2px;
  background: linear-gradient(45deg, #0f62fe, #0353e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  display: block;
}

/* Ajuste específico para el contenedor del logo IBM */
.ibm-icon {
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f8fafc !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
}

body.dark-theme .ibm-text {
  background: linear-gradient(45deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-theme .ibm-icon {
  background: #1e293b !important;
  border-color: #475569 !important;
}

/* Dark theme para certificaciones */
body.dark-theme .certification-card {
  background: #1e293b;
  border-color: #475569;
  box-shadow: 8px 8px 0 #475569;
}

body.dark-theme .certification-card:hover {
  box-shadow: 10px 10px 0 #475569;
}

body.dark-theme .certification-card--placeholder {
  background: #0f172a;
  border-color: #334155;
}

body.dark-theme .certification-title {
  color: #f1f5f9;
}

body.dark-theme .certification-org {
  color: #94a3b8;
}

body.dark-theme .certification-description {
  color: #cbd5e1;
}

body.dark-theme .skill-tag {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}

body.dark-theme .certification-footer {
  border-color: #475569;
}

body.dark-theme .certification-date {
  color: #94a3b8;
}

body.dark-theme .certification-link {
  color: #60a5fa;
  border-color: #60a5fa;
}

body.dark-theme .certification-link:hover {
  background: #60a5fa;
  color: #0f172a;
}

/* Apply certification dark-theme look to other card-like components */
body.dark-theme .card,
body.dark-theme .project-card,
body.dark-theme .blog-post-card,
body.dark-theme .related-post-card,
body.dark-theme .item-card {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 8px 8px 0 #475569;
    color: #e2e8f0;
}

body.dark-theme .card:hover,
body.dark-theme .project-card:hover,
body.dark-theme .blog-post-card:hover,
body.dark-theme .related-post-card:hover,
body.dark-theme .item-card:hover {
    box-shadow: 10px 10px 0 #475569;
}

/* Titles / headings inside cards */
body.dark-theme .card h3,
body.dark-theme .project-card__header h3,
body.dark-theme .project-card h3,
body.dark-theme .card-title-area h3,
body.dark-theme .profile-title,
body.dark-theme .item-card h3,
body.dark-theme .blog-post-card h3 {
    color: #f1f5f9;
}

/* Descriptions and smaller text */
body.dark-theme .project-card__desc,
body.dark-theme .card-description,
body.dark-theme .item-card small,
body.dark-theme .related-post-card p,
body.dark-theme .blog-post-card p {
    color: #cbd5e1;
}

/* Tags inside project cards reuse skill-tag dark style */
body.dark-theme .tags li,
body.dark-theme .skill-tag {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

/* Responsive para certificaciones */
@media (max-width: 768px) {
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .certification-card {
    padding: 1.25rem;
  }
  
  .certification-header {
    gap: 0.75rem;
  }
  
  .certification-icon {
    width: 40px;
    height: 40px;
  }
  
  .certification-title {
    font-size: 1rem;
  }
}