:root {
    --bg-900: #020808;
    --bg-800: #041214;
    --text-main: #e5fff9;
    --text-muted: #98b8b1;
    --accent-1: #00f5a0;
    --accent-2: #4de4ff;
    --surface-1: rgba(6, 24, 27, 0.48);
    --surface-2: rgba(9, 34, 38, 0.68);
    --line-soft: rgba(120, 241, 214, 0.22);
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
    --shadow-neon: 0 0 32px rgba(0, 245, 160, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding-top: 92px;
    overflow-x: hidden;
    color: var(--text-main);
    background: var(--bg-900);
    font-family: "Manrope", sans-serif;
}

#vanta-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(1200px 480px at 15% 5%, rgba(40, 216, 175, 0.14), transparent 68%),
        radial-gradient(900px 520px at 90% 12%, rgba(77, 228, 255, 0.11), transparent 74%),
        linear-gradient(to bottom, rgba(2, 8, 8, 0.12), rgba(2, 8, 8, 0.72));
}

a {
    color: inherit;
}

nav {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1160px, calc(100% - 1.5rem));
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 12px 20px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(5, 18, 20, 0.78), rgba(2, 13, 15, 0.5));
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-soft), var(--shadow-neon);
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 42px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 8px rgba(0, 245, 160, 0.45));
    transition: transform 220ms ease, filter 220ms ease;
}

.logo img:hover {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 0 12px rgba(77, 228, 255, 0.6));
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 24px);
    margin: 0;
    padding: 0;
}

.nav-links a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 255, 250, 0.82);
    transition: color 220ms ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent-1));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 240ms ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f1fffc;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

section {
    position: relative;
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(4.8rem, 9vw, 7.3rem) 0;
}

section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, rgba(77, 228, 255, 0.65), transparent);
}

#hero {
    min-height: calc(100vh - 92px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 28px;
    z-index: 1;
}

#hero::before {
    display: none;
}

.hero-headline-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: clamp(1rem, 2.5vw, 1.4rem) clamp(1.2rem, 3vw, 1.9rem);
    border-radius: 20px;
    border: 1px solid rgba(116, 243, 215, 0.2);
    background: linear-gradient(145deg, rgba(8, 30, 33, 0.22), rgba(4, 18, 21, 0.08));
    box-shadow: 0 0 0 1px rgba(130, 255, 229, 0.04) inset;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease, border-color 280ms ease;
    will-change: transform, box-shadow;
}

.hero-headline-card:hover {
    --hover-lift: -16px;
    transform: translateY(-16px);
    border-color: rgba(145, 255, 231, 0.46);
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.52);
}

.hero-intro {
    margin: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(0.78rem, 1.5vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #abccc4;
}

.name {
    margin: 0;
    line-height: 1;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(2.3rem, 8vw, 5.9rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(90deg, #d9fff4 8%, #89ffe1 48%, #6fd5ff 94%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 26px rgba(0, 245, 160, 0.25);
}

.tagline {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(1.02rem, 2.4vw, 1.7rem);
    font-weight: 600;
    color: #d8fff3;
}

.typing-role {
    color: #f2fffd;
    border-right: 2px solid var(--accent-1);
    padding-right: 5px;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(0, 245, 160, 0.28);
    animation: caretBlink 0.82s steps(1) infinite;
}

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

.code-box {
    width: min(940px, 100%);
    min-height: 240px;
    margin-top: 8px;
    text-align: left;
    padding: 1.65rem 1.8rem;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(155deg, var(--surface-2), var(--surface-1));
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft), 0 0 26px rgba(77, 228, 255, 0.08);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease, border-color 280ms ease;
    will-change: transform, box-shadow;
}

.code-box:hover {
    --hover-lift: -16px;
    transform: translateY(-16px);
    border-color: rgba(145, 255, 231, 0.5);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.56);
}

.code-box h1 {
    margin: 0 0 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(1.58rem, 2.85vw, 2.05rem);
    color: #8ef6db;
}

.code-box p {
    margin: 0;
    line-height: 1.75;
    color: #d7f0eb;
    font-size: clamp(1.03rem, 1.35vw, 1.14rem);
}

.section-title {
    margin: 0 0 1.8rem;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.55rem, 3.7vw, 2.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d9fffa;
    text-align: center;
    text-shadow: 0 0 15px rgba(77, 228, 255, 0.24);
}

.stats-container,
.skills-container,
.achievements-container,
.contact-container {
    display: grid;
    gap: clamp(20px, 2vw, 30px);
}

.stats-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skills-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.achievements-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.skills-card,
.achievement-card,
.education-card,
.contact-card,
.project-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(8, 28, 31, 0.72), rgba(5, 19, 22, 0.44));
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft), 0 0 22px rgba(0, 245, 160, 0.08);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease, border-color 280ms ease;
    will-change: transform, box-shadow;
}

.stat-card:hover,
.skills-card:hover,
.achievement-card:hover,
.education-card:hover,
.contact-card:hover,
.project-card:hover {
    --hover-lift: -16px;
    transform: translateY(-16px);
    border-color: rgba(147, 255, 232, 0.52);
    box-shadow: 0 28px 52px rgba(0, 0, 0, 0.56);
}

.stat-card {
    text-align: center;
    padding: 1.95rem 1.55rem;
}

.stat-card h3 {
    margin: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.11em;
    color: #9fc6bd;
}

.stat-card h1 {
    margin: 10px 0 6px;
    font-size: clamp(2rem, 5.2vw, 2.9rem);
    line-height: 1;
}

.stat-card p {
    margin: 0 0 12px;
    color: #bad6cf;
    font-size: 0.92rem;
}

.profile-link {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: #8be8ff;
    text-decoration: none;
}

.profile-link:hover {
    color: #b0fff0;
    text-shadow: 0 0 10px rgba(77, 228, 255, 0.4);
}

.cf { color: #ffae5d; }
.lc { color: #7dd3fc; }
.cc { color: #86efac; }
.ac { color: #a5b4fc; }

#projects {
    color: var(--text-main);
}

.project-card {
    display: grid;
    grid-template-columns: clamp(260px, 24vw, 340px) minmax(0, 1fr);
    width: 100%;
    max-width: none;
    margin: 0 auto;
    overflow: hidden;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 350ms ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-content {
    padding: clamp(1rem, 1.75vw, 1.3rem);
}

.project-content h2 {
    margin: 0 0 8px;
    color: #b3fff1;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.project-content p {
    margin: 0 0 10px;
    color: #d3ece6;
    line-height: 1.42;
    font-size: 0.9rem;
}

.tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(141, 255, 229, 0.26);
    background: rgba(0, 245, 160, 0.08);
    color: #c9fff0;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.project-links a {
    margin-right: 16px;
    text-decoration: none;
    font-weight: 700;
    color: #8cf4da;
}

.project-links a:hover {
    color: #d7fff5;
    text-shadow: 0 0 10px rgba(0, 245, 160, 0.34);
}

.skills-card {
    text-align: left;
    padding: 1.55rem;
}

.skills-card h2 {
    margin: 0 0 12px;
    color: #abffe9;
    font-size: 1.08rem;
}

.skills-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills-card li {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(77, 228, 255, 0.1);
    border: 1px solid rgba(141, 255, 229, 0.14);
    color: #ddfff6;
    font-size: 0.83rem;
}

.achievement-card {
    padding: 1.75rem 1.4rem;
    text-align: center;
}

.achievement-card h3 {
    margin: 0;
    color: #cdfff2;
    font-size: 1.03rem;
}

#education {
    color: var(--text-main);
}

.education-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding: 1.6rem;
    margin-bottom: 18px;
}

.education-image {
    align-self: start;
}

.education-image img {
    width: 74px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(128, 245, 214, 0.26);
}

.education-content h2 {
    margin: 0 0 8px;
    color: #c8fff3;
    font-size: 1.05rem;
}

.education-content p {
    margin: 0 0 10px;
    color: #cce5de;
    line-height: 1.6;
}

#contact {
    text-align: center;
}

.contact-text {
    margin: 0 0 24px;
    color: #bcddd6;
    font-size: 1.03rem;
}

.contact-card {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
    padding: 0 18px;
    text-decoration: none;
    font-weight: 700;
    color: #d9fff7;
}

.contact-card:hover {
    color: #ffffff;
}

.reveal {
    --hover-lift: 0px;
    opacity: 0;
    transform: translateY(calc(22px + var(--hover-lift))) scale(0.985);
    transition: opacity 720ms ease, transform 720ms ease;
    will-change: transform, opacity;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(var(--hover-lift)) scale(1);
}

@media (max-width: 980px) {
    section {
        width: min(100%, calc(100% - 2rem));
    }

    .stats-container,
    .skills-container,
    .achievements-container,
    .contact-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .project-image {
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 126px;
    }

    nav {
        top: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 10px 14px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
        transform: translateX(-50%);
    }

    .logo img {
        height: 36px;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
    }

    .nav-links::-webkit-scrollbar {
        height: 0;
    }

    #hero {
        min-height: calc(100vh - 126px);
    }

    .tagline {
        flex-wrap: wrap;
        justify-content: center;
    }

    .code-box {
        min-height: 220px;
    }

    .stats-container,
    .skills-container,
    .achievements-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .education-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .education-image {
        justify-self: center;
    }

    .education-image img {
        width: 84px;
        height: 84px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
