/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #070b14;
    --bg-light: #0d1320;
    --card: #101827;
    --card-hover: #141f32;

    --primary: #00f5a0;
    --secondary: #00d9ff;

    --text: #f5f7fb;
    --text-muted: #9ba8ba;

    --border: rgba(255, 255, 255, 0.08);

    --max-width: 1180px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    line-height: 1.6;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(92%, var(--max-width));
    margin: auto;
}

.section {
    padding: 110px 0;
}


/* =========================
   NAVBAR
========================= */

.navbar {
    position: fixed;

    top: 0;
    left: 0;
    width: 100%;

    z-index: 1000;

    background: rgba(7, 11, 20, 0.82);

    backdrop-filter: blur(18px);

    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;

    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    position: relative;

    color: var(--text-muted);

    font-size: 0.9rem;

    transition: 0.3s;
}

.nav-menu a::after {
    content: "";

    position: absolute;

    bottom: -8px;
    left: 0;

    width: 0;
    height: 2px;

    background: var(--primary);

    transition: 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;

    background: transparent;

    border: none;

    color: white;

    font-size: 1.7rem;

    cursor: pointer;
}


/* =========================
   HERO
========================= */

.hero {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;

    padding-top: 75px;

    overflow: hidden;
}

.hero-background {
    position: absolute;

    inset: 0;

    pointer-events: none;
}

.glow {
    position: absolute;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.18;
}

.glow-one {
    width: 400px;
    height: 400px;

    background: var(--primary);

    top: 10%;
    left: -150px;
}

.glow-two {
    width: 450px;
    height: 450px;

    background: var(--secondary);

    right: -180px;
    bottom: -100px;
}

.hero-container {
    position: relative;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 70px;

    align-items: center;
}

.hero-small {
    color: var(--primary);

    font-size: 0.85rem;

    letter-spacing: 4px;

    font-weight: 700;

    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 6.5rem);

    line-height: 0.95;

    letter-spacing: -5px;

    margin-bottom: 25px;
}

.hero h1 span {
    display: block;

    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--secondary)
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero h2 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);

    color: #d6deea;

    margin-bottom: 25px;

    min-height: 45px;
}

.hero-description {
    max-width: 620px;

    color: var(--text-muted);

    font-size: 1.05rem;

    margin-bottom: 35px;
}


/* =========================
   BUTTONS
========================= */

.hero-buttons {
    display: flex;

    gap: 15px;

    flex-wrap: wrap;
}

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 13px 24px;

    border-radius: 8px;

    font-weight: 700;

    border: 1px solid transparent;

    cursor: pointer;

    transition:
        transform 0.3s,
        box-shadow 0.3s,
        background 0.3s;
}

.btn-primary {
    color: #001b12;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #00d9b2
        );

    box-shadow:
        0 10px 35px rgba(0, 245, 160, 0.18);
}

.btn-primary:hover {
    transform: translateY(-3px);

    box-shadow:
        0 15px 45px rgba(0, 245, 160, 0.3);
}

.btn-secondary {
    border-color: var(--border);

    background: rgba(255, 255, 255, 0.03);

    color: white;
}

.btn-secondary:hover {
    border-color: var(--primary);

    color: var(--primary);

    transform: translateY(-3px);
}


/* =========================
   SOCIAL
========================= */

.social-links {
    display: flex;

    gap: 12px;

    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);

    border-radius: 50%;

    color: var(--text-muted);

    font-size: 0.8rem;

    font-weight: 700;

    transition: 0.3s;
}

.social-links a:hover {
    border-color: var(--primary);

    color: var(--primary);

    transform: translateY(-4px);
}


/* =========================
   CODE CARD
========================= */

.hero-card {
    animation: floating 5s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.code-window {
    background: #090e18;

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.4);
}

.window-top {
    height: 50px;

    display: flex;

    align-items: center;

    gap: 20px;

    padding: 0 18px;

    border-bottom: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 0.8rem;
}

.window-dots {
    display: flex;
    gap: 7px;
}

.window-dots span {
    width: 11px;
    height: 11px;

    border-radius: 50%;

    background: #344055;
}

.code-content {
    padding: 30px;

    font-family:
        "Courier New",
        monospace;

    font-size: 0.95rem;

    line-height: 2;
}

.code-content p {
    color: #cbd5e1;
}

.indent {
    padding-left: 25px;
}

.double-indent {
    padding-left: 50px;
}

.purple {
    color: #c084fc;
}

.yellow {
    color: #facc15;
}

.green {
    color: #4ade80;
}

.blue {
    color: #38bdf8;
}

.cursor {
    display: inline-block;

    width: 7px;
    height: 18px;

    background: var(--primary);

    vertical-align: middle;

    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}


/* =========================
   SECTION HEADINGS
========================= */

.section-heading {
    text-align: center;

    margin-bottom: 65px;
}

.section-heading > p:first-child {
    color: var(--primary);

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 4px;

    margin-bottom: 12px;
}

.section-heading h2 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);

    letter-spacing: -2px;
}

.section-heading h2 span {
    color: var(--primary);
}

.heading-description {
    color: var(--text-muted);

    margin-top: 15px;
}


/* =========================
   ABOUT
========================= */

.about-grid {
    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 80px;

    align-items: center;
}

.about-image {
    display: flex;

    justify-content: center;
}

.profile-box {
    width: 310px;
    height: 360px;

    border: 1px solid var(--border);

    background:
        linear-gradient(
            145deg,
            rgba(0, 245, 160, 0.08),
            rgba(0, 217, 255, 0.04)
        );

    border-radius: 25px;

    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.profile-box::before {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    border-radius: 50%;

    border: 1px solid rgba(0, 245, 160, 0.3);
}

.profile-symbol {
    width: 140px;
    height: 140px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    color: #001a12;

    font-size: 2.5rem;

    font-weight: 900;

    position: relative;

    z-index: 2;

    box-shadow:
        0 0 60px rgba(0, 245, 160, 0.2);
}

.profile-lines {
    position: absolute;

    bottom: 30px;

    left: 30px;
    right: 30px;

    display: flex;

    flex-direction: column;

    gap: 8px;
}

.profile-lines span {
    height: 3px;

    background: rgba(255, 255, 255, 0.1);

    border-radius: 5px;
}

.profile-lines span:nth-child(2) {
    width: 75%;
}

.profile-lines span:nth-child(3) {
    width: 50%;
}

.about-content h3 {
    font-size: 2rem;

    line-height: 1.2;

    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-muted);

    margin-bottom: 17px;
}

.about-stats {
    display: flex;

    gap: 50px;

    margin-top: 35px;
}

.about-stats div {
    display: flex;

    flex-direction: column;
}

.about-stats strong {
    color: var(--primary);

    font-size: 2rem;
}

.about-stats span {
    color: var(--text-muted);

    font-size: 0.8rem;
}


/* =========================
   SKILLS
========================= */

.skills-section {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;
}

.skill-card {
    background: var(--card);

    border: 1px solid var(--border);

    padding: 30px;

    border-radius: 15px;

    transition:
        transform 0.3s,
        border-color 0.3s,
        background 0.3s;
}

.skill-card:hover {
    transform: translateY(-8px);

    border-color:
        rgba(0, 245, 160, 0.4);

    background: var(--card-hover);
}

.skill-icon {
    width: 55px;
    height: 55px;

    border-radius: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(0, 245, 160, 0.08);

    border: 1px solid
        rgba(0, 245, 160, 0.15);

    color: var(--primary);

    font-weight: 900;

    margin-bottom: 22px;
}

.skill-card h3 {
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--text-muted);

    font-size: 0.9rem;

    margin-bottom: 20px;
}

.skill-tags {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}

.skill-tags span {
    padding: 4px 8px;

    border-radius: 5px;

    background: rgba(255, 255, 255, 0.05);

    color: #cbd5e1;

    font-size: 0.7rem;
}

.tech-cloud {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 50px;
}

.tech-cloud span {
    padding: 9px 15px;

    border: 1px solid var(--border);

    border-radius: 100px;

    color: var(--text-muted);

    font-size: 0.8rem;
}


/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.project-card {
    position: relative;

    padding: 35px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 16px;

    overflow: hidden;

    transition:
        transform 0.3s,
        border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-8px);

    border-color:
        rgba(0, 245, 160, 0.35);
}

.project-number {
    position: absolute;

    top: 20px;
    right: 25px;

    font-size: 0.75rem;

    color: #536176;

    font-weight: 800;
}

.project-icon {
    font-size: 2.5rem;

    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 1.4rem;

    margin-bottom: 15px;
}

.project-card p {
    color: var(--text-muted);

    font-size: 0.9rem;

    margin-bottom: 25px;
}

.project-tech {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-bottom: 25px;
}

.project-tech span {
    color: var(--primary);

    font-size: 0.72rem;

    padding: 5px 9px;

    background:
        rgba(0, 245, 160, 0.06);

    border-radius: 5px;
}

.project-link {
    color: white;

    font-weight: 700;

    font-size: 0.85rem;

    transition: 0.3s;
}

.project-link:hover {
    color: var(--primary);
}


/* =========================
   GAME
========================= */

.game-section {
    background: var(--bg-light);
}

.game-wrapper {
    max-width: 620px;

    margin: auto;

    text-align: center;
}

.game-info {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 15px;
}

.score-box {
    padding: 15px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 10px;
}

.score-box small {
    display: block;

    color: var(--text-muted);

    font-size: 0.65rem;

    letter-spacing: 1px;
}

.score-box strong {
    color: var(--primary);

    font-size: 1.5rem;
}

.game-container {
    position: relative;

    width: min(100%, 500px);

    margin: auto;

    border: 2px solid
        rgba(0, 245, 160, 0.3);

    border-radius: 15px;

    overflow: hidden;

    background: #20252d;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.4);
}

#gameCanvas {
    display: block;

    width: 100%;

    height: auto;

    background: #252a32;
}

.game-overlay {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background:
        rgba(3, 7, 13, 0.75);

    backdrop-filter: blur(5px);

    z-index: 5;
}

.game-start {
    padding: 30px;

    text-align: center;
}

.big-car {
    font-size: 4rem;

    margin-bottom: 15px;
}

.game-start h3 {
    font-size: 2rem;

    margin-bottom: 10px;
}

.game-start p {
    color: var(--text-muted);

    margin-bottom: 25px;
}

.game-controls {
    display: flex;

    justify-content: center;

    gap: 20px;

    margin-top: 20px;
}

.game-controls button {
    width: 65px;
    height: 50px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--card);

    color: white;

    font-size: 1.5rem;

    cursor: pointer;

    transition: 0.2s;
}

.game-controls button:active {
    transform: scale(0.92);

    background: var(--primary);

    color: #001b12;
}

.game-tip {
    margin-top: 15px;

    color: #66758b;

    font-size: 0.75rem;
}


/* =========================
   CONTACT
========================= */

.contact-section {
    background: var(--bg);
}

.contact-grid {
    display: grid;

    grid-template-columns: 0.9fr 1.1fr;

    gap: 80px;
}

.contact-info h3 {
    font-size: 2.3rem;

    margin-bottom: 20px;
}

.contact-info > p {
    color: var(--text-muted);

    max-width: 500px;

    margin-bottom: 35px;
}

.contact-items {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

.contact-item {
    display: flex;

    align-items: center;

    gap: 15px;
}

.contact-icon {
    width: 45px;
    height: 45px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    color: var(--primary);

    background:
        rgba(0, 245, 160, 0.08);

    font-size: 0.75rem;

    font-weight: 800;
}

.contact-item small {
    color: #718096;

    font-size: 0.7rem;
}

.contact-item p {
    color: #d9e0e9;

    font-size: 0.85rem;
}

.contact-form {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 35px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    color: #dce3ed;

    font-size: 0.8rem;

    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;

    border: 1px solid var(--border);

    outline: none;

    border-radius: 8px;

    padding: 13px 15px;

    color: white;

    background: rgba(255, 255, 255, 0.03);

    transition: 0.3s;

    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(0, 245, 160, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #526176;
}

.submit-btn {
    width: 100%;

    border: none;
}

.form-message {
    text-align: center;

    margin-top: 15px;

    color: var(--primary);

    font-size: 0.85rem;
}


/* =========================
   FOOTER
========================= */

footer {
    border-top: 1px solid var(--border);

    padding: 25px 0;

    background: #050810;
}

.footer-container {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    color: #66758b;

    font-size: 0.75rem;
}


/* =========================
   SCROLL ANIMATION
========================= */

.skill-card,
.project-card,
.about-content,
.about-image,
.contact-info,
.contact-form {
    opacity: 0;

    transform: translateY(30px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.show {
    opacity: 1;

    transform: translateY(0);
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .hero-container {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .social-links {
        justify-content: center;
    }

    .hero-card {
        max-width: 650px;

        width: 100%;

        margin: auto;
    }

    .about-grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;

        gap: 50px;
    }
}


@media (max-width: 700px) {

    .section {
        padding: 80px 0;
    }

    .nav-menu {
        position: absolute;

        top: 75px;
        left: 0;

        width: 100%;

        padding: 25px;

        flex-direction: column;

        background: #090e18;

        border-bottom: 1px solid var(--border);

        transform:
            translateY(-150%);

        transition: 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .menu-btn {
        display: block;
    }

    .hero h1 {
        letter-spacing: -3px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        gap: 25px;
    }

    .profile-box {
        width: 260px;
        height: 310px;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-container {
        flex-direction: column;

        text-align: center;
    }

    .code-content {
        padding: 20px;

        font-size: 0.75rem;
    }

    .game-container {
        border-radius: 10px;
    }
}


@media (max-width: 450px) {

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .game-info {
        gap: 6px;
    }

    .score-box {
        padding: 10px;
    }

    .score-box strong {
        font-size: 1.2rem;
    }
}