/* ---------------- GLOBAL ---------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------------- HEADER ---------------- */
header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.8);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #f5db94, #da70c3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header nav {
    display: flex;
    gap: 30px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------------- PORTADA ---------------- */
#mio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

#mio .contenido {
    animation: fadeInUp 1s ease-out;
}

#mio h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    background: linear-gradient(45deg, #f5db94, #da70c3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mio p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------- SECCIONES ---------------- */
section {
    padding: 80px 0;
    position: relative;
}

section:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------------- QUIÉN SOY ---------------- */
#quien-soy .contenido {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

#quien-soy img {
    width: 100%;
    max-width: 300px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    object-fit: cover;
    height: 300px;
}

#quien-soy img:hover {
    transform: scale(1.05);
}

#quien-soy .texto {
    font-size: 1.1rem;
}

#quien-soy .texto p {
    margin-bottom: 20px;
}

/* ---------------- HOBBIES ---------------- */
#mis-hobbies {
    text-align: center;
}

.swiper {
    width: 100%;
    margin-top: 50px;
    padding-bottom: 50px;
}

.card {
    width: 200px;
    height: 280px;
    perspective: 1000px;
    margin: 0 auto;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    backface-visibility: hidden;
    overflow: hidden;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.card-back small {
    margin-top: 10px;
    color: #ffd700;
    font-weight: normal;
}

.swiper-button-next,
.swiper-button-prev {
    color: #ffd700;
}

.swiper-pagination-bullet-active {
    background: #ffd700;
}

/* ---------------- HABILIDADES ---------------- */
#mis-habilidades .habi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.carta {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carta:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.carta-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.carta h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.carta .description {
    margin-bottom: 15px;
    opacity: 0.9;
}

.carta .hidden-info {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.carta .hidden-info.show {
    opacity: 1;
    max-height: 100px;
}

.toggle-btn {
    margin-top: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ---------------- FOOTER ---------------- */
footer {
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .social {
    margin-bottom: 20px;
}

footer .social a {
    color: white;
    margin: 0 15px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

footer .social a:hover {
    color: #ffd700;
    transform: translateY(-3px);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    header nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    #quien-soy .contenido {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .card {
        width: 160px;
        height: 220px;
    }

    section {
        padding: 60px 0;
    }

    #mis-habilidades .habi {
        grid-template-columns: 1fr;
    }
}
