    /* ============ GLOBAL ============ */

    :root {

        --background: #fbfbfd;
        --surface: rgba(255, 255, 255, 0.9);

        --primary: #4f46e5;
        --primary-dark: #3730a3;
        --secondary: #818cf8;

        --text: #0f172a;
        --muted: #475569;

        --border: rgba(15, 23, 42, 0.12);
        --focus-ring: #1d4ed8;

        --radius: 28px;

        --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);

        --max-width: 1280px;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        cursor: none;
        font-family: Inter, sans-serif;
        color: var(--text);
        background: var(--background);
        overflow-x: hidden;
        line-height: 1.5;
        margin: 0;
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background:
            radial-gradient(circle at 15% 20%, rgba(79, 70, 229, 0.18), transparent 30%),
            radial-gradient(circle at 90% 20%, rgba(168, 85, 247, 0.15), transparent 25%),
            radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.15), transparent 30%);
        pointer-events: none;
        z-index: -1;
    }

    a {
        color: inherit;
        text-decoration: none;
    }

    h1,
    h2,
    h3 {
        line-height: 1.15;
    }

    a:focus-visible,
    button:focus-visible {
        outline: 3px solid var(--focus-ring);
        outline-offset: 3px;
        border-radius: 8px;
    }

    .container {
        width: min(92%, var(--max-width));
        margin: auto;
    }

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

    .skip-link {
        position: absolute;
        left: -9999px;
        top: 0;
        z-index: 2000;
    }

    .skip-link:focus {
        left: 20px;
        top: 20px;
        background: white;
        color: var(--text);
        padding: 1rem 1.25rem;
        border-radius: 12px;
        box-shadow: var(--shadow);
    }

    /* ============ HEADER ============ */
    header {
        top: 0;
        width: 100%;
        z-index: 1000;
        position: relative;
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.7);
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 80px;
    }

    .logo {
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: 3px;
        color: var(--primary);
    }

    nav ul {
        list-style: none;
        display: flex;
        gap: 2rem;
    }

    nav a {
        display: inline-block;
        padding: 0.4rem 0.1rem;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--muted);
        transition: color 0.3s;
    }

    nav a:hover {
        color: var(--text);
    }

    .nav-toggle {
        display: none;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        cursor: pointer;
    }

    .nav-toggle-icon,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        display: block;
        width: 20px;
        height: 2px;
        background: var(--text);
        position: relative;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .nav-toggle-icon::before {
        top: -6px;
    }

    .nav-toggle-icon::after {
        top: 6px;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-icon {
        background: transparent;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
        transform: translateY(-6px) rotate(-45deg);
    }


    /* ============ BODY ============ */

    .items {
        gap: 2rem;
        align-items: center;
        padding-top: 10rem;
    }

    .tag {
        display: block;
        width: fit-content;
        margin-bottom: 1.5rem;
        padding: 0.6rem 1rem;
        border-radius: 999px;
        background: rgba(79, 70, 229, 0.1);
        color: var(--primary-dark);
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 2px;
    }

    h1 {
        font-size: clamp(2.75rem, 8vw, 6rem);
        line-height: 0.95;
        margin-bottom: 2rem;
    }


    .buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin-top: 2.5rem;
        display: flex;
    }

    .button {
        display: inline-block;
        padding: 1rem 1.5rem;
        border-radius: 16px;
        font-weight: 600;
        transition: transform 0.3s ease;
    }

    .button:hover {
        transform: translateY(-2px);
    }

    .primary {
        background: var(--primary);
        color: white;
    }

    .primary:hover {
        background: var(--primary-dark);
    }

    .secondary {
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
    }

    .orb {
        position: fixed;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: linear-gradient(135deg, #4f46e5, #818cf8, #a855f7);
        filter: blur(30px);
        opacity: 0.35;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    .item {
        gap: 2rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .item h2 {
        grid-column: 1 / -1;
        margin-bottom: 0.5rem;
    }

    .item p {
        color: var(--muted);
        font-size: 1.2rem;
        line-height: 1.8;
        text-align: justify;
    }

    .centered {
        margin: auto;
    }

    .w-background {
        position: relative;
        margin: auto;
        display: flex;
        flex-direction: column;
    }

    .grid-full-width {
        grid-column: 1 / -1;
    }

    .glass-card {
        position: relative;
        z-index: 1;

        display: flex;
        flex-direction: column;
        justify-content: center;

        min-height: 140px;
        padding: 1.5rem;

        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 20px;

        background:
            linear-gradient(135deg,
                rgba(255, 255, 255, 0.11),
                rgba(255, 255, 255, 0.035));

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);

        box-shadow:
            0 20px 45px rgba(0, 0, 0, 0.12);

        transition:
            transform 0.3s ease,
            border-color 0.3s ease,
            background 0.3s ease;
    }

    .glass-card:hover {
        transform: translateY(-4px);

        border-color: rgba(255, 255, 255, 0.28);

        background:
            linear-gradient(135deg,
                rgba(255, 255, 255, 0.15),
                rgba(255, 255, 255, 0.05));
    }

    .glass-card-title {
        position: relative;
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        opacity: 0.6;
    }

    .glass-card p {
        position: relative;
        max-width: 90%;
        font-size: 1rem;
        line-height: 1.55;
        opacity: 0.9;
    }

    .stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stack::before {
        content: "";

        position: absolute;
        z-index: 0;

        width: 80%;
        height: 70%;

        top: 15%;

        background:
            linear-gradient(135deg,
                rgba(120, 100, 255, 0.10),
                rgba(80, 180, 255, 0.05) 45%,
                transparent 75%);

        filter: blur(70px);

        pointer-events: none;
    }

    .stack--primary {
        display: grid;
        grid-template-columns: 1fr;
    }

    .stack--secondary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stack--primary .glass-card-title {
        font-size: 2rem;
    }

    .stack--primary p {
        font-size: 1.2rem;
    }

    .section-tag {
        display: inline-block;
        margin-top: 4rem;
        color: var(--primary-dark);
        letter-spacing: 2px;
        font-weight: 700;
    }

    .section-title h2 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .about-text {
        max-width: 800px;
        color: var(--muted);
        font-size: 1.05rem;
        line-height: 1.8;
    }

    /* ============ 6. TARJETAS (HERRAMIENTAS) ============ */
    .cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .card {
        padding: 2rem;
        border-radius: var(--radius);
        background: var(--surface);
        /* subido de 0.7 a 0.9 de opacidad para el contraste del texto */
        backdrop-filter: blur(20px);
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .card h3 {
        margin-bottom: 1rem;
    }

    .card li {
        margin-bottom: 0.5rem;
        color: var(--muted);
    }

    /* ============ 7. TIMELINE (EXPERIENCIA) ============ */
    .timeline {
        position: relative;
        max-width: 800px;
        margin: 3rem auto;
    }

    .timeline::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 10px;
        width: 2px;
        background: var(--primary);
    }

    .timeline::after {
        content: "";
        position: absolute;
        left: 0px;
        width: 40px;
        height: 2px;
        background: var(--primary);
    }

    .timeline-item {
        position: relative;
        padding-left: 3rem;
        padding-bottom: 3rem;
    }

    .timeline-marker {
        position: absolute;
        top: 0.35rem;
        left: 0;
        
        width: 18px;
        height: 18px;
        
        border-radius: 50%;
        background: var(--background);
        border: 3px solid var(--primary);
        
        z-index: 1;
    }

    .timeline-content {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .year {
        min-width: 80px;
        color: var(--primary-dark);
        font-weight: 700;
    }

    /* ============ 8. CONTACTO ============ */
    .contact-box {
        padding: 3rem clamp(1.5rem, 6vw, 4rem);
        border-radius: 40px;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(168, 85, 247, 0.14));
        border: 1px solid var(--border);
    }

    .contact-box h2 {
        margin-bottom: 1rem;
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }

    .contact-box p {
        margin-bottom: 2rem;
        color: var(--muted);
        font-size: 1.05rem;
    }

    /* ============ 9. FOOTER ============ */
    footer {
        padding: 4rem 0;
        margin-top: 6rem;
        border-top: 1px solid var(--border);
    }

    .footer-content {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: space-between;
        align-items: center;
    }

    .footer-content p {
        margin-top: 0.5rem;
        color: var(--muted);
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .footer-links a {
        color: var(--muted);
        font-weight: 500;
        transition: color 0.3s;
    }

    .footer-links a:hover {
        color: var(--primary-dark);
    }

    /* ============ 10. ANIMACIÓN DE APARICIÓN AL HACER SCROLL ============ */
    .hidden {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .visible {
        opacity: 1;
        transform: translateY(0);
    }


    /* ============ RESPONSIVE ============ */
@media (max-width: 900px) {

    .nav-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        z-index: 1000;
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.7);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 1.5rem 0;

        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;

        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    nav[data-open="true"] {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        width: min(92%, var(--max-width));
        margin: auto;
        padding: 0;
    }

    nav a {
        display: block;
        padding: 1rem 0.25rem;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border);
    }

    /* lo que ya tenías */
    .item {
        grid-template-columns: 1fr;
    }

    .item h2 {
        grid-column: 1;
    }

    .stack {
        grid-template-columns: 1fr;
    }

    .stack--secondary {
        grid-template-columns: 1fr 1fr;
    }

    .timeline {
        max-width: 100%;
    }
}

@media (max-width: 600px) {

    .logo {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    /* BOTONES */
    .buttons {
        width: 100%;
    }

    .buttons .button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    /* CONTACTO */
    .contact-box {
        padding: 2rem 1.25rem;
    }

    .contact-box .button {
        width: auto;
    }

    /* Espaciado general */
    .container {
        width: min(90%, var(--max-width));
    }

    /* Hero */
    .items {
        padding-top: 7rem;
    }

    h1 {
        font-size: clamp(2.5rem, 14vw, 4rem);
    }

    .item p {
        font-size: 1rem;
        text-align: left;
    }

    /* Botones */
    .buttons {
        flex-direction: column;
        width: 100%;
    }

    .button {
        width: 100%;
        text-align: center;
    }

    /* Stack */
    .stack--secondary {
        grid-template-columns: 1fr;
    }

    .stack--primary .glass-card-title {
        font-size: 1.5rem;
    }

    .stack--primary p {
        font-size: 1rem;
    }

    .glass-card {
        min-height: 120px;
        padding: 1.25rem;
    }

    .glass-card p {
        max-width: 100%;
    }

    /* Timeline */
    .timeline {
        margin-top: 2rem;
    }

    .timeline-item {
        padding-left: 2.5rem;
        padding-bottom: 2rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    /* Orb */
    .orb {
        width: 90px;
        height: 90px;
        filter: blur(25px);
    }

    /* Contacto */
    .contact-box {
        padding: 2rem 1.25rem;
        border-radius: 28px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        gap: 1rem;
        flex-direction: column;
    }
}

/* No ocultar el cursor en dispositivos táctiles */
@media (pointer: coarse) {
    body {
        cursor: auto;
    }

    .orb {
        display: none;
    }
}