/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Fira+Code&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css');

:root {
    --sidebar-width: 280px;
    --bg-body: #0f172a;
    --bg-sidebar: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --border: #334155;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
aside {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

aside h1 {
    font-size: 1.4rem;
    margin-top: 0;
    color: var(--accent);
    font-weight: 800;
}

aside nav ul {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

aside nav li {
    margin-bottom: 0.5rem;
}

/* Menu category */
.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-left: 12px;
}

.nav-category:first-of-type {
    margin-top: 1rem;
}

aside nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

aside nav a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
}

aside nav a.active {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    font-weight: 600;
}

/* Main content */
main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 4rem 4rem; 
    max-width: none; 
}

h2 { 
    color: #fff; 
    margin-top: 0; 
    margin-bottom: 2rem;
    font-size: 2rem; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 1rem; 
}

h3 {
    color: var(--accent);
    margin-top: 2.5rem;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

p {
    line-height: 1.7;
    color: #cbd5e1;
}

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

a:hover {
    text-decoration: none;
}

/* Date class */
h2.no-border {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.5rem;
}

.script-date {
    display: block;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-muted);

    border-bottom: 1px solid var(--border);
    padding-top: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.script-date i {
    margin-right: 8px;
    font-style: normal;
    color: var(--accent);
}

/* Grid system */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: var(--bg-sidebar);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    text-decoration: none;
}

.card h3 {
    margin: 0 0 0.5rem 0; font-size: 1.2rem;
}

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

/* Code block */
pre {
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 1.5rem 0 !important;
    background: #0b1120 !important;
}

/* Copy button */
div.code-toolbar > .toolbar {
    opacity: 1;
    top: 0.5rem;
    right: 0.5rem;
}

div.code-toolbar > .toolbar .toolbar-item > button {
    background: var(--bg-sidebar);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

div.code-toolbar > .toolbar .toolbar-item > button:hover {
    color: var(--bg-body);
    background: var(--accent);
    border-color: var(--accent);
}

div.code-toolbar > .toolbar .toolbar-item > button:focus {
    outline: none;
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.sidebar-footer p {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 1rem;
    margin-bottom: 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.social-links a {
    color: var(--text-muted);
    padding: 0 8px;
    font-size: 1.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.copyright {
    font-size: 0.75rem;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Mobile */
#menu-toggle {
    display: none;
}

.burger-btn {
    display: none;
    position: fixed;
    top: 15px; right: 15px;
    z-index: 2000;
    width: 45px; height: 45px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.burger-btn span {
    display: block;
    width: 24px; height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

#menu-toggle:checked + .burger-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-toggle:checked + .burger-btn span:nth-child(2) {
    opacity: 0;
}

#menu-toggle:checked + .burger-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.menu-overlay {
    display: none;
}

@media (max-width: 768px) {
    .burger-btn {
        display: flex;
    }

    aside {
        position: fixed; top: 0; left: 0;
        height: 100vh; width: 280px; max-width: 80%;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        border-right: 1px solid var(--border);
        z-index: 100;
    }

    #menu-toggle:checked ~ aside {
        transform: translateX(0);
    }

    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 90;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
    }

    #menu-toggle:checked ~ .menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    main {
        margin-left: 0;
        padding: 5rem 1.5rem 2rem 1.5rem;
    }

    body {
        display: block;
    }
}
