/* ============================
   TOKENS
============================ */

:root {
    --bg: #0a0d10;
    --bg-panel: #12161b;
    --bg-elevated: #171c22;
    --border: #232931;
    --border-soft: #1c2128;

    --green: #00ff8c;
    --green-dim: #00b368;
    --green-glow: rgba(0, 255, 140, 0.14);

    --white: #f3f5f4;
    --grey: #8b9199;
    --grey-dark: #565c64;

    --font-display: 'Space Grotesk', 'Lucida Console', monospace;
    --font-mono: 'JetBrains Mono', 'Lucida Console', monospace;

    --section-pad-x: 80px;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--white);
    font-family: var(--font-mono);
    overflow-x: hidden;
}

::selection {
    background: var(--green);
    color: #06110b;
}

a {
    color: inherit;
}

h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

.accent {
    color: var(--green);
}

/* ============================
   BACKGROUND LAYERS
============================ */

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(to right, var(--border-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--border-soft) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
    opacity: 0.6;
}

.bg-glow {
    position: fixed;
    z-index: -2;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.16;
    background: radial-gradient(circle, var(--green) 0%, transparent 70%);
    animation: drift 22s ease-in-out infinite alternate;
}

.bg-glow--one {
    top: -220px;
    left: -160px;
}

.bg-glow--two {
    bottom: -260px;
    right: -180px;
    animation-delay: -8s;
    animation-duration: 26s;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 40px) scale(1.12); }
}

.bg-scanline {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--green-glow) 45%,
        transparent 55%
    );
    background-size: 100% 220px;
    opacity: 0.5;
    animation: scan 10s linear infinite;
}

@keyframes scan {
    from { background-position: 0 -220px; }
    to { background-position: 0 100vh; }
}

/* ============================
   COVERAGE / SCROLL PROGRESS BAR
============================ */

.coverage-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green-glow);
    z-index: 1100;
    transition: width 0.1s ease-out;
}

/* ============================
   TOP NAVBAR
============================ */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px var(--section-pad-x);
    background: rgba(18, 22, 27, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo__prompt {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--grey);
}

.logo__at,
.logo__colon {
    color: var(--green);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

nav li {
    margin-bottom: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #cfd3d8;
    text-decoration: none;
    font-size: 0.92rem;
    padding-bottom: 4px;
}

.nav-link__idx {
    color: var(--grey-dark);
    font-size: 0.72rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 1px;
    background: var(--green);
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: var(--green);
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 0.88rem;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 var(--green-glow);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 140, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 140, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 140, 0); }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn__arrow {
    transition: transform 0.2s ease;
}

.btn:hover .btn__arrow {
    transform: translateX(3px);
}

.btn--primary {
    background: var(--green);
    color: #06110b;
}

.btn--primary:hover {
    box-shadow: 0 0 24px var(--green-glow);
    transform: translateY(-2px);
}

.btn--ghost {
    border-color: var(--border);
    color: var(--white);
    background: transparent;
}

.btn--ghost:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-2px);
}

.btn--resume-nav {
    border: 1px solid var(--border);
    color: var(--white);
    padding: 8px 16px;
    font-size: 0.82rem;
    border-radius: 6px;
}

.btn--resume-nav:hover {
    border-color: var(--green);
    color: var(--green);
}

.btn--footer {
    margin-top: 36px;
}

/* ============================
   MAIN / SECTION SHELL
============================ */

main {
    width: 100%;
}

.section {
    padding: 140px var(--section-pad-x);
    border-bottom: 1px solid var(--border-soft);
}

.section-head {
    margin-bottom: 56px;
}

.section-head__idx {
    display: block;
    color: var(--grey-dark);
    font-size: 0.82rem;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
}

.section-head h2 {
    font-size: 2.4rem;
    font-weight: 600;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

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

.hero {
    position: relative;
    min-height: 100vh;
    padding: 80px var(--section-pad-x);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.case-tag {
    color: var(--green-dim);
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.hero__name {
    font-size: 6rem;
    line-height: 1.02;
    margin-bottom: 10px;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 500;
    margin-top: 6px;
    margin-bottom: 34px;
    max-width: 700px;
    line-height: 1.3;
    color: #d7dade;
}

.hero h2.typing {
    color: var(--green);
    font-size: 1.25rem;
    font-weight: 500;
    font-family: var(--font-mono);
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.4s;
}

.glyph {
    display: inline-block;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    min-width: 220px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.info-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-3px);
}

.info-card h3 {
    color: var(--green);
    margin-bottom: 10px;
    font-size: 1rem;
}

.info-card p {
    color: var(--grey);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
    position: absolute;
    bottom: 40px;
    left: var(--section-pad-x);
    width: 22px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: none;
}

.scroll-cue span {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 6px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--green);
    animation: scrollcue 1.6s ease infinite;
}

@keyframes scrollcue {
    0% { top: 6px; opacity: 1; }
    70% { top: 18px; opacity: 0; }
    100% { top: 18px; opacity: 0; }
}

@media (min-width: 720px) {
    .scroll-cue { display: block; }
}

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

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.about {
    padding-top: 100px;
}

.about-copy p {
    color: #cfd3d8;
    line-height: 1.75;
    margin-bottom: 18px;
    font-size: 1rem;
}

.about-copy em {
    color: var(--green);
    font-style: normal;
}

.terminal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.terminal-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot--r { background: #ff5f56; }
.terminal-dot--y { background: #ffbd2e; }
.terminal-dot--g { background: #27c93f; }

.terminal-card__title {
    margin-left: 8px;
    color: var(--grey);
    font-size: 0.82rem;
}

.terminal-card__body {
    list-style: none;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 0.86rem;
    color: #cfd3d8;
}

.log-ok {
    color: var(--green);
    margin-right: 8px;
}

/* ============================
   TOOLKIT
============================ */

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.toolkit-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.toolkit-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-3px);
}

.toolkit-card h3 {
    font-size: 1rem;
    margin-bottom: 18px;
    color: var(--white);
    font-family: var(--font-mono);
    font-weight: 600;
}

.toolkit-card__bracket {
    color: var(--green);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: #cfd3d8;
    font-size: 0.82rem;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-2px);
}

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

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    border-color: var(--green-dim);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -16px var(--green-glow);
}

.project-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-id {
    color: var(--grey-dark);
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.tc-status {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--green-glow);
    color: var(--green);
    border: 1px solid var(--green-dim);
    letter-spacing: 0.04em;
}

.project-card h3 {
    font-size: 1.15rem;
}

.project-card__meta {
    color: var(--grey);
    font-size: 0.8rem;
    margin-top: -8px;
}

.project-card p {
    color: #cfd3d8;
    font-size: 0.92rem;
    line-height: 1.6;
}

.pill-row--tags {
    margin-top: auto;
    padding-top: 8px;
}

.pill--tag {
    background: transparent;
    border-color: var(--border-soft);
    color: var(--grey);
    font-size: 0.76rem;
}

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

.timeline {
    position: relative;
    padding-left: 32px;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.timeline-item {
    position: relative;
}

.timeline-item__marker {
    position: absolute;
    left: -37px;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--green);
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item__card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.timeline-item__card:hover {
    border-color: var(--green-dim);
    transform: translateX(4px);
}

.timeline-item__date {
    color: var(--green-dim);
    font-size: 0.8rem;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.timeline-item__card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-item__org {
    color: var(--grey);
    font-size: 0.86rem;
    margin-bottom: 12px;
}

.timeline-item__card p:last-child {
    color: #cfd3d8;
    font-size: 0.92rem;
    line-height: 1.6;
}

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

.contact {
    text-align: center;
    border-bottom: none;
}

.contact-inner {
    max-width: 720px;
    margin: 0 auto;
}

.contact h2 {
    font-size: 2.6rem;
    margin: 14px 0 16px;
}

.contact-sub {
    color: var(--grey);
    font-size: 1rem;
    margin-bottom: 40px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: left;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.contact-link:hover {
    border-color: var(--green);
    transform: translateY(-3px);
}

.contact-link__label {
    color: var(--grey-dark);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-link__value {
    color: var(--white);
    font-size: 0.92rem;
}

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

.site-footer {
    text-align: center;
    padding: 28px;
    color: var(--grey-dark);
    font-size: 0.8rem;
}

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

@media (max-width: 980px) {
    :root {
        --section-pad-x: 32px;
    }

    .navbar {
        flex-wrap: wrap;
        row-gap: 12px;
    }

    nav ul {
        gap: 16px;
    }

    .hero__name {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

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

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

    .contact-links {
        grid-template-columns: 1fr;
    }
}
