:root {
    --bg: #0a0e17;
    --bg-elev: #131722;
    --bg-elev2: #181c28;
    --border: #1e2330;
    --border-hover: #2a3040;
    --text: #f3f1ea;
    --text-muted: #8a8a8e;
    --text-dim: #5a5a5e;
    --accent: #e8b948;
    --accent-light: #f4cb5a;
    --accent-dark: #d4a017;
    --accent-glow: rgba(232, 185, 72, 0.35);
    --accent-bg: rgba(232, 185, 72, 0.06);
    --progress-track: #1e2330;
    --dot-color: #252e42;

    --font-display: 'Zilla Slab', 'Roboto Slab', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

    --max-width: 1100px;
    --reading-width: min(900px, calc(100vw - 64px));
    --nav-height: 60px;

    --radius: 0px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    background-image: radial-gradient(circle, var(--dot-color) 1.5px, transparent 1.5px);
    background-size: 80px 80px;
    background-position: 0 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Remove old noise overlay */
body::before {
    content: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

p { margin-bottom: 1em; }

ul, ol { margin-bottom: 1em; padding-left: 1.5em; }
li { margin-bottom: 0.25em; }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    width: 46px;
    height: 46px;
    opacity: 0.65;
    transition: opacity var(--transition);
}

.nav-brand:hover .nav-logo {
    opacity: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all var(--transition);
}

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

.nav-link.active {
    color: var(--accent);
}

.nav-icon {
    font-size: 16px;
    font-variation-settings: 'wght' 300;
}

/* Theme toggle */
/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 2;
}

/* ===== SECTION PREFIX ===== */
.section-prefix {
    display: block;
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-bottom: 12px;
}

.section-prefix::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-out infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 2rem;
}

/* ===== HERO ===== */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-color: var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/static/img/hero-bg.png");
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
    -webkit-mask-image: linear-gradient(180deg, black 0%, black 80%, transparent 100%);
    mask-image: linear-gradient(180deg, black 0%, black 80%, transparent 100%);
}

.hero::after {
    content: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
    padding: 40px 56px;
    background: rgba(10, 14, 23, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.05;
    color: var(--text);
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--accent-bg);
    color: var(--text);
}

.btn-primary .material-symbols-outlined {
    font-size: 16px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline .material-symbols-outlined {
    font-size: 16px;
}

/* ===== HOME SECTIONS ===== */
.home-section {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.home-section-first {
    border-top: 1px solid var(--border);
    margin-top: 30px;
    padding-top: 48px;
}

.section-footer {
    margin-top: 32px;
    text-align: center;
}

.link-arrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
}

.link-arrow:hover {
    color: var(--text);
}

/* ===== SOCIAL GRID ===== */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all var(--transition);
}

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

.social-arrow {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.4;
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px;
    background: transparent;
}

.footer-inner {
    text-align: center;
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
}

/* ===== CORNER BRACKETS (utility) ===== */
.bracket-card {
    position: relative;
}

.bracket-card::before,
.bracket-card::after,
.bracket-card > .brk-tl,
.bracket-card > .brk-br {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1px solid var(--accent);
    opacity: 0.5;
    transition: opacity var(--transition);
}

.bracket-card::before {
    top: -6px; left: -6px;
    border-right: 0; border-bottom: 0;
}

.bracket-card::after {
    top: -6px; right: -6px;
    border-left: 0; border-bottom: 0;
}

.bracket-card > .brk-tl {
    bottom: -6px; left: -6px;
    border-right: 0; border-top: 0;
}

.bracket-card > .brk-br {
    bottom: -6px; right: -6px;
    border-left: 0; border-top: 0;
}

.bracket-card:hover::before,
.bracket-card:hover::after,
.bracket-card:hover > .brk-tl,
.bracket-card:hover > .brk-br {
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-container { padding: 0 16px; }
    .nav-link span:not(.material-symbols-outlined) { display: none; }
    .nav-link { padding: 8px; }
    .main-content { padding: 0 16px; }
    .hero-cta { flex-direction: column; }
}
