/* Base styles */
:root {
  --border-color: #ccc;
  --subtle-text: #aaa;
}

body {
  margin: 0;
  font-family: 'Albert Sans', sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: black;
  text-decoration: underline;
}

.content {
  margin-left: 350px;
  padding: 4rem 6rem;
  max-width: 100%;
  box-sizing: border-box;
  height: auto;
  /* ← Remove 100vh */
  overflow-y: visible;
  /* ← Allow page scroll, not internal scroll */
}


.blur-bar {
  display: none;
}

/* Sidebar */
.sidebar {
  width: 280px;
  height: 100vh;
  /* Take full height */
  padding: 5rem 3rem 8rem 3.5rem;
  border-right: 1px solid #eee;
  background: white;
  position: fixed;
  /* This makes it "still" */
  top: 0;
  left: 0;
  overflow: hidden;
  /* Prevent scrolling */
  z-index: 1;
}


.sidebar h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.1rem;
}

.sidebar .tagline {
  font-size: 0.95rem;
  color: #aaa;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin-top: 5rem;

}

.sidebar li {
  margin-bottom: 0.4rem;
}

.sidebar a {
  color: black;
  text-decoration: none;
  position: relative;
  font-size: 1.25rem;
}

.sidebar a.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  /* Adjust as needed */
  width: 100%;
  height: 2px;
  background-color: black;
}



/* Main Content */
.content {
  margin-left: 350px;
  /* Shift content right of fixed sidebar */
  padding: 4rem 17rem;
  max-width: 100%;
  overflow-y: auto;
  height: 100vh;
  box-sizing: border-box;
}


.content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.content p {
  margin-bottom: 1.5rem;
}

.content ul {
  padding-left: 1.2rem;
  margin-bottom: 2rem;
}

.content li {
  margin-bottom: 0.6rem;
}

.content img {
  max-width: 100%;
  height: auto;
  margin-top: 1.5rem;
}

/* Hamburger button */
.hamburger {
  display: none;
  width: 28px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 11001;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: black;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger to Cross animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}


.content ::selection {
  background: black;
  color: white;
}

body.dark .content ::selection {
  background: #0891b2;
  color: #0d1117;
}

/* Blog Content Wrap Fix */
#post-content-area {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

#post-content-area pre,
#post-content-area code {
  white-space: pre-wrap;
  word-break: break-all;
}

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-meta-date {
  font-size: 0.85rem;
  color: #666;
}

body.dark .blog-meta-date {
  color: #888;
}

.blog-list a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.blog-list a:hover {
  text-decoration: underline;
}


/* CSS FOR THEME SWITCH */
/* Theme Toggle Button */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 40px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10000;
  color: #000;
  transition: transform 0.2s, color 0.3s;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

body.dark #theme-toggle {
  color: #f0f0f0;
}


/* Dark Mode Styles */
body.dark {
  background: #0d1117;
  color: #f0f0f0;
  --border-color: #242931;
  --subtle-text: #8b949e;
}

body.dark a {
  color: #4493ea;
}

body.dark .sidebar {
  background: #010409;
  border-right: 1px solid #242931;
}

body.dark .sidebar a {
  color: #f0f0f0;
}

body.dark .sidebar a.active::after {
  background-color: #f0f0f0;
}

body.dark .hamburger span {
  background-color: #f0f0f0;
}

body.dark #theme-toggle {
  color: #f0f0f0;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 10010;
  /* Above everything else */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark mode */
body.dark .top-bar {
  background: rgba(13, 17, 23, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Adjust icons inside */
.top-bar #theme-toggle {
  margin-right: 1rem;
  font-size: 1.4rem;
  color: inherit;
}

.top-bar .hamburger {
  margin-left: 0.5rem;
  z-index: 10011;
}

/* Mobile styles */
@media (max-width: 1000px) {
  .container {
    flex-direction: column;
  }

  .hamburger {
    display: flex;
  }

  #theme-toggle {
    position: fixed;
    top: 17px;
    right: 100px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
    color: #000;
    transition: transform 0.2s, color 0.3s;
  }

  .content {
    padding-top: 80px;
    /* Give space below blurred top-bar */
  }


  .sidebar {
    position: fixed;
    top: 0;
    left: -140vw;
    /* Start off-screen */
    width: 100vw;
    /* Full screen width */
    height: 100vh;
    background: #fff;
    padding: 3rem 2rem 2rem 2rem;
    box-shadow: none;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 11000;
    /* High z-index to overlay */
    border-right: none;
  }


  .sidebar.active {
    left: 0;
    /* Slide in full screen */
  }

  .sidebar h1 {
    font-size: 1.2rem;
  }

  .sidebar .tagline {
    font-size: 1rem;
  }

  .sidebar ul {
    margin-top: 3rem;
  }

  .sidebar li {
    margin-bottom: 1rem;
  }

  .content {
    margin-left: 0px;
    /* Shift content right of fixed sidebar */
    padding: 5rem 4rem;
    max-width: 100%;
    overflow-y: auto;
    height: 100vh;
    box-sizing: border-box;
  }


  .content h1 {
    font-size: 1.5rem;
  }

  .content h2 {
    font-size: 1.2rem;
  }

  .content h3 {
    font-size: 1rem;
  }

  /* Blurred header behind buttons */
  .blur-bar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    /* Soft fade at bottom edge */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  }

  /* Hide footer date on mobile */
  .footer-date {
    display: none;
  }

  body.dark .blur-bar {
    background: rgba(13, 17, 23, 0.6);
  }

}