:root {
    --bg: #f0f2f5;
    --text: #1a1a1a;
    --link: #0077b6;
    --sidebar-bg: #ffffff;
    --border-color: #e0e0e0;
    --accent: #0070f3;
}

body.dark {
    --bg: #121212;
    --text: #f5f5f5;
    --link: #90cdf4;
    --sidebar-bg: #1e1e1e;
    --border-color: #333333;
    --accent: #bb86fc;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

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

.layout {
    display: flex;
    max-width: 100%;
}

/* Fixed sidebar on the left */
.sidebar {
    width: 270px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: var(--sidebar-bg);
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* distribute inner and toggle */
    border-right: 1px solid var(--border-color);
    z-index: 1000;
}


.sidebar h2 {
    margin: 0.5rem 0;
    font-size: 1.4rem;
    text-align: left;
}

.sidebar p, .sidebar a {
    font-size: 0.9rem;
    margin: 0.4rem 0;
    color: var(--text);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.sidebar a:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-right: 8px;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    align-items: left;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: left;
    position: relative;
}

.profile-pic {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.home-link {
  text-decoration: none;
  color: var(--text-color);
  font-size: 24px;
  font-weight: bold;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
}




.theme-toggle:hover {
    background-color: #005bb5;
}


#themeToggle {
    padding: 0.5rem 1.2rem;
    border: none;
    background-color: var(--accent);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}


.content {
    padding: 2rem 3rem;
    margin-left: 430px; /* sidebar width */
    max-width: 70%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: var(--bg);
    box-sizing: border-box;
}



.post-card {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.post-card h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text);
}

.post-date {
    font-size: 0.85rem;
    color: gray;
    margin: 0.25rem 0 1rem;
}

.post-snippet {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    color: var(--accent);
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--link);
}

.post-content {
    line-height: 1.7;
    margin-top: 1rem;
}






.home-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.post-author {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.author-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.author-role {
    font-size: 0.75rem;
    color: gray;
}
.menu-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        padding: 2rem 1rem;
        max-width: 100%;
    }

}

.post-filter-dropdown {
  position: relative;
  display: inline-block;
  margin-top: 0px;
}

.dropdown-toggle {
  padding: 8px 14px;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 8px;
  background-color: var(--bg-color, #fff);
  color: var(--text-color, #000);
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 999;
  background-color: var(--bg-color, #fff);
  color: var(--text-color, #000);
  border: 1px solid var(--border-color, #ccc);
  border-radius: 8px;
  list-style: none;
  padding: 4px 0;
  margin: 6px 0 0 0;
  min-width: 160px;
  max-width: 100%;
  width: auto;
  display: none;
}

.dropdown-menu li {
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-menu li:hover {
  background-color: var(--hover-bg, #f0f0f0);
}

/* Show menu when active */
.post-filter-dropdown.open .dropdown-menu {
  display: block;
}


