:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #3b82f6;
    --accent2: #22d3ee;
    --card: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background:
            radial-gradient(circle at 20% 10%, rgba(59,130,246,0.05), transparent 40%),
            radial-gradient(circle at 80% 90%, rgba(34,211,238,0.08), transparent 50%),
            var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.18;
    will-change: background-position;
    background-image:
            linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: move 60s linear infinite;
}

@keyframes move {
    from { background-position: 0 0; }
    to   { background-position: 400px 400px; }
}


/* ── Page shell (sticky footer) ── */
.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* ── Site Header ── */
.site-header {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-sizing: border-box;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

/* ── Header Navigation ── */
.header-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-grow: 1;
    margin: 0 32px;
}

.header-nav a {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    backdrop-filter: blur(8px);
    color: var(--text);
    font-size: 0.88rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-nav a:hover,
.header-nav a.active {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent2);
}

/* ── Header Contact ── */
.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--muted);
    flex-shrink: 0;
}

.header-contact span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.header-contact a { color: var(--text); transition: color 0.2s ease; }
.header-contact a:hover { color: var(--accent2); }

/* ── Site Footer ── */
.site-footer {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    box-sizing: border-box;
}

.site-footer a { color: var(--accent2); margin: 0 10px; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .site-header { flex-wrap: wrap; }
    .header-nav {
        order: 3;
        flex-basis: 100%;
        margin: 10px 0 0;
        justify-content: center;
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-contact {
        align-items: flex-start;
        text-align: left;
    }
    .header-nav a { padding: 8px 12px; font-size: 0.82rem; }
}
