* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    display: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #0b0b12;
    color: #f5f5f5;
    overflow-x: hidden;
}

/* Fondo morado degradado */
.background-blur {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(130, 60, 255, 0.3), transparent 60%);
    top: -200px;
    right: -200px;
    z-index: -3;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

/* NAVBAR */
.navbar {
    position: fixed;
    width: 90%;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.navbar a {
    margin-left: 25px;
    text-decoration: none;
    color: #ccc;
    transition: 0.3s;
}

.navbar a:hover {
    color: #b57aff;
}

.logo {
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(90deg, #c084fc, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* HERO */
.hero {
    height: 105vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 0 8%;
}

.columna {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text {
    display: flex;
    gap: 80px;
    padding: 50px;
    max-width: auto;
}

.hero-text h1 {
    font-size: 2.8rem;
}

.hero-text span {
    background: linear-gradient(90deg, #c084fc, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text h2 {
    margin-top: 15px;
    font-weight: 400;
    color: #bbb;
}

.hero-text p {
    margin-top: 20px;
    color: #aaa;
}

.hero-img img {
    width: 300px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
}

/* CANVAS FULLSCREEN */
#particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* BOTONES */
.buttons {
    margin-top: 30px;
    display: inline-flex;
    align-items: center;
    align-content: center;
}

.btn-primary {
    display: inline-block;
    margin-left: 15px;
    padding: 12px 28px;
    border-radius: 30px;
    background: linear-gradient(90deg, #c084fc, #7c3aed);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-flex;
    vertical-align: middle;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.6);
}

.btn-outline {
    padding: 12px 28px;
    border-radius: 30px;
    border: 1px solid #7c3aed;
    color: #c084fc;
    text-decoration: none;
    display: inline-flex;
    vertical-align: middle;
}

.btn-outline:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: #c084fc;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

/* SECTIONS */
.section {
    padding: 140px 8%;
}

.section h2 {
    margin-bottom: 50px;
    font-size: 2rem;
}

/* CARDS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    padding: 30px;
    transition: 0.3s;
}

.card h3 {
    font-size: 1.2rem;
}

.card p {
    margin-top: 15px;
    color: #bbb;
}

.card span {
    color: #c084fc;
    font-weight: 500;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #7c3aed;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

/* SKILLS GRID */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
}

.skill-card {
    padding: 30px 20px;
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.skill-card img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    filter: grayscale(100%) brightness(1.2);
    transition: 0.3s;
}

.skill-card span {
    font-weight: 500;
    color: #ccc;
}

/* Hover elegante */
.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.4);
    border-color: rgba(124, 58, 237, 0.5);
}

.skill-card:hover img {
    filter: none;
}

.skill-card:hover span {
    color: #c084fc;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 40px;
    color: #777;
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    background: linear-gradient(145deg,
            rgba(168, 85, 247, 0.15),
            rgba(30, 30, 60, 0.4));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.modal p {
    margin-top: 20px;
    color: #9c9191;
    line-height: 1.6;
}

.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    border-radius: 10px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.modal-tech {
    margin-top: 20px;
}

.modal-tech ul {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.modal-tech li {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(168, 85, 247, 0.2);
    font-size: 14px;
}

.modal-gallery {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 12px;
    transition: 0.3s ease;
}

.modal-gallery img:hover {
    transform: scale(1.05);
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-top: 25px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-track img {
    min-width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 22px;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.contact-section {
    text-align: center;
    padding-bottom: 120px;
}

.contact-container {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 40px;
    border-radius: 20px;
    background: linear-gradient(145deg,
            rgba(168, 85, 247, 0.15),
            rgba(30, 30, 60, 0.4));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    align-content: center;
    align-items: center;
}

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    outline: none;
    color: white;
    font-size: 15px;
    resize: none;
    transition: 0.3s ease;
}

.input-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    pointer-events: none;
    transition: 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.input-group input:focus+label,
.input-group textarea:focus+label,
.input-group input:valid+label,
.input-group textarea:valid+label {
    top: -10px;
    left: 8px;
    font-size: 12px;
    background: #0f0f1a;
    padding: 0 6px;
    border-radius: 6px;
}

.btn-send {
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg,
            #a855f7,
            #7c3aed);
    color: white;
    transition: 0.3s ease;
    text-align: center;
}

.btn-plane:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.5);
}

.send-button {
    --primary: #a855f7;
    --primary-dark: #9333ea;
    --primary-darkest: #7e22ce;
    --text: #ffffff;
    --success: #e9d5ff;

    --rotate: 0;
    --plane-x: 0;
    --plane-y: 0;
    --plane-opacity: 1;
    --success-scale: .2;
    --success-opacity: 0;
    --text-opacity: 1;

    position: relative;
    display: block;
    width: 100%;
    padding: 14px 0;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    overflow: hidden;
    transition: 0.3s ease;
}

.send-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.4);
}

.send-button span {
    position: relative;
    display: block;
    transition: 0.3s ease;
}

.send-button .success {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    opacity: var(--success-opacity);
    transform: scale(var(--success-scale));
    color: var(--success);
}

.send-button .default {
    opacity: var(--text-opacity);
}

.send-button .left,
.send-button .right {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: white;
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    transform: translate(-50%, -50%);
    opacity: var(--plane-opacity);
    transition: 0.3s ease;
}

.send-button .left {
    left: 50%;
}

.send-button .right {
    left: 50%;
    transform: translate(-50%, -50%) scaleX(-1);
}

.plane-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
}

.plane-wrapper {
    width: 80px;
    height: 80px;
}

.plane-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-35deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* ========================= */
/* TABLETS */
/* ========================= */
@media (max-width: 1024px) {

    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding-top: 160px;
        gap: 50px;
    }

    .hero-text {
        flex-direction: column;
        gap: 30px;
        padding: 0;
        align-items: center;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .hero-img img {
        width: 260px;
        height: 260px;
    }

    .navbar {
        padding: 15px 25px;
        width: 95%;
    }

    .section {
        padding: 100px 6%;
    }

    .modal {
        padding: 30px;
        max-height: 80vh;
    }
}


/* ========================= */
/* MOBILE */
/* ========================= */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .navbar a {
        margin-left: 0;
        margin-right: 15px;
    }

    .hero {
        padding: 140px 6% 80px;
        gap: 40px;
    }

    .hero-text h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .hero-text h2 {
        font-size: 1.1rem;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    .hero-img img {
        width: 220px;
        height: 220px;
    }

    .buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .section {
        padding: 80px 6%;
    }

    .section h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    .projects-grid,
    .skills-grid {
        gap: 20px;
    }

    .card {
        padding: 25px;
    }

    .contact-container {
        padding: 30px 20px;
    }

    .modal {
        width: 95%;
        padding: 25px;
    }

    .carousel-track img {
        max-height: 250px;
    }
}


/* ========================= */
/* SMALL MOBILE */
/* ========================= */
@media (max-width: 480px) {

    .hero-text h1 {
        font-size: 1.6rem;
    }

    .hero-img img {
        width: 180px;
        height: 180px;
    }

    .modal {
        padding: 20px;
    }

    .carousel-btn {
        font-size: 18px;
        padding: 6px 10px;
    }

}
