:root {
    --notion-bg: #ffffff;
    --notion-sidebar: #f7f6f3;
    --notion-text: #37352f;
    --notion-text-muted: #787774;
    --notion-hover: rgba(55, 53, 47, 0.08);
    --notion-border: #e9e9e8;
    --primary: #0078d4;
    --accent: #2b88d8;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
    --sidebar-width: 280px;
}

[data-theme="dark"] {
    --notion-bg: #191919;
    --notion-sidebar: #202020;
    --notion-text: #ffffff;
    --notion-text-muted: #9b9b9b;
    --notion-hover: rgba(255, 255, 255, 0.05);
    --notion-border: #2f2f2f;
}

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

html, body {
    height: 100%;
}

body {
    background-color: var(--notion-bg);
    color: var(--notion-text);
    font-family: var(--font-sans);
    line-height: 1.5;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--notion-sidebar);
    border-right: 1px solid var(--notion-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--notion-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    min-height: 0;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--notion-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--notion-text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--notion-hover);
}

.nav-item.active {
    background: var(--notion-hover);
    font-weight: 600;
}

.nav-item-icon {
    font-size: 1.1rem;
}

/* Main Content Styles */
main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 45px;
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid transparent;
    flex-shrink: 0;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--notion-text-muted);
}

.breadcrumb a {
    color: var(--notion-text-muted);
    text-decoration: none;
}

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

.page-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
}

.page-header {
    margin-bottom: 3rem;
}

.page-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content {
    font-size: 1.1rem;
    color: var(--notion-text);
}

.content p {
    margin-bottom: 1.5rem;
}

.content h2 {
    margin: 3rem 0 1.5rem;
    font-size: 1.75rem;
    border-bottom: 1px solid var(--notion-border);
    padding-bottom: 0.5rem;
}

.content h3 {
    margin: 2rem 0 1rem;
    font-size: 1.25rem;
}

.content ul,
.content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--primary);
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

.content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.content th,
.content td {
    text-align: left;
    padding: 0.6rem 1rem;
    border: 1px solid var(--notion-border);
}

.content th {
    background: var(--notion-sidebar);
    font-weight: 600;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.notion-card {
    border: 1px solid var(--notion-border);
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, box-shadow 0.2s;
    display: block;
}

.notion-card:hover {
    background: var(--notion-sidebar);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.notion-card h3, .notion-card h4 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notion-card p {
    font-size: 0.9rem;
    color: var(--notion-text-muted);
    margin: 0;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    background: var(--notion-sidebar);
    border-left: 4px solid var(--primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--notion-text);
    background: none;
    border: none;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        z-index: 200;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    }
    .mobile-toggle {
        display: block;
    }
    .page-container {
        padding: 2rem 1rem;
    }
    h1 {
        font-size: 2rem;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Site Footer ── */
.site-footer {
    border-top: 1px solid var(--notion-border);
    background: var(--notion-sidebar);
    padding: 2rem 2rem 1.5rem;
    margin-top: auto;
    flex-shrink: 0;
}

.site-footer__inner {
    max-width: 900px;
    margin: 0 auto;
}

.site-footer__disclaimer {
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--notion-text-muted);
    margin-bottom: 0.75rem;
}

.site-footer__disclaimer strong {
    color: var(--notion-text);
    font-weight: 600;
}

.site-footer__copy {
    font-size: 0.78rem;
    color: var(--notion-text-muted);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--notion-border);
}

.site-footer__copy a {
    color: var(--notion-text-muted);
    text-decoration: none;
}

.site-footer__copy a:hover {
    color: var(--notion-text);
    text-decoration: underline;
}
