/* ==================================================
   VARIABLES
================================================== */

:root {
    --background: #f8fafc;
    --background-secondary: #ffffff;
    --background-dark: #0f172a;

    --text: #0f172a;
    --text-light: #64748b;
    --text-white: #f8fafc;

    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --border: #e2e8f0;

    --card-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    --radius: 16px;

    --transition: 0.3s ease;
}


/* ==================================================
   DARK MODE
================================================== */

body.dark {
    --background: #020617;
    --background-secondary: #0f172a;

    --text: #f8fafc;
    --text-light: #94a3b8;

    --border: #1e293b;

    --card-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3);
}


/* ==================================================
   RESET
================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    line-height: 1.6;

    transition:
        background var(--transition),
        color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
}


/* ==================================================
   CONTAINER
================================================== */

.container {
    width: min(1150px, 90%);
    margin: auto;
}


/* ==================================================
   HEADER
================================================== */

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1000;

    background:
        rgba(255, 255, 255, 0.85);

    backdrop-filter: blur(12px);

    border-bottom:
        1px solid var(--border);
}

.dark .header {
    background:
        rgba(2, 6, 23, 0.85);
}

.navbar {
    height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;

    color: var(--text-light);

    transition:
        color var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-toggle,
.menu-toggle {
    border: none;
    background: none;

    cursor: pointer;

    font-size: 1.2rem;
}

.menu-toggle {
    display: none;
}


/* ==================================================
   HERO
================================================== */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding-top: 75px;
}

.hero-content {
    display: grid;

    grid-template-columns:
        1.2fr
        0.8fr;

    gap: 80px;

    align-items: center;
}

.hero-intro {
    color: var(--primary);

    font-weight: 700;

    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);

    line-height: 1;

    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--primary);
}

.hero h2 {
    font-size: 1.6rem;

    margin-bottom: 20px;

    color: var(--text-light);
}

.hero-description {
    max-width: 650px;

    color: var(--text-light);

    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;

    gap: 15px;

    margin-top: 35px;

    flex-wrap: wrap;
}


/* ==================================================
   BUTTONS
================================================== */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding:
        13px
        22px;

    border-radius: 8px;

    font-weight: 700;

    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    color: white;

    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    border:
        1px solid var(--border);

    background:
        var(--background-secondary);
}


/* ==================================================
   TERMINAL
================================================== */

.terminal {
    overflow: hidden;

    border-radius: 14px;

    background: #020617;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25);
}

.terminal-header {
    height: 40px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0 15px;

    background: #111827;
}

.terminal-header span {
    width: 11px;
    height: 11px;

    border-radius: 50%;

    background: #64748b;
}

.terminal-body {
    padding: 25px;

    color: #e2e8f0;

    font-family:
        "Courier New",
        monospace;

    font-size: 0.9rem;
}

.terminal-green {
    color: #22c55e;
}

.terminal-result {
    color: #93c5fd;

    margin:
        5px 0
        15px;
}

.cursor {
    animation:
        blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* ==================================================
   SECTIONS
================================================== */

.section {
    padding:
        110px
        0;
}

.section-dark {
    background: var(--background-dark);

    color: var(--text-white);
}

.section-title {
    margin-bottom: 60px;
}

.section-title p {
    color: var(--primary);

    font-size: 0.85rem;

    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 10px;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3rem);

    line-height: 1.1;
}


/* ==================================================
   ABOUT
================================================== */

.about-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 70px;
}

.about-text {
    color: var(--text-light);

    font-size: 1.05rem;
}

.about-text p {
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text);
}

.about-stats {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 20px;
}

.stat {
    padding: 30px;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    background:
        var(--background-secondary);
}

.stat strong {
    display: block;

    color: var(--primary);

    font-size: 2.5rem;

    line-height: 1;

    margin-bottom: 10px;
}

.stat span {
    color: var(--text-light);
}


/* ==================================================
   SKILLS
================================================== */

.skills-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.skill-card {
    padding: 30px;

    border:
        1px solid #1e293b;

    border-radius: var(--radius);

    background: #111827;

    transition:
        transform var(--transition),
        border-color var(--transition);
}

.skill-card:hover {
    transform: translateY(-6px);

    border-color: var(--primary);
}

.skill-icon {
    font-size: 2rem;

    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 10px;
}

.skill-card p {
    color: #94a3b8;

    margin-bottom: 20px;
}


/* ==================================================
   TAGS
================================================== */

.tags {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;
}

.tags span {
    padding:
        5px
        10px;

    border-radius: 6px;

    background:
        rgba(37, 99, 235, 0.12);

    color: var(--primary);

    font-size: 0.75rem;

    font-weight: 700;
}


/* ==================================================
   PROJECTS
================================================== */

.projects-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 25px;
}

.project-card {
    display: grid;

    grid-template-columns: 80px 1fr;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    overflow: hidden;

    background:
        var(--background-secondary);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);

    box-shadow:
        var(--card-shadow);
}

.project-number {
    padding-top: 30px;

    text-align: center;

    color: var(--primary);

    font-size: 1.2rem;

    font-weight: 800;

    background:
        rgba(37, 99, 235, 0.05);
}

.project-content {
    padding: 30px;
}

.project-category {
    color: var(--primary);

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 1px;

    margin-bottom: 8px;
}

.project-content h3 {
    font-size: 1.4rem;

    margin-bottom: 12px;
}

.project-content > p {
    color: var(--text-light);

    margin-bottom: 20px;
}

.project-content ul {
    display: grid;

    gap: 5px;

    color: var(--text-light);

    font-size: 0.9rem;
}

.project-content li::before {
    content: "✓";

    color: var(--primary);

    font-weight: bold;

    margin-right: 8px;
}


/* ==================================================
   TIMELINE
================================================== */

.timeline {
    position: relative;

    max-width: 850px;

    margin: auto;
}

.timeline::before {
    content: "";

    position: absolute;

    left: 15px;
    top: 0;
    bottom: 0;

    width: 2px;

    background:
        #334155;
}

.timeline-item {
    position: relative;

    display: grid;

    grid-template-columns:
        150px
        1fr;

    gap: 30px;

    padding-bottom: 50px;
}

.timeline-item::before {
    content: "";

    position: absolute;

    left: 9px;
    top: 4px;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background:
        var(--primary);

    border:
        3px solid
        var(--background-dark);
}

.timeline-date {
    color: #94a3b8;

    font-weight: 700;

    padding-left: 35px;
}

.timeline-content {
    padding:
        25px;

    border:
        1px solid #1e293b;

    border-radius: var(--radius);

    background: #111827;
}

.timeline-content h3 {
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: var(--primary);

    margin-bottom: 15px;
}

.timeline-content p {
    color: #94a3b8;
}


/* ==================================================
   OBJECTIFS
================================================== */

.objectives {
    display: grid;

    gap: 20px;
}

.objective {
    display: flex;

    align-items: center;

    gap: 25px;

    padding: 25px;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    background:
        var(--background-secondary);
}

.objective > span {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 50px;
    height: 50px;

    border-radius: 50%;

    color: white;

    background: var(--primary);

    font-weight: 800;
}

.objective h3 {
    margin-bottom: 5px;
}

.objective p {
    color: var(--text-light);
}


/* ==================================================
   CONTACT
================================================== */

.contact-section {
    padding-bottom: 130px;
}

.contact-box {
    max-width: 850px;

    margin: auto;

    text-align: center;
}

.contact-label {
    color: var(--primary);

    font-size: 0.85rem;

    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 20px;
}

.contact-box h2 {
    font-size: clamp(3rem, 7vw, 5rem);

    line-height: 1;

    margin-bottom: 25px;
}

.contact-box > p:not(.contact-label) {
    color: var(--text-light);

    max-width: 600px;

    margin: auto;
}

.contact-buttons {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 15px;

    margin-top: 35px;
}


/* ==================================================
   FOOTER
================================================== */

.footer {
    padding: 30px 0;

    border-top:
        1px solid var(--border);

    background:
        var(--background-secondary);
}

.footer-content {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    color: var(--text-light);

    font-size: 0.85rem;
}


/* ==================================================
   BACK TO TOP
================================================== */

.back-to-top {
    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 45px;
    height: 45px;

    border: none;

    border-radius: 50%;

    color: white;

    background:
        var(--primary);

    cursor: pointer;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity var(--transition),
        transform var(--transition);
}

.back-to-top.visible {
    opacity: 1;

    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
}


/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 900px) {

    .hero-content {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .skills-grid {
        grid-template-columns:
            1fr
            1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    .nav-links {
        position: absolute;

        top: 75px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;

        gap: 0;

        padding: 10px 5%;

        background:
            var(--background-secondary);

        border-bottom:
            1px solid var(--border);
    }

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

    .nav-links li {
        padding: 15px 0;
    }

    .menu-toggle {
        display: block;
    }

    .theme-toggle {
        margin-left: 10px;
    }

    .navbar {
        justify-content: flex-start;
    }

    .logo {
        margin-right: auto;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 60px 1fr;
    }

    .timeline-item {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .timeline-date {
        padding-left: 35px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        flex-direction: column;

        text-align: center;
    }

}


@media (max-width: 450px) {

    .section {
        padding:
            80px
            0;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero h2 {
        font-size: 1.3rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-number {
        padding:
            15px;

        text-align: left;
    }

}