@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #242424;
    color: #BFBFBF;
    margin: 0;
    line-height: 22px;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
    font-size: 16px;
}

h1 {
    font-size: 42px;
    line-height: 1.2;
}

h2 {
    font-size: 32px;
    line-height: 1.2;
}

h3 {
    font-size: 24px;
}

.main-header {
    background-color: #262626;
    border-bottom: 1px solid #3C3C3C;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.main-header nav {
    flex-grow: 1;
}

.main-header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: flex-start;
}

.main-header nav ul li a {
    display: block;
    padding: 16px 20px;
    color: #BFBFBF;
    text-decoration: none;
    font-weight: 700;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 380px;
    background-color: #262626;
    padding: 20px 20px 0 20px;
    border-right: 1px solid #3C3C3C;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
}

.sidebar-header {
    padding: 40px 0;
    flex-shrink: 0;
}

.sidebar-nav {
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-header h2 {
    font-size: 32px;
    margin: 0 0 10px 0;
}

.sidebar-header p {
    font-size: 12px;
    margin: 0;
}

.sidebar-divider {
    border: 0;
    height: 1px;
    background-color: #3C3C3C;
    margin: 20px 0;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.main-content {
    flex-grow: 1;
    padding: 20px 180px;
    overflow-y: auto;
}

.main-content a {
    color: #A68AF9;
    text-decoration: none;
}

a {
    color: #A68AF9;
    text-decoration: none;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav details {
    margin-bottom: 10px;
}

.sidebar-nav summary {
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sidebar-nav summary:hover {
    background-color: #3C3C3C;
}

.sidebar-nav summary svg {
    margin-right: 10px;
    transition: transform 0.2s;
}

.sidebar-nav details[open] > summary svg {
    transform: rotate(90deg);
}

.sidebar-nav ul ul {
    padding-left: 34px;
}

.sidebar-nav ul ul li a {
    display: block;
    padding: 5px 15px;
    border-radius: 4px;
    color: #BFBFBF;
    font-size: 14px;
}

.sidebar-nav ul ul li a:hover, .sidebar-nav ul ul li a.active {
    background-color: #3C3C3C;
}

.tags-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tags-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-icon {
    width: 24px;
    height: 24px;
}

.tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags li {
    background-color: #1A3C68;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 14px;
}

.sidebar-footer {
    border-top: 1px solid #3C3C3C;
    padding: 24px 50px;
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-photo {
    width: 72px;
    height: 72px;
    border-radius: 12px;
}

.footer-text p {
    margin: 0 0 4px 0;
    color: #909090;
    font-size: 16px;
}

.footer-text p.author {
    font-size: 20px;
    color: #909090;
}

.footer-text a {
    font-size: 12px;
    color: #909090;
    background-color: #3C3C3C;
    padding: 2px 11px;
    border-radius: 6px;
    display: inline-block;
}

blockquote {
    background-color: #2C2C2C;
    border-left: 4px solid #A68AF9;
    padding: 10px 20px;
    margin: 20px 0;
}

blockquote p {
    margin: 0;
}

.info-panel {
    background-color: #2C2C2C;
    border-left: 4px solid #A68AF9;
    padding: 20px;
    margin: 20px 0;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.info-icon {
    width: 24px;
    height: 24px;
}

.info-content p {
    margin: 0;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #3C3C3C;
  border-radius: 4px;
}

/* --- Content Visibility Styles --- */
.mobile-only { display: none; }
.desktop-only { display: block; }


/* --- Responsive Styles --- */

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.is-open {
    display: block;
}


@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 300px; /* Adjusted width for mobile */
        transform: translateX(-100%);
        z-index: 1000;
        padding-top: 60px; /* Space for a close button or header */
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .hamburger-menu {
        display: block;
        z-index: 1001;
    }

    .main-header nav {
       overflow-x: auto;
    }

    .main-header nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar for cleaner look */
    }

    .main-header nav ul {
        white-space: nowrap;
    }

    .mobile-only { display: block; }
    .desktop-only { display: none; }
}

/* Pagefind UI Customization */
#search {
    --pagefind-ui-text: #BFBFBF;
    --pagefind-ui-primary-color: #A68AF9; /* Optional: Adjust primary color to match links */
    --pagefind-ui-title-color: #FFFFFF; /* Optional: Make titles stand out a bit more */
}
