/* ================= VARIABLES ================= */
:root {
    --primary: #6366f1;
    --bg-dark: #000000;
    --bg-light: #ffffff;
    --text-dark: #fff;
    --text-light: #111;
    --card-dark: #18181d;
    --card-light: #f8f8f8;
    --footer-dark: #767676;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: Inter, sans-serif;
    background: var(--bg-dark);
    color: var(--text-dark);
    transition: background .3s, color .3s;
}

body.light {
    background: var(--bg-light);
    color: var(--text-light);
}

/* ================= NAVBAR ================= */
.navbar {
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 19, 0.7);
    padding: 15px 0;
}

body.light .navbar {
    background: rgba(255, 255, 255, .85);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: .3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-btn {
    border: none;
    background: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.hamburger {
    display: none;
    font-size: 22px;
    cursor: pointer;
}

/* ================= HERO ================= */
.hero {
    padding: 90px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
}

.typing span {
    display: block;
    font-size: 1.3rem;
    margin-top: 5px;
    animation: fade 8s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 1.5s;
}

.typing span:nth-child(3) {
    animation-delay: 3s;
}

.typing span:nth-child(4) {
    animation-delay: 4.5s;
}

.typing span:nth-child(5) {
    animation-delay: 6s;
}

@keyframes fade {

    0%,
    20%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-img img {
    width: 100%;
    border-radius: 12px;
}

/* ================= SECTIONS ================= */
.section {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.section-desc {
    max-width: 750px;
    text-align: center;
    margin: auto;
}

/* ================= SKILLS ================= */
.skills {
    max-width: 500px;
    margin: auto;
}

.skill {
    margin: 20px 0;
}

.bar {
    width: 100%;
    height: 10px;
    background: #444;
    border-radius: 20px;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
    animation: fill 2s forwards;
    animation-delay: 0.3s;
}

@keyframes fill {
    to {
        width: var(--w);
    }
}

/* ================= PROJECTS ================= */
.project-grid {
    margin-top: 40px;
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
    background: var(--card-dark);
    padding: 20px;
    border-radius: 12px;
    transition: .3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .2);
}

body.light .project-card {
    background: var(--card-light);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    border-radius: 10px;
}

.links {
    color: var(--primary);
    padding: 8px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 5px;
    transition: 0.3s;
    text-decoration: none;
    padding-left: 25px;
}

.links:hover {
    background-color: var(--card-light);
}

/* ================= CONTACT ================= */
.contact-form {
    max-width: 550px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

/* ================= BUTTONS ================= */
.btn {
    padding: 12px 22px;
    display: inline-block;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.primary {
    background: var(--primary);
    color: white;
}

.outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    padding: 15px;
    border-radius: 50%;
    color: var(--text-light);
    font-size: 20px;
}

/* ================= FOOTER ================= */
.footer-socials {
    text-align: center;
    padding: 20px;
}

.footer-socials h3 {
    padding-bottom: 15px;
}

.footer-socials .socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.socials a {
    font-size: 20px;
    transition: 0.3s;
    color: var(--footer-dark);
}

.socials a:hover {
    color: var(--primary);
    transform: scale(1.2);
}


.footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

/* ================= MOBILE ================= */
@media (max-width:768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--card-dark);
        width: 100%;
        padding: 20px 0;
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    body.light .nav-links {
        background: var(--card-light);
    }

    .hamburger {
        display: block;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
