/* Global styles */
body {
  margin: 0;
  padding: 0;
  background-color:#1b1b1e;
  color: darkgray;
  font-size: 16px;
  font-family: Arial, sans-serif;
  display: grid;
  grid-template-columns: 240px 1fr 230px;
  grid-template-areas: 
      "sidebar main rightsidebar";
}

/* Sidebar styles */
.logo {
  margin-left: 45px;
  grid-area: sidebar;
  padding-top: 50px;
}

.title {
  margin-left: 50px;
  font-size: 18px;
}


.wtitle {
  margin-top: 20px;
  font-size: 25px;
  text-align: center;
}

.xtitle {
  text-align: center;
  font-size: 17px;
}

.logo h1 {
  margin: 0;
  font-size: 1rem;
  color: darkkhaki;
}

.logo-image {
  height: 125px;
  width: 125px;
  border-radius: 100%;
  object-fit: cover;
}

.fa {
  height: 45px;
  width: 45px;
  border-radius: 100%;
  object-fit: cover;
}

/* Left Sidebar styles */
.one {
  grid-area: sidebar;
  position: fixed;
  display:flex;
  flex-direction: column;
  width: 230px;
  height: 100vh;
  overflow-y: auto;
  background-color: #222225;
}

/* Right Sidebar styles */
.right-sidebar {
  grid-area: right-sidebar;
  position: fixed;
  right: 0;
  top: 0;
  width: 210px;
  height: 100%;
  background-color: #222225;
  color: #d1d1d1;
  padding: 20px;
  overflow-y: auto;
}

.right-sidebar h3 {
  color: darkkhaki;
  font-size: 16px;
  text-align: center;
}

.right-sidebar .tag {
  display: inline-block;
  padding: 8px;
  margin-bottom: 10px;
  background-color: #723d46;
  color: #d1d1d1;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.right-sidebar .tag:hover {
  background-color: #555;
}

/* Footer styles */
.sidebar-footer {
  margin-top: auto;
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px;
  text-align: center;
  background-color: #f8f9fa; /* Match the sidebar background */
}

/* Main content styles */
main {
  grid-area: main;
  margin-left: 20px;
  margin-right: 100px;
}

.content {
  max-width: 95%;
}

/* Navigation styles */
.navtitle:hover {
  color: #323232;
}

.navbar {
  margin-left: -20px;
  flex-grow: 1;
}

.navtitle {
  display: block;
  padding: 10px 15px;
  margin-bottom: 15px;
  background-color: #723d46;
  color: #d1d1d1;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;

}

.title-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.date {
  font-size: 14px;
  color: #888;
}

@media screen and (max-width: 1024px) and (min-width: 600px) {
  body{
  grid-template-columns: 240px 1fr;
  }
  .right-sidebar {
display: none;
  }
  .writeup-container{
    max-width: 100%;
  }
}

/* Media query for smaller screens */
@media (max-width: 767px) {
  body {
    display: block;
    font-size: 12px;
  }

  .one {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 0;
  }

  .one {
    grid-area: sidebar;
    position: relative;
    width: 100%;
    height: auto;
    overflow-y: auto;
    background-color: #222225;
  }

  .logo {
    padding: 10px 0;
  }

  .logo-image {
    height: 100px;
    width: 100px;
  }

  .title {
    font-size: 16px;
    margin-top: 10px;
  }

  .navbar {
    width: 100%;
    text-align: center;
  }

  main {
    margin-left: 0;
    width: 100%;
    padding: 20px 10px;
  }

  .content {
    margin: 0 auto;
    max-width: 100%;
  }

  .sidebar-footer {
    position: static; /* Removes footer from bottom fixed position */
    margin-top: 0; /* Ensures no extra space above footer */
    padding-top: 0; /* Removes padding at the top */
  }

  .right-sidebar{
    display: none;
  }
}

/* Writeup styles */
.writeup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
}

.writeup-box {
  width: calc(95%);
  padding: 20px;
  background-color: aliceblue;
  margin: 10px auto;
  color: #323232;
  border: 1px solid #bdb4b4;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-sizing: border-box;
}

.writeup-box a {
  text-decoration: none;
  color: dodgerblue;
  font-size: 18px;
  font-weight: bold;
}

.writeup-box a:hover {
  color: #323232;
  text-decoration: underline;
}

.writeup-box p {
  margin: 10px 0;
  font-size: 16px;
}

.markdown-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.markdown-content pre {
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid #bdb4b4;
  padding: 10px;
  border-radius: 5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
}

.zoom-image {
  cursor: pointer;
  transition: transform 0.3s ease;
}
.zoom-image:active {
  transform: scale(2); /* Adjust scale factor as needed */
}