/* ============ DESIGN SYSTEM ============ */
:root {
    --bg: #0a0a0a;
    --surface: #121212;
    --raised: #1a1a1a;
    --border: #212121;
    --fg: #f2f2f2;
    --muted: #6b6b6b;
    --green: #22d472;
    --green-dark: #18a355;
    --glow: rgba(34, 212, 114, 0.12);
    --sans: 'Sora', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

::selection {
    background: var(--green);
    color: #000;
}

strong {
    font-weight: 600;
    color: var(--green);
}

em {
    font-style: normal;
    color: var(--fg);
    font-weight: 400;
}

kbd {
    font-family: var(--mono);
    font-size: 0.8em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 7px;
}

.accent {
    color: var(--green);
}

.g {
    color: var(--green);
}

.c {
    color: var(--muted);
}

.k {
    color: var(--green);
}

.w {
    color: var(--fg);
}

.muted {
    color: var(--muted);
}

.mono-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--green);
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}

.cursor {
    color: var(--green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

#progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--green);
    z-index: 100;
    box-shadow: 0 0 10px var(--glow);
}

/* ============ NAVBAR ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 5vw;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav__brand {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.nav__name {
    font-weight: 700;
    font-size: 16px;
    color: var(--fg);
}

.nav__tag {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    letter-spacing: 1.5px;
}

.nav__links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav__links a:not(.btn) {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    transition: color 0.18s;
}

.nav__links a:not(.btn):hover {
    color: var(--green);
}

.nav__toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--green);
    margin: 5px 0;
}

/* ============ BUTTONS ============ */
.btn {
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s var(--ease);
}

.btn--fill {
    background: var(--green);
    color: #04130a;
    border: 0;
}

.btn--fill:hover {
    background: var(--green-dark);
    box-shadow: 0 0 32px var(--glow);
    transform: translateY(-2px);
}

.btn--ghost {
    border: 1px solid var(--border);
    color: var(--fg);
}

.btn--ghost:hover {
    border-color: var(--green);
    color: var(--green);
}

.btn--sm {
    padding: 0.45rem 1rem;
    font-size: 12px;
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 130px 5vw 80px;
}

.hero__badge {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
    letter-spacing: 2px;
    margin-bottom: 1.4rem;
}

.hero__title {
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.98;
    font-size: clamp(44px, 6.2vw, 84px);
    margin-bottom: 1.6rem;
}

.hero__title span {
    display: block;
}

.hero__sub {
    color: var(--muted);
    font-size: 16px;
    max-width: 460px;
    margin-bottom: 2.2rem;
}

.hero__ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.hero__pills {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}

.hero__pills span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    letter-spacing: 1px;
}

.hero__hint {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}

/* code card */
.codecard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 26px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.9;
    filter: drop-shadow(0 0 40px rgba(34, 212, 114, 0.15));
}

.codecard pre {
    font-family: inherit;
    white-space: pre-wrap;
    color: var(--fg);
}

.float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* entrance animation */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s var(--ease) forwards;
    animation-delay: calc(var(--d, 0) * 0.1s);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ============ SECTIONS ============ */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 5vw;
}

.section--surface {
    max-width: none;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section--surface>* {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.h2 {
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: clamp(30px, 4vw, 46px);
    margin-bottom: 1rem;
}

.lede {
    color: var(--muted);
    margin-bottom: 3rem;
    max-width: 60ch;
}

/* scroll reveal stagger */
.reveal .fade-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.visible .fade-child {
    opacity: 1;
    transform: none;
}

.reveal.visible .fade-child:nth-of-type(1) {
    transition-delay: 0.05s;
}

.reveal.visible .fade-child:nth-of-type(2) {
    transition-delay: 0.13s;
}

.reveal.visible .fade-child:nth-of-type(3) {
    transition-delay: 0.21s;
}

.reveal.visible .fade-child:nth-of-type(4) {
    transition-delay: 0.29s;
}

.reveal.visible .fade-child:nth-of-type(5) {
    transition-delay: 0.37s;
}

.reveal.visible .fade-child:nth-of-type(6) {
    transition-delay: 0.45s;
}

/* ============ PROJECT CARDS ============ */
.pcard {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 1.6rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.pcard:hover {
    border-color: var(--green);
    box-shadow: 0 0 32px var(--glow);
}

.pcard__info h3 {
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 0.7rem;
}

.pcard__info>p:not(.mono-tag) {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
}

.chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.chips span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    background: var(--raised);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

.plink {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--green);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.plink:hover {
    text-decoration: underline;
}

.pcard__visual {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 22px;
    align-self: center;
    width: 100%;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 2;
    overflow-x: auto;
}

.pcard__visual pre {
    font-family: inherit;
    color: var(--fg);
}

/* ============ TECH STACK ============ */
.stackgroup {
    margin-bottom: 2.4rem;
}

.stackgroup:last-child {
    margin-bottom: 0;
}

.stack__label {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 2.5px;
    margin-bottom: 0.9rem;
}

.stackgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
}

.stackitem {
    font-family: var(--mono);
    font-size: 11px;
    text-align: center;
    background: var(--raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 0.5rem;
    transition: border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.stackitem:hover {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 24px var(--glow);
}

/* ============ ABOUT ============ */
.about {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.about__text p {
    color: var(--muted);
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
}

.statchips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.statchips span {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    letter-spacing: 1px;
}

.factcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px 26px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 2.2;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.factcard:hover {
    border-color: var(--green);
    box-shadow: 0 0 32px var(--glow);
}

.factcard ul {
    list-style: none;
}

.factcard .muted {
    display: inline-block;
    min-width: 64px;
}

/* ============ NUMBERS ============ */
.numgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.numcard {
    background: var(--raised);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.8rem 1.4rem;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.numcard:hover {
    border-color: var(--green);
    box-shadow: 0 0 28px var(--glow);
}

.num {
    display: block;
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--green);
    letter-spacing: -0.03em;
}

.num::after {
    content: "+";
}

.num--st::after {
    content: "st";
    font-size: 1.2rem;
}

.numlabel {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 2px;
}

/* ============ EXPERIENCE ============ */
.xgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.xcard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.6rem;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.xcard:hover {
    border-color: var(--green);
    box-shadow: 0 0 28px var(--glow);
}

.xcard h3 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.xcard p:not(.mono-tag) {
    color: var(--muted);
    font-size: 0.88rem;
}

.xcard--award {
    border-top: 2px solid var(--green);
}

/* ============ CONTACT CTA ============ */
.contactcta {
    position: relative;
    text-align: center;
    padding-top: 110px;
    padding-bottom: 110px;
}

.contactcta__glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    max-width: 90vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 212, 114, 0.06), transparent 70%);
    pointer-events: none;
}

.contactcta__h2 {
    position: relative;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: clamp(34px, 5vw, 60px);
    margin-bottom: 1.2rem;
}

.contactcta__status {
    position: relative;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
    letter-spacing: 2px;
    margin-bottom: 2.4rem;
}

.contactcta__ctas {
    justify-content: center;
    position: relative;
}

.contactcta__note {
    position: relative;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 1.8rem;
}

/* ============ FOOTER ============ */
.footer {
    background: #080808;
    border-top: 1px solid var(--border);
    padding: 40px 5vw 24px;
}

.footer__row {
    max-width: 1280px;
    margin: 0 auto 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer__name {
    font-weight: 700;
}

.footer__links {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.footer__links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.18s;
}

.footer__links a:hover {
    color: var(--green);
}

.footer__copy {
    max-width: 1280px;
    margin: 0 auto;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
}

/* ============ TERMINAL EASTER EGG ============ */
.term-fab {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 60;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--green);
    color: #04130a;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 1.05rem;
    border: 0;
    cursor: pointer;
    box-shadow: 0 0 24px var(--glow);
    transition: transform 0.18s var(--ease), background 0.18s;
}

.term-fab:hover {
    transform: scale(1.1);
    background: var(--green-dark);
}

.term-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.term-overlay[hidden] {
    display: none;
}

.terminal {
    width: min(640px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.terminal__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot--r {
    background: #ff5f57;
}

.dot--y {
    background: #febc2e;
}

.dot--g {
    background: #28c840;
}

.terminal__title {
    margin-left: 10px;
    font-family: var(--mono);
    color: var(--muted);
    font-size: 0.78rem;
}

.term-close {
    margin-left: auto;
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
}

.term-close:hover {
    color: #ff5f57;
}

.terminal__body {
    height: 320px;
    overflow-y: auto;
    padding: 1.2rem 1.5rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.9;
    white-space: pre-wrap;
}

.terminal__body .out {
    color: var(--muted);
}

.terminal__body .okline {
    color: var(--green);
}

.term-input-row {
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-top: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 0.85rem;
}

.term-input-row input {
    flex: 1;
    background: none;
    border: 0;
    outline: 0;
    color: var(--fg);
    font-family: var(--mono);
    font-size: 0.85rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 110px;
    }

    .hero__right {
        max-width: 85%;
    }

    .pcard {
        grid-template-columns: 1fr;
    }

    .about {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .nav__toggle {
        display: block;
    }

    .nav__links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 5vw;
        gap: 1.2rem;
        background: rgba(10, 10, 10, 0.98);
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav__links.open {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-up,
    .reveal .fade-child {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }

    .float {
        animation: none;
    }

    .cursor {
        animation: none;
    }
}