/* =========================================
   VARIABLES
========================================= */

:root {
    --bg: #090b0e;
    --bg-secondary: #0d1014;
    --card: #101419;
    --card-hover: #14191f;

    --border: #252b33;
    --border-light: #303741;

    --text: #e8eaed;
    --text-secondary: #a4aab3;
    --text-muted: #707781;

    --accent: #dce1e7;
    --accent-dark: #aeb5bd;

    --max-width: 1200px;

    --radius: 8px;

    --transition: 0.25s ease;
}


/* LIGHT THEME */

body.light {
    --bg: #f4f5f6;
    --bg-secondary: #ffffff;
    --card: #ffffff;
    --card-hover: #f0f1f2;

    --border: #dfe2e6;
    --border-light: #cbd0d6;

    --text: #17191c;
    --text-secondary: #555b63;
    --text-muted: #777e86;

    --accent: #15171a;
    --accent-dark: #41464d;
}


/* =========================================
   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(--bg);
    color: var(--text);

    line-height: 1.6;

    transition:
        background var(--transition),
        color var(--transition);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}


/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
}


/* =========================================
   NAVBAR
========================================= */

.navbar {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;

    height: 70px;

    display: flex;
    align-items: center;

    justify-content: space-between;

    padding: 0 5%;

    background: rgba(9, 11, 14, 0.92);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);

    z-index: 1000;
}

.light .navbar {
    background: rgba(255, 255, 255, 0.92);
}


.logo {
    display: flex;

    align-items: center;

    gap: 12px;

    font-weight: 700;

    font-size: 18px;
}

.logo span {
    font-family: monospace;

    color: var(--text);

    font-size: 21px;
}


.navbar nav {
    display: flex;

    gap: 28px;
}

.navbar nav a {
    position: relative;

    color: var(--text-secondary);

    font-size: 13px;

    transition: var(--transition);
}

.navbar nav a:hover,
.navbar nav a.active {
    color: var(--text);
}

.navbar nav a.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: -8px;

    height: 1px;

    background: var(--text);
}


.nav-actions {
    display: flex;

    align-items: center;

    gap: 12px;
}

#themeToggle,
.menu-btn {
    border: 1px solid var(--border);

    background: var(--card);

    color: var(--text);

    width: 38px;
    height: 38px;

    border-radius: 50%;
}

.menu-btn {
    display: none;
}


/* =========================================
   GENERAL
========================================= */

.section {
    max-width: var(--max-width);

    margin: auto;

    padding: 110px 5%;
}

.eyebrow {
    font-family: monospace;

    color: var(--text-muted);

    letter-spacing: 2px;

    font-size: 12px;

    margin-bottom: 8px;
}

.section-header {
    margin-bottom: 45px;
}

.section-header h2,
.contact-info h2 {
    font-size: clamp(28px, 4vw, 42px);

    line-height: 1.15;

    margin-bottom: 12px;
}

.section-header > p:last-child {
    color: var(--text-secondary);
}


/* =========================================
   HERO
========================================= */

.hero {
    min-height: 100vh;

    display: grid;

    grid-template-columns: 1.1fr 0.9fr;

    gap: 80px;

    align-items: center;

    padding-top: 130px;
}

.hero-content h1 {
    font-size: clamp(55px, 8vw, 90px);

    line-height: 0.95;

    letter-spacing: -4px;

    margin-bottom: 25px;
}

.hero-content h1 span {
    color: var(--text-secondary);
}

.hero-content h2 {
    font-size: 21px;

    font-weight: 400;

    color: var(--text-secondary);

    margin-bottom: 22px;
}

#typingText {
    color: var(--text);

    font-weight: 600;
}

.hero-description {
    max-width: 650px;

    color: var(--text-secondary);

    font-size: 17px;

    margin-bottom: 25px;
}


.hero-tags {
    display: flex;

    gap: 20px;

    flex-wrap: wrap;

    margin-bottom: 32px;
}

.hero-tags span {
    color: var(--text-secondary);

    font-size: 13px;
}

.hero-tags i {
    margin-right: 7px;

    color: var(--text);
}


.hero-buttons {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;

    margin-bottom: 25px;
}


/* =========================================
   BUTTONS
========================================= */

.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    min-height: 44px;

    padding: 0 20px;

    border-radius: 6px;

    border: 1px solid var(--border-light);

    font-size: 13px;

    font-weight: 600;

    transition: var(--transition);
}

.btn.primary {
    background: var(--accent);

    color: #101214;

    border-color: var(--accent);
}

.btn.primary:hover {
    background: white;

    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;

    color: var(--text);
}

.btn.secondary:hover {
    background: var(--card-hover);

    border-color: var(--text-secondary);
}


/* =========================================
   SOCIAL
========================================= */

.social-links {
    display: flex;

    gap: 18px;
}

.social-links a {
    color: var(--text-muted);

    font-size: 18px;

    transition: var(--transition);
}

.social-links a:hover {
    color: var(--text);

    transform: translateY(-2px);
}


/* =========================================
   PROFILE CARD
========================================= */

.hero-visual {
    display: flex;

    justify-content: center;
}

.profile-card {
    width: min(100%, 430px);

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 10px;

    overflow: hidden;

    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.profile-top {
    height: 42px;

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    padding: 0 16px;

    gap: 7px;
}

.profile-top span {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--border-light);
}

.profile-content {
    padding: 35px;
}

.profile-avatar {
    width: 120px;
    height: 120px;

    border-radius: 50%;

    border: 1px solid var(--border-light);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 45px;

    color: var(--text-secondary);

    margin-bottom: 20px;
}

.profile-content h3 {
    font-size: 25px;
}

.profile-content > p {
    color: var(--text-muted);

    margin-bottom: 25px;
}

.terminal {
    background: #080a0d;

    border: 1px solid var(--border);

    border-radius: 6px;

    padding: 18px;

    font-family: monospace;

    font-size: 12px;

    line-height: 2;
}

.terminal-symbol {
    color: var(--text);

    margin-right: 6px;
}

.terminal strong {
    display: block;

    color: var(--text-secondary);

    margin-left: 15px;

    margin-bottom: 8px;
}


/* =========================================
   ABOUT
========================================= */

.about-grid {
    display: grid;

    grid-template-columns: 1.3fr 1fr 0.9fr;

    gap: 20px;
}

.about-text p {
    color: var(--text-secondary);

    margin-bottom: 18px;
}

.about-text .btn {
    margin-top: 10px;
}


.info-card,
.quote-card {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 28px;
}

.info-row {
    display: flex;

    gap: 15px;

    align-items: center;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row i {
    width: 25px;

    color: var(--text-muted);
}

.info-row small {
    display: block;

    color: var(--text-muted);

    font-size: 11px;
}

.info-row strong {
    font-size: 13px;

    font-weight: 500;
}


.quote-card {
    display: flex;

    flex-direction: column;

    justify-content: center;
}

.quote-card > i {
    color: var(--text-muted);

    font-size: 20px;

    margin-bottom: 20px;
}

.quote-card blockquote {
    font-size: 25px;

    color: var(--text-secondary);

    line-height: 1.4;
}

.quote-line {
    width: 45px;

    height: 1px;

    background: var(--border-light);

    margin-top: 25px;
}


/* =========================================
   SKILLS
========================================= */

.skills-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 18px;
}

.skill-card {
    background: var(--card);

    border: 1px solid var(--border);

    padding: 25px;

    border-radius: var(--radius);

    transition: var(--transition);
}

.skill-card:hover {
    background: var(--card-hover);

    transform: translateY(-4px);
}

.skill-icon {
    width: 45px;
    height: 45px;

    border: 1px solid var(--border-light);

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 6px;

    margin-bottom: 20px;

    color: var(--text);
}

.skill-card h3 {
    font-size: 16px;

    margin-bottom: 10px;
}

.skill-card p {
    color: var(--text-muted);

    font-size: 13px;

    min-height: 75px;
}

.skill-bar {
    height: 4px;

    background: var(--border);

    border-radius: 10px;

    margin-top: 20px;

    overflow: hidden;
}

.skill-bar span {
    display: block;

    height: 100%;

    background: var(--text);
}

.skill-card small {
    display: block;

    text-align: right;

    color: var(--text-muted);

    font-size: 10px;

    margin-top: 5px;
}


/* =========================================
   PROJECT FILTER
========================================= */

.project-filters {
    display: flex;

    gap: 8px;

    margin-bottom: 25px;
}

.filter {
    background: transparent;

    color: var(--text-muted);

    border: 1px solid var(--border);

    padding: 8px 15px;

    border-radius: 5px;

    font-size: 12px;

    transition: var(--transition);
}

.filter:hover,
.filter.active {
    color: var(--text);

    border-color: var(--text-secondary);

    background: var(--card);
}


/* =========================================
   PROJECTS
========================================= */

.projects-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 18px;
}

.project-card {
    position: relative;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px;

    min-height: 330px;

    display: flex;

    flex-direction: column;

    transition: var(--transition);
}

.project-card:hover {
    background: var(--card-hover);

    border-color: var(--border-light);

    transform: translateY(-4px);
}

.project-card.hidden {
    display: none;
}

.project-number {
    position: absolute;

    top: 20px;
    right: 20px;

    font-family: monospace;

    color: var(--text-muted);

    font-size: 11px;
}

.project-icon {
    width: 45px;
    height: 45px;

    border: 1px solid var(--border-light);

    border-radius: 6px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 22px;
}

.project-card h3 {
    font-size: 17px;

    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-muted);

    font-size: 13px;

    margin-bottom: 20px;
}

.project-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: auto;

    margin-bottom: 18px;
}

.project-tags span {
    background: var(--bg-secondary);

    border: 1px solid var(--border);

    padding: 4px 8px;

    border-radius: 20px;

    color: var(--text-muted);

    font-size: 10px;
}

.project-link {
    color: var(--text);

    font-size: 12px;

    font-weight: 600;
}

.project-link i {
    margin-left: 6px;

    transition: var(--transition);
}

.project-link:hover i {
    transform: translateX(4px);
}


/* =========================================
   TIMELINE
========================================= */

.timeline {
    position: relative;

    max-width: 800px;

    margin-left: 15px;
}

.timeline::before {
    content: "";

    position: absolute;

    left: 4px;
    top: 5px;
    bottom: 5px;

    width: 1px;

    background: var(--border-light);
}

.timeline-item {
    position: relative;

    padding-left: 40px;

    margin-bottom: 45px;
}

.timeline-dot {
    position: absolute;

    left: 0;
    top: 7px;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--text);

    border: 2px solid var(--bg);
}

.timeline-date {
    font-family: monospace;

    color: var(--text-muted);

    font-size: 11px;
}

.timeline-content h3 {
    margin: 5px 0 8px;

    font-size: 17px;
}

.timeline-content p {
    color: var(--text-secondary);

    font-size: 13px;

    max-width: 650px;
}


/* =========================================
   AI
========================================= */

.ai-section {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: center;
}

.ai-content h2 {
    font-size: 42px;

    margin-bottom: 15px;
}

.ai-content > p:last-child {
    color: var(--text-secondary);

    max-width: 500px;
}

.ai-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.ai-grid div {
    border: 1px solid var(--border);

    background: var(--card);

    padding: 15px;

    border-radius: 6px;

    font-size: 13px;

    color: var(--text-secondary);
}

.ai-grid i {
    margin-right: 8px;

    color: var(--text);
}

/* =========================================
   CONTACT
========================================= */

.contact-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: start;
}

.contact-info > p:not(.eyebrow) {
    color: var(--text-secondary);

    max-width: 500px;

    margin-bottom: 30px;
}

.contact-links {
    display: flex;

    flex-direction: column;

    gap: 15px;
}

.contact-links a {
    color: var(--text-secondary);

    font-size: 13px;
}

.contact-links i {
    width: 25px;

    color: var(--text-muted);
}


.contact-form {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 25px;
}

.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;

    background: var(--bg);

    border: 1px solid var(--border);

    color: var(--text);

    border-radius: 5px;

    padding: 13px;

    margin-bottom: 10px;

    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--text-secondary);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

#formMessage {
    text-align: center;

    margin-top: 12px;

    font-size: 12px;

    color: var(--text-secondary);
}


/* =========================================
   FOOTER
========================================= */

footer {
    border-top: 1px solid var(--border);

    max-width: var(--max-width);

    margin: auto;

    padding: 25px 5%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    color: var(--text-muted);

    font-size: 11px;
}

.footer-logo {
    color: var(--text);

    font-weight: 600;
}

.back-top {
    width: 35px;
    height: 35px;

    border: 1px solid var(--border);

    border-radius: 5px;

    display: flex;

    align-items: center;
    justify-content: center;
}


/* =========================================
   REVEAL ANIMATION
========================================= */

.reveal {
    opacity: 0;

    transform: translateY(25px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {

    .hero {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .hero-visual {
        justify-content: flex-start;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quote-card {
        grid-column: span 2;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-section {
        grid-template-columns: 1fr;

        gap: 35px;
    }

}


@media (max-width: 700px) {

    .navbar {
        height: 60px;
    }

    .navbar nav {
        position: absolute;

        top: 60px;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;

        gap: 0;

        background: var(--bg-secondary);

        border-bottom: 1px solid var(--border);
    }

    .navbar nav.open {
        display: flex;
    }

    .navbar nav a {
        padding: 15px 5%;

        border-bottom: 1px solid var(--border);
    }

    .navbar nav a.active::after {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-content h1 {
        letter-spacing: -3px;
    }

    .section {
        padding: 80px 5%;
    }

    .about-grid,
    .skills-grid,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .quote-card {
        grid-column: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .game-help {
        flex-direction: column;

        gap: 5px;
    }

    footer {
        flex-direction: column;

        gap: 15px;

        text-align: center;
    }

}


@media (max-width: 450px) {

    .hero-content h1 {
        font-size: 50px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .game-info {
        gap: 20px;
    }

}