/* ═══════════════════════════════════════
   RESET & VARIABLES
═══════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #12121e;
    --bg-card-hover: #181828;
    --text-primary: #e8e8ef;
    --text-secondary: #7a7a8e;
    --text-muted: #4a4a5e;
    --accent: #00e5a0;
    --accent-dim: rgba(0, 229, 160, 0.08);
    --accent-glow: rgba(0, 229, 160, 0.15);
    --accent-secondary: #00b8d4;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(0, 229, 160, 0.2);
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ═══════════════════════════════════════
   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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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;
}

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 120px 0;
}

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s var(--ease-out);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 12px var(--accent-glow); }
    50% { opacity: 0.6; box-shadow: 0 0 4px var(--accent-glow); }
}

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

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

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

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

.nav-links .nav-cta a {
    color: var(--accent);
    border: 1px solid rgba(0, 229, 160, 0.3);
    padding: 6px 16px;
}

.nav-links .nav-cta a:hover {
    background: var(--accent-dim);
}

.nav-links .nav-cta a::after {
    display: none;
}

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

.nav-links .nav-active a::after {
    width: 100%;
}

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

.menu-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    padding: 14px 32px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s var(--ease-out);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    box-shadow: 0 0 30px var(--accent-glow), 0 4px 20px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--accent);
    border-color: var(--border-hover);
    background: var(--accent-dim);
}

/* ═══════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════ */
.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.15;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 540px;
    line-height: 1.7;
    font-weight: 300;
}

/* ═══════════════════════════════════════
   CENTERED SECTION HEADER (reusable)
═══════════════════════════════════════ */
.centered-header {
    text-align: center;
    margin-bottom: 64px;
}

.centered-header .section-label {
    justify-content: center;
}

.centered-header .section-label::before { display: none; }
.centered-header .section-label::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.centered-header .section-desc {
    margin: 0 auto;
}

/* ═══════════════════════════════════════
   PAGE HERO (internal pages)
═══════════════════════════════════════ */
.page-hero {
    padding: 160px 0 80px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.page-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.page-hero-title .highlight {
    color: var(--accent);
}

.page-hero .section-label {
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.1s forwards;
}

.page-hero .section-desc {
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) 0.4s forwards;
    max-width: 520px;
}

/* ═══════════════════════════════════════
   TERMINAL WINDOW (reusable)
═══════════════════════════════════════ */
.terminal-window {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

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

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-body {
    padding: 20px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--text-primary); }
.terminal-body .output { color: var(--text-muted); padding-left: 8px; }
.terminal-body .flag { color: var(--accent-secondary); }
.terminal-body .comment { color: var(--text-muted); font-style: italic; }

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s var(--ease-out);
}

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

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
    padding: 56px 0 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-flex;
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 260px;
    font-weight: 300;
}

.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.footer-col-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-links a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col-links a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-bottom-links a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover { color: var(--accent); }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1100px) {
    .nav-links { gap: 20px; }
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    section { padding: 80px 0; }

    .nav-links { display: none; }
    .menu-toggle { display: flex; }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(20px);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links .nav-cta { margin-top: 8px; }

    .page-hero { padding: 140px 0 60px; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
