/* === Base Styling === */
html {
  background-color: #181a1b;
  padding: 10px;
}

body {
  background-color: #181a1b;
  border: 4px solid #4e1c61;
  box-sizing: border-box;
  color: #ffffff;
  font-family: Geneva, Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem;
  /* min-height: 100vh; */
}


img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* === Typography === */
p, center, main, small {
  font-family: Geneva, Arial, Helvetica, sans-serif;
}

small {
  color: #888888;
  font-size: 12px;
}

a {
  color: #3391ff;
  text-decoration: underline;
}

a:hover,
.nav-bar a:hover,
.blog-footer a:hover,
.pagination a:hover {
  color: #666666;
}

/* === Header & Frame === */
/* .site-frame { */
/*   border: 4px solid #4e1c61; */
/*   padding: 1rem; */
/*   margin: 1rem auto; */
/*   max-width: 740px; */
/*   box-sizing: border-box; */
/*   background-color: #181a1b; */
/* } */

.site-frame img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.blog-header, .blog-footer {
  max-width: 700px;
  margin: 0 auto;
  background-color: #222;
  padding: 1rem;
  font-size: 14px;
  color: #c7c7c7;
  line-height: 1.6;
  border: 1px solid #444;
  outline: 1px solid #333;
  outline-offset: 3px;
}

.blog-footer {
  margin-top: 1rem;
}

.blog-footer a {
  color: #3391ff;
}

/* === Top/Bottom Header Rows === */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  position: relative;
}


.bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;  /* ADD THIS */
}

.top-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 40px;
  transform: translateY(-50%);
  z-index: 0;
  background:
    linear-gradient(to right,
      #4e1c61 0,
      #4e1c61 calc(70% - 10px),
      transparent calc(70% - 10px),
      transparent calc(70% + 10px),
      #4e1c61 calc(70% + 10px),
      #4e1c61 100%) 0 0 / 100% 20px no-repeat,
    linear-gradient(to right,
      red 0,
      red calc(70% - 10px),
      transparent calc(70% - 10px),
      transparent calc(70% + 10px),
      red calc(70% + 10px),
      red 100%) 0 17px / 100% 6px no-repeat,
    linear-gradient(to right,
      #4e1c61 0,
      #4e1c61 calc(70% - 10px),
      transparent calc(70% - 10px),
      transparent calc(70% + 10px),
      #4e1c61 calc(70% + 10px),
      #4e1c61 100%) 0 25px / 100% 8px no-repeat;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 1em;
}

/* === Title === */
.site-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;
  white-space: nowrap;
  margin: 0;
  padding-top: 0.25rem;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px #4169E1;
  user-select: none;
  position: relative;
  top: -2px;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
}

.site-title a:hover {
    color: #ff0000;
}

/* === Nav Bar === */
.nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 13px;
  font-family: Geneva, Arial, Helvetica, sans-serif;
}

.nav-left {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-left a {
  color: #3391ff;
  text-decoration: underline;
  white-space: nowrap;
  padding: 0 0.2rem;
}

@media (max-width: 600px) {
  .nav-bar {
    gap: 0.3rem;
  }
  .nav-left {
    gap: 0.5rem;
  }
}
.nav-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 0.4rem;
  font-size: 13px;
  font-family: Geneva, Arial, Helvetica, sans-serif;
  width: 100%;
}

.nav-left {
  display: flex;
  gap: 0.4rem;
  flex-grow: 1;    
  min-width: 0;    
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 1rem;
}

.nav-left a,
.nav-right a {
  margin-right: 0;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .nav-bar {
    flex-wrap: wrap; 
  }

  .nav-left {
    flex: 1 1 100%;  
  }

  .nav-right {
    flex: 1 1 100%;
    justify-content: flex-end;
    gap: 1rem;
  }
}


.feed-link {
  margin-left: auto;
  white-space: nowrap;
}

/* === Pagination === */
.pagination a {
  background-color: #333;
  color: #ffffff;
  text-decoration: none;
  padding: 0.2em 0.4em;
  font-size: 13px;
  font-family: Geneva, Arial, Helvetica, sans-serif;
}

/* === Post Item === */
.post-item {
  position: relative;
  margin-bottom: 1.5rem;
  font-size: 14px;
  line-height: 1.6;
  padding-left: 1.5rem;
  color: #ddd;
  font-family: Geneva, Arial, Helvetica, sans-serif;
  border-left: 3px solid #4e1c61;
}

.post-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background-color: red;
}

.post-item small {
  color: #888888;
  font-weight: bold;
  font-size: 12px;
}

.post-item a {
  color: #3391ff;
  text-decoration: underline;
  font-weight: 600;
}

.post-item a:hover {
  color: #666666;
}

/* === Tag Item  === */
.tag-item {
  color: #3391ff;
  text-decoration: underline;
  white-space: nowrap;
  padding: 0 0.2rem;
  font-size: 14px;
  display: inline-block;
}

/* === Code / Quotes === */
.code-quote {
  background-color: #222;
  color: #ccc;
  border-left: 3px solid #ff0000;
  padding: 0.75em 1em;
  margin: 1em 0;
  font-size: 14px;
  line-height: 1.6;
}

.org-src-container {
  margin: 1em 0;
  border-left: 4px solid #888888;
  background-color: #2a2c2d;
  font-size: 13px;
  overflow-x: auto;
}

.org-src-container pre {
  margin: 0;
  padding: 1em;
  background: transparent;
  color: #ffffff;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* === Spoilers === */
.spoiler {
  background-color: #2a2c2d;
  color: transparent;
  border: 1px dashed #888888;
  padding: 0.2em 0.4em;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s, background-color 0.2s;
}

.spoiler:hover {
  color: #ffffff;
  background-color: #444;
}

.right-lambda {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px #4169E1;
  user-select: none;
  white-space: nowrap;
}

.right-lambda a {
  color: #fff;
  text-decoration: none;
}

.right-lambda a:hover {
  color: #ff0000;
}

.left-group, .right-lambda {
  position: relative;
  z-index: 1;
}
