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

:root {
    --primary-color: #1b263b;
    --secondary-color: #415a77;
    --accent-color: #4da3ff;
    --text-color: #1b1f24;
    --light-bg: #e0e5eb;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: var(--primary-color);
    color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
}

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

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

#hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem 2rem;
    text-align: center;
    margin-top: 60px;
}

.hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.hero-creative-box {
    margin-top: 0.8rem;
    padding: 0.35rem 1rem;
    background: rgba(255,255,255,0.18);
    border-radius: 6px;
    backdrop-filter: blur(3px);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    letter-spacing: 0.5px;
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--white);
    animation: typing 3s steps(40) forwards, blink 0.8s infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

section {
    padding: 4rem 5%;
    max-width: 1100px;
    margin: auto;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
}

.sobre-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.profile-img {
    width: 100%;
    max-width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    margin: -5px auto 0 auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--white);
    padding: 1.8rem;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.skill-bar {
    background: var(--light-bg);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.6rem;
}

.skill-progress {
    height: 100%;
    background: var(--accent-color);
    width: 0;
    transition: width 1s ease;
}

/* PROYECTOS */
.project-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.project-img {
    background: var(--secondary-color);
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 3rem;
}

.project-info {
    padding: 1.2rem;
}

.contact-form {
    max-width: 550px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    padding: 0.9rem;
    border: 2px solid var(--light-bg);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.9rem 1.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    text-decoration: none;
    text-align: center;
    transition: 0.3s ease;
}

.btn:hover {
    background: var(--accent-color);
}

footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {

    #hero {
        padding: 5rem 1.5rem 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-creative-box {
        font-size: 0.85rem;
        padding: 0.3rem 0.8rem;
    }

    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        background: none;
        border: none;
        color: white;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        flex-direction: column;
        text-align: center;
        background: var(--primary-color);
        padding: 1.5rem 0;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .sobre-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-img {
        max-width: 220px;
        height: 220px;
        object-position: center 20%;
        margin-bottom: 1rem;
    }
}
