/* ─── TOKENS ──────────────────────────────────────────────── */
:root {
    --bg: #0a0a0a;
    --bg2: #111111;
    --bg3: #1a1a1a;
    --border: #222222;
    --text: #e8e6e1;
    --muted: #666660;
    --accent: #c8f060;
    --accent2: #60f0c8;
    --font-mono: 'DM Mono', monospace;
    --font-sans: 'DM Sans', sans-serif;
    --radius: 6px;
    --nav-h: 64px;
}

/* ─── RESET ───────────────────────────────────────────────── */
*,
*::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-sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ─── NOISE OVERLAY ───────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
    z-index: 9999;
}

/* ─── NAVBAR ──────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
}

.nav-logo span {
    color: var(--muted);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

/* language toggle */
.lang-toggle {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 10px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    gap: 4px;
    align-items: center;
    transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.lang-toggle .active {
    color: var(--accent);
}

/* hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 24px 40px;
    flex-direction: column;
    gap: 20px;
    z-index: 99;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: var(--text);
}

/* ─── SECTIONS ────────────────────────────────────────────── */
section {
    padding: 100px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

#hero {
    padding-top: calc(var(--nav-h) + 80px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ─── HERO ────────────────────────────────────────────────── */
.hero-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.6s 0.1s forwards;
}

.hero-name {
    font-family: var(--font-sans);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeUp 0.6s 0.2s forwards;
}

.hero-name em {
    font-style: italic;
    color: var(--accent);
}

.hero-role {
    font-family: var(--font-mono);
    font-size: clamp(14px, 2vw, 18px);
    color: var(--muted);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.6s 0.3s forwards;
}

.hero-bio {
    font-size: 17px;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 48px;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 0.6s 0.4s forwards;
}

.stack-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 0.6s 0.5s forwards;
}

.badge {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--muted);
    background: var(--bg2);
    transition: border-color 0.2s, color 0.2s;
}

.badge:hover {
    border-color: var(--accent2);
    color: var(--accent2);
}

/* decorative line */
.hero-line {
    position: absolute;
    right: 0;
    top: 0;
    height: 100vh;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
    display: none;
}

/* ─── SECTION HEADER ──────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 56px;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 16px;
}

/* ─── ABOUT ───────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--muted);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 16px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-facts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fact {
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg2);
    transition: border-color 0.2s;
}

.fact:hover {
    border-color: var(--border);
    border-color: #333;
}

.fact-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.fact-value {
    font-size: 15px;
    color: var(--text);
    font-weight: 400;
}

/* ─── PROJECTS ────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg2);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s, transform 0.25s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover {
    border-color: #2a2a2a;
    transform: translateY(-3px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-name {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-links {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.project-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    font-weight: 300;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    background: var(--bg3);
    border-radius: 4px;
    color: var(--muted);
}

/* ─── CONTACT ─────────────────────────────────────────────── */
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-text {
    font-size: 17px;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.8;
    max-width: 400px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg2);
    transition: border-color 0.2s, transform 0.2s;
    color: var(--text);
}

.contact-link:hover {
    border-color: #333;
    transform: translateX(4px);
}

.contact-link-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-link-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--muted);
}

.contact-link:hover .contact-link-icon svg {
    fill: var(--accent);
}

.contact-link-info {}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.contact-link-value {
    font-size: 14px;
    color: var(--text);
}

/* ─── FOOTER ──────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.footer-made {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.footer-made span {
    color: var(--accent);
}

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

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

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

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

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .nav-links,
    .lang-toggle {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    section {
        padding: 80px 20px;
    }

    #hero {
        padding: 120px 20px 80px;
    }

    .hero-name {
        font-size: clamp(40px, 12vw, 64px);
    }

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

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

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 24px 20px;
    }

    .mobile-lang {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-lang button {
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: 0.1em;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 5px 10px;
        cursor: pointer;
        color: var(--muted);
        transition: border-color 0.2s, color 0.2s;
    }

    .mobile-lang button.active {
        color: var(--accent);
        border-color: var(--accent);
    }
}

@media (min-width: 769px) {
    .mobile-lang {
        display: none;
    }
}