:root {
    --bg: #080a08;
    --surface: #0d110d;
    --border: #1a2a1a;
    --green: #39ff6a;
    --green-dim: #1a7a35;
    --green-glow: rgba(57, 255, 106, 0.12);
    --text: #c8d8c8;
    --text-dim: #5a7a5a;
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Syne', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: crosshair;
}

/* Scanlines overlay */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.08) 2px,
            rgba(0, 0, 0, 0.08) 4px);
}

/* Grid background */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
}

/* Header */
header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 10, 8, 0.9);
    backdrop-filter: blur(8px);
    animation: fadeDown 0.6s ease both;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    color: #fff;
    text-decoration: none;
}

.status {
    font-size: 0.75rem;
    color: var(--green);
    letter-spacing: 0.1em;
}

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

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

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

/* Main */
main {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 3rem;
}

/* Hero */
.hero {
    margin-bottom: 6rem;
    animation: fadeUp 0.7s 0.2s ease both;
}

.hero-tag {
    font-size: 0.75rem;
    color: var(--green);
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1.5rem;
}

.outline {
    -webkit-text-stroke: 2px var(--green);
    color: transparent;
}

.hero-sub {
    max-width: 480px;
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Section label */
.section-label {
    font-size: 0.75rem;
    color: var(--green-dim);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

/* Projects grid */
.projects {
    margin-bottom: 5rem;
    animation: fadeUp 0.7s 0.4s ease both;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    border: 1px solid var(--border);
}

.card {
    background: var(--surface);
    padding: 1.75rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: background 0.2s ease;
    animation: fadeUp 0.6s calc(0.1s * var(--i) + 0.5s) ease both;
}

.card:hover {
    background: var(--green-glow);
}

.card:hover .card-link {
    color: var(--green);
    letter-spacing: 0.15em;
}

.card-id {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.card-status {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.5rem;
    margin-bottom: 1rem;
}

.status-active {
    color: var(--green);
    border: 1px solid var(--green-dim);
}

.status-wip {
    color: #f0c040;
    border: 1px solid #5a4a10;
}

.status-archived {
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.card h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.card-link {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 0.2s, letter-spacing 0.2s;
}

/* Terminal */
.terminal-block {
    animation: fadeUp 0.7s 0.6s ease both;
}

.terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem 2rem;
    font-size: 0.85rem;
    line-height: 2;
}

.terminal-line {
    opacity: 0;
    animation: termLine 0.3s ease forwards;
}

.terminal-line:nth-child(1) {
    animation-delay: 1.0s;
}

.terminal-line:nth-child(2) {
    animation-delay: 1.5s;
}

.terminal-line:nth-child(3) {
    animation-delay: 2.0s;
}

.terminal-line:nth-child(4) {
    animation-delay: 2.5s;
}

.terminal-line:nth-child(5) {
    animation-delay: 3.0s;
}

@keyframes termLine {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt {
    color: var(--green);
    margin-right: 0.75rem;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--green);
}

/* Footer */
footer {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {

    header,
    footer {
        padding: 1.25rem 1.5rem;
    }

    main {
        padding: 2.5rem 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}