/* ===== BASE VARIABLES ===== */
:root {
    --bg: #0a0a0c;
    --bg-card: #111114;
    --bg-card-hover: #161619;
    --border: #1e1e24;
    --border-accent: #2a2a33;
    --text: #e8e6e3;
    --text-secondary: #8a8a96;
    --text-muted: #55555f;
    --accent: #4fd1c5;
    --accent-dim: #2d7a72;
    --accent-glow: rgba(79, 209, 197, 0.08);
    --warm: #e8a87c;
    --tag-bg: #1a1a20;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-accent) var(--bg);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

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

.nav-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text-secondary); margin: 4px 0; transition: all 0.3s; }

/* ===== SHARED ELEMENTS ===== */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    padding: 0.25rem 0.6rem;
    background: var(--tag-bg);
    border-radius: 4px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    background: var(--accent);
    color: var(--bg);
    transition: all 0.25s ease;
}
.btn-primary:hover { background: #5ee0d4; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(79, 209, 197, 0.25); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--border-accent);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}
.btn-outline:hover { border-color: var(--accent-dim); color: var(--text); background: var(--accent-glow); }

footer {
    text-align: center;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

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

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    nav { padding: 0.75rem 1.25rem; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: rgba(10, 10, 12, 0.95);
        backdrop-filter: blur(20px);
        padding: 1rem 1.25rem;
        gap: 0.75rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
}
