:root {
    --bg: #050505;
    --accent: #00f2ff;
    --card-bg: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.1);
    --text-dim: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

#cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 260px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,105,180,0.35) 0%, rgba(255,105,180,0.08) 30%, transparent 60%);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.max-800 {
    max-width: 800px;
}

.max-600 {
    max-width: 600px;
}

.text-accent {
    color: var(--accent);
}

/* NAVBAR */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(5,5,5,0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    transition: padding 0.3s ease, background 0.3s ease;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: white;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    margin-left: 1.5rem;
    font-size: 0.9rem;
    transition: 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-nav {
    border: 1px solid var(--accent);
    padding: 0.5rem 1.2rem !important;
    border-radius: 50px;
    color: var(--accent) !important;
}

/* HERO */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    margin: 2rem 0 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #ced4f0;
    margin-bottom: 2rem;
}

.hero h1 span {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.4s;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-primary {
    background: var(--accent);
    color: black;
}

.btn-secondary {
    border: 1px solid var(--border);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-5px);
}

/* SECCIONES */
section {
    padding: 120px 0;
    scroll-margin-top: 100px;
    position: relative;
    z-index: 1;
}

.centered-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 4rem;
}

/* SOBRE MI */
.about-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.about-card p {
    margin-bottom: 1.5rem;
    color: #ccc;
    font-size: 1.1rem;
}

/* HABILIDADES BLANDAS */
.soft-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: 0.4s;
    cursor: default;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    background: rgba(255,255,255,0.07);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

.skill-card h3 {
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--text-dim);
}

/* TRAYECTORIA */
.timeline-container {
    position: relative;
    padding-left: 0;
}

.timeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.timeline-column {
    position: relative;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.t-dot {
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    z-index: 2;
}

.t-glass {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.t-glass:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.08);
}

.t-year {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.9rem;
}

.t-inst {
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.cert-btn {
    margin-top: 1.2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: white;
    padding: .9rem 1.3rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: .35s ease;
    backdrop-filter: blur(10px);
}

.cert-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
}

.cert-preview {
    margin-top: 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .6s ease;
}

.cert-preview.active {
    max-height: 900px;
}

.cert-preview img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
    display: block;
}

@media (max-width: 980px) {
    .timeline-grid {
        grid-template-columns: 1fr;
    }

    .timeline-line {
        left: 1rem;
    }

    .t-dot {
        left: calc(1rem - 2.4rem);
    }
}

/* TECNOLOGIAS */
.tech-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
}

.tech-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: 0.4s;
}

.tech-box i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: #666;
    transition: 0.4s;
}

.tech-box span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.tech-box:hover {
    border-color: var(--accent);
    transform: scale(1.1) rotate(3deg);
}

.tech-box:hover i {
    color: var(--accent);
}

.tech-python:hover i {
    color: #3776AB;
}

.tech-javascript:hover i {
    color: #f7df1e;
}

.tech-react:hover i {
    color: #61dafb;
}

.tech-java:hover i {
    color: #f89820;
}

.tech-node:hover i {
    color: #83cd29;
}

.tech-html:hover i {
    color: #e34f26;
}

.tech-css:hover i {
    color: #264de4;
}

.tech-sql:hover i {
    color: #003b57;
}

.tech-figma:hover i {
    color: #a259ff;
}

.tech-vscode:hover i {
    color: #0078d7;
}

.tech-eclipse:hover i {
    color: #2c2255;
}

.tech-sequelize:hover i {
    color: #00b2d8;
}

.tech-poo:hover i {
    color: #ff85c0;
}

.tech-database:hover i {
    color: #9cdbff;
}

.extra-exp {
    margin-top: 4rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px dashed var(--border);
}

.extra-exp span {
    color: var(--accent);
    font-weight: 800;
}

/* PROYECTOS */
.projects-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.p-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.p-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
}

.project-image {
    width: 100%;
    height: 230px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 1.7rem;
    position: relative;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.project-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 50%);
    opacity: .7;
    transition: opacity .4s ease;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease, filter .7s ease;
}

.p-card:hover .project-image img {
    transform: scale(1.08);
    filter: brightness(1.08) saturate(1.1);
}

.p-card:hover .project-image::after {
    opacity: .3;
}

.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.p-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
}

.p-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.p-links a {
    color: white;
    font-size: 1.2rem;
    transition: 0.3s;
    text-decoration: none;
}

.p-links a:hover {
    color: var(--accent);
}

.p-features {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.p-features li {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-features li::before {
    content: '•';
    color: var(--accent);
    font-weight: bold;
}

.p-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.p-langs span {
    background: rgba(255,255,255,0.05);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    color: var(--accent);
}

/* CONTACTO */
#contacto {
    position: relative;
    z-index: 2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 1.2rem;
    border-radius: 15px;
    color: white;
    font-family: inherit;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary-full {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .5px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition:
        transform .35s ease,
        border .35s ease,
        background .35s ease,
        box-shadow .35s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-full:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(255,255,255,0.07);
    box-shadow:
        0 10px 35px rgba(0,242,255,0.12),
        0 0 20px rgba(0,242,255,0.08);
}

.btn-primary-full:active {
    transform: scale(.98);
}

/* FOOTER MODERNO */
footer {
    padding: 4rem 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-info p:first-child {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.footer-info p:last-child {
    color: var(--text-dim);
    max-width: 420px;
    line-height: 1.7;
}

/* ICONOS REDES */
.social-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-footer a {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    text-decoration: none;
    font-size: 1.5rem;
    color: white;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    transition:
        transform .35s ease,
        background .35s ease,
        box-shadow .35s ease,
        border .35s ease;
}

/* Hover premium */
.social-footer a:hover {
    transform: translateY(-8px) scale(1.08);
    background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(236,72,153,0.95));
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow:
        0 10px 35px rgba(168,85,247,0.35),
        0 0 25px rgba(236,72,153,0.25);
}

/* Animación iconos */
.social-footer a i {
    transition: transform .3s ease;
}

.social-footer a:hover i {
    transform: scale(1.15);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .nav-links {
        justify-content: flex-end;
    }

    .nav-links a {
        margin-left: 1rem;
    }

    .projects-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }

    nav {
        padding: 1rem 0;
    }

    .nav-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        gap: 0.2rem 0.8rem;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 0.85rem;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions a {
        width: 100%;
        justify-content: center;
    }

    .centered-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .about-card {
        padding: 2rem;
    }

    .soft-skills-grid {
        grid-template-columns: 1fr;
    }

    .tech-center-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .projects-wrapper {
        grid-template-columns: 1fr;
    }

    .p-card {
        padding: 2rem;
    }

    .p-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-flex {
        flex-direction: column;
        text-align: center;
    }

    .footer-info p:last-child {
        max-width: 100%;
    }

    .social-footer {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 90px 0;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .tech-center-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-box {
        padding: 1rem;
    }

    .tech-box i {
        font-size: 2.4rem;
    }

    .project-image {
        height: 200px;
    }
}

.status-dev {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}