/* ============================================================
   Slate Theme — base.css
   Clean minimalist dark layout.
   No neon, no glow. Design meets restraint.
   ============================================================ */


/* ── Reset ──────────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ── Hamburger ──────────────────────────────────────────────── */

.hamburger {
    position: fixed;
    top: 19px;
    left: 20px;
    z-index: 1002;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-secondary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.hamburger:hover span {
    background: var(--color-primary);
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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


/* ── Sidebar ────────────────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--layout-sidebar-width);
    height: 100vh;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border-subtle);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    transition: left 0.25s ease;
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--color-border-subtle);
    flex-shrink: 0;
}

.sidebar-header h2 {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    padding: 8px 10px;
}

.nav-menu li {
    margin-bottom: 1px;
}

.nav-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    overflow: visible;
}

.nav-menu a::before {
    display: none;
}

.nav-menu a:hover {
    background: var(--color-overlay-subtle);
    color: var(--color-primary);
    transform: none;
    box-shadow: none;
}

.nav-menu a.active {
    background: rgba(var(--color-accent-rgb), 0.1);
    color: var(--color-accent);
    font-weight: 600;
    box-shadow: none;
}


/* ── Overlay ────────────────────────────────────────────────── */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ── Main wrapper ───────────────────────────────────────────── */

.main-wrapper {
    margin-left: 0;
    transition: margin-left 0.25s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ── Site header — compact topbar ───────────────────────────── */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
}

/* header-top doubles as the compact topbar in Slate */
.header-top {
    display: flex;
    align-items: center;
    padding: 0 24px 0 68px;
    min-height: var(--header-top-height, 60px);
    border-bottom: none;
    background-image: none;
    background: var(--color-surface);
    position: relative;
}

.logo-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.3px;
    background: none;
    -webkit-text-fill-color: var(--color-primary);
    background-clip: unset;
    -webkit-background-clip: unset;
    text-shadow: none;
}

.logo-link img {
    height: 32px;
    width: auto;
}

.header-logo { flex-shrink: 0; }
.header-info  { display: flex; align-items: center; gap: 16px; }
.contact-info { display: flex; gap: 20px; }
.info-item    { color: var(--color-secondary); font-size: 0.875rem; }
.greeting     { color: var(--color-text-muted); font-size: 0.85rem; }

.header-nav {
    display: none;
    background: transparent;
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0;
}

.header-nav a {
    display: inline-block;
    color: var(--color-secondary);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: none;
}

.header-nav a::after { display: none; }

.header-nav a:hover {
    background: var(--color-overlay-subtle);
    color: var(--color-primary);
}

.header-nav a.active {
    color: var(--color-accent);
    background: rgba(var(--color-accent-rgb), 0.08);
    border-bottom-color: transparent;
}


/* ── Sticky notices ─────────────────────────────────────────── */

.sticky-notices {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(var(--color-accent-rgb), 0.9);
    color: #fff;
    padding: 8px 20px;
    text-align: center;
    font-size: 0.875rem;
    backdrop-filter: blur(8px);
}

.sticky-notices .notice-bar {
    max-width: 1200px;
    margin: 0 auto;
}

.sticky-notices a {
    color: #fff;
    text-decoration: underline;
}

.sticky-notices a:hover {
    text-decoration: none;
}


/* ── Content & container ────────────────────────────────────── */

.content {
    flex: 1;
    padding: 40px 24px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}


/* ── Typography ─────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary);
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: none;
    margin-bottom: 24px;
}

h2 {
    font-size: 1.7rem;
    border-bottom: 1px solid var(--color-border-subtle);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
}

h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; color: var(--color-secondary); }

p {
    margin-bottom: 16px;
    color: var(--color-text);
    line-height: 1.75;
}

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

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

.lead {
    font-size: 1.1rem;
    color: var(--color-secondary);
    line-height: 1.75;
    margin-bottom: 24px;
}

strong { font-weight: 600; color: var(--color-primary); }
code   { font-family: 'Fira Code', 'Cascadia Code', monospace; }

:is(code, pre) {
    background: var(--color-surface-card);
    border: 1px solid var(--color-border-subtle);
    border-radius: 4px;
    font-size: 0.875em;
}

code  { padding: 2px 6px; }
pre   { padding: 16px; overflow-x: auto; }
pre code { background: none; border: none; padding: 0; }

blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 12px 20px;
    margin: 24px 0;
    background: rgba(var(--color-accent-rgb), 0.05);
    border-radius: 0 6px 6px 0;
    color: var(--color-secondary);
}


/* ── Cards ──────────────────────────────────────────────────── */

.card {
    background: var(--color-surface-card);
    backdrop-filter: var(--card-backdrop-filter);
    -webkit-backdrop-filter: var(--card-backdrop-filter);
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.card:hover {
    border-color: rgba(var(--color-accent-rgb), 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: none;
}

.card h3 {
    margin-bottom: 12px;
    color: var(--color-primary);
}


/* ── Grid ───────────────────────────────────────────────────── */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}


/* ── Features list ──────────────────────────────────────────── */

.features {
    list-style: none;
    padding: 0;
}

.features li {
    padding: 12px 0 12px 22px;
    border-bottom: 1px solid var(--color-border-subtle);
    color: var(--color-text);
    position: relative;
    font-size: 0.95rem;
}

.features li::before {
    content: '›';
    position: absolute;
    left: 4px;
    color: var(--color-accent);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: inherit;
    text-shadow: none;
}


/* ── Buttons ────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
    box-shadow: none;
}

.btn:hover {
    background: var(--color-link);
    box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.25);
    text-decoration: none;
    color: #fff;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border-color: var(--color-border-subtle);
    color: var(--color-secondary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--color-overlay-subtle);
    border-color: rgba(var(--color-accent-rgb), 0.25);
    color: var(--color-primary);
    box-shadow: none;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}


/* ── Footer ─────────────────────────────────────────────────── */

.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-subtle);
    margin-top: auto;
}

.footer-content {
    padding: 32px 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 16px 0;
    flex-wrap: wrap;
}

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

.footer-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-subtle);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}


/* ── Responsive ─────────────────────────────────────────────── */

@media (min-width: 1500px) {
    .hamburger { display: none; }

    .sidebar { left: 0; }

    .main-wrapper { margin-left: var(--layout-sidebar-width); }

    .overlay { display: none; }

    .header-top  { padding-left: 28px; }
    .header-nav  { display: block; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }
    .header-nav { display: none; }
    .grid { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; align-items: center; gap: 12px; }
}

@media (max-width: 480px) {
    .content { padding: 24px 16px; }
    .card { padding: 16px; }
    .btn { width: 100%; justify-content: center; }
}


/* ── Animations ─────────────────────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.35s ease-out; }


/* ── Scrollbar ──────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-track { background: var(--color-bg); }

::-webkit-scrollbar-thumb {
    background: rgba(var(--color-accent-rgb), 0.25);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-accent-rgb), 0.45);
}


/* ── Utilities ──────────────────────────────────────────────── */

.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--color-text-muted); }
.text-accent  { color: var(--color-accent); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 48px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(var(--color-accent-rgb), 0.12);
    color: var(--color-accent);
    border: 1px solid rgba(var(--color-accent-rgb), 0.2);
}

.divider {
    border: none;
    border-top: 1px solid var(--color-border-subtle);
    margin: 24px 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
