html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Prompt", sans-serif;
}

a {
  color: #bebebe;
}

a:visited {
  color: #bebebe;
}

a:hover {
  opacity: 0.7;
}

.container a:hover {
  opacity: 1;
}

.container {
    text-align: center;
}

.container h1 {
    margin: 0 0 0px 0;
}

.container p {
    margin: 0;
}

body {
    min-height: 100vh;
    position: relative;
    isolation: isolate;


    display: flex;
    align-items: center;
    justify-content: center;


}

/* blurred background */
body::before {
    content: "";
    position: fixed;
    inset: -30px;


    background: url("/images/background.webp") center / cover no-repeat;

    filter: blur(2px) brightness(0.78);
    transform: scale(1.05);

    z-index: -2;


}

/* subtle film/grain noise */
body::after {
    content: "";
    position: fixed;
    inset: 0;


    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");

    opacity: 0.15;
    pointer-events: none;

    z-index: -1;


}

/* main glass panel */
.container {
  position: relative;
  width: 90vw;
  height: 90vh;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* panel procedural grain */
.container::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* keep content above panel grain */
.container > * {
    position: relative;
    z-index: 1;
}
/* center text thing */
.content {
  width: 90%;
  margin: 30px auto 0 auto;
  text-align: left;
  font-size: 18px;
  font-weight: 400;
  color: #efefef;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 90px; /* keeps last answer clear of the social icon bar */
}

.content h2 {
    color: #bebebe;
    font-weight: 900;
}

.content h4 {
  color: #efefef;
  font-weight: 600;
  line-height: 1.5; /* was 0.4 - this was the overlap bug */
}

.content::-webkit-scrollbar {
  width: 6px;
}
.content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
}

.socials a:hover {
  opacity: 1;
}

/* social icons */
.socials {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 20px 0 30px 0;
  flex-shrink: 0;
}

/* icon size */
.socials img {
    width: 25px;
    height: 25px;
}

/* blog layout */
.blog-layout {
  width: 90%;
  margin: 30px auto 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 20px;
  padding-bottom: 0px;
}

/* sidebar */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  overflow-y: auto;
  text-align: left;
}

.post-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  color: #efefef;
}

.post-item:hover {
  opacity: 0.7;
}

.post-title {
  font-weight: 600;
  font-size: 15px;
}

.post-date {
  font-size: 12px;
  color: #b2b2b2;
}

/* main panel */
.panel {
  flex: 1;
  overflow-y: auto;
  text-align: left;
  color: #efefef;
}

.panel h2 {
  color: #bebebe;
  font-weight: 900;
}

.panel h1 {
  color: #bebebe;
  font-weight: 900;
}

.panel p {
  color: #efefef;
  font-weight: 600;
}

.panel img {
  display: block;
  max-width: 70%;
  height: auto;
  border-radius: 16px;
  margin: 10px 0;
}

/* empty state */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #efefef;
}

.empty-state h2 {
  font-size: 28px;
  color: #bebebe;
  font-weight: 900;
  margin: 0 0 10px 0;
}

.empty-state p {
  font-size: 16px;
  font-weight: 60;
  color: #efefef;
}

/* reuse scrollbar styling for both sidebar and panel */
.sidebar::-webkit-scrollbar,
.panel::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb,
.panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

@media (max-width: 450px) {
  .sidebar {
    width: 100%;
  }

  .panel {
    display: none;
    width: 100%;
    min-width: 0;
  }

  .panel img {
    max-width: 100%;
  }

  .blog-layout {
    position: relative;
  }

  .blog-layout.post-open .sidebar {
    display: none;
  }

  .blog-layout.post-open .panel {
    display: block;
    width: 100%;
    flex: 1;
  }

  .back-button {
    display: none;

    position: absolute;
    top: -30px;
    left: 0;

    z-index: 10;

    width: 20px;
    height: 20px;

    padding: 0;
    margin: 0;

    border: 0;
    background: transparent;
    box-shadow: none;

    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;
  }

  .back-button img {
    display: block;
    width: 20px;
    height: 20px;
  }

  .blog-layout.post-open .back-button {
    display: block;
  }
}

/* completely hide the mobile back button on desktop */
@media (min-width: 451px) {
  .back-button {
    display: none !important;
    pointer-events: none;
  }
}

/* back button reset */
.back-button {
  appearance: none !important;
  -webkit-appearance: none !important;

  background: transparent !important;
  background-image: none !important;

  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  padding: 0 !important;
  margin: 0 !important;

  width: 20px !important;
  height: 20px !important;
}
