/* ============================
   Blog Page Styles
   ============================ */

.page-wrapper.blog-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  z-index: 12;
}

h1#typed-title {
  color: var(--soft-green);
  text-shadow: 0 0 1px var(--soft-green);
}

#blog-container {
  width: 100%;
  min-width: 0;
  max-width: 750px;
  margin: -1em auto;
  padding: 1em;
  background-color: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  color: var(--neon-green);
  font-family: "Courier New", Courier, monospace;
  z-index: 12;
  border-radius: 6px;
}

#blog-container:hover {
  box-shadow: 0 0 15px var(--neon-green);
}

.layout-spacer {
  flex-grow: 1;
}

.content {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  color: #ccc;
  margin-top: 0.5em;
  line-height: 1.6;
}

.content p a {
  display: inline-block;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.2em;
  padding: 0.3em 0.6em;
  margin: 0.2em 0.4em;
  color: #0ff;
  background-color: rgba(0, 255, 255, 0.1);
  border: 1px solid #0ff;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.content p a:hover {
  background-color: #0ff;
  color: black;
  box-shadow: 0 0 6px #0ff;
  text-shadow: 0 0 3px #0ff;
  text-decoration: underline;
}

.blog-card {
  background-color: transparent;
  border: 2px solid var(--neon-green);
  border-radius: 6px;
  padding: 1em;
  margin: 1em 0;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 0 10px var(--neon-green);
  transition: transform 0.25s ease-in-out;
  z-index: 20;
}

.blog-card:hover {
  transform: scale(1.1);
  background-color: black;
  box-shadow: 0 0 25px var(--soft-green);
  z-index: 250;
}

.blog-title {
  font-family: "Courier New", Courier, monospace;
  font-size: 1.5em;
  color: var(--soft-green);
  margin-bottom: 0.5em;
}

h2.blog-title {
  margin-top: 0.5em; /* Try 0.25em for tighter spacing */
  padding-top: 0; /* Only needed if padding is contributing */
}

/* Blog specific styles */
.toggle {
  display: block;
  margin: 0.3em 0;
  padding: 0.3em 0.6em;
  font-size: 0.85em;
  background-color: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  text-align: left;
  font-family: "Courier New", Courier, monospace;
  cursor: pointer;
}

.toggle:hover {
  background-color: var(--neon-green);
  color: black;
  box-shadow: 0 0 6px var(--neon-green);
}

.tag-info {
  margin: 1em 0;
  padding: 0.5em 1em;
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--neon-green);
  font-family: "Courier New", Courier, monospace;
  border-left: 4px solid var(--neon-green);
}

.blog-global-buttons-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2em;
  z-index: 9;
}

/* Tag index styles */
#tag-index {
  margin-top: 4rem;
  margin-right: 10rem;
  width: 180px;
  flex-shrink: 0;
  background-color: rgba(0, 0, 0, 0.75);
  border-left: 2px solid var(--neon-green);
  padding: 1rem;
  padding-top: 0;
  font-family: "Courier New", Courier, monospace;
  z-index: 8;
}

.tag-index-button {
  display: block;
  margin: 0.3em 0;
  padding: 0.3em 0.6em;
  font-size: 0.85em;
  background-color: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  text-align: left;
  font-family: "Courier New", Courier, monospace;
  cursor: pointer;
}

.tag-index-button:hover {
  background-color: var(--neon-green);
  color: black;
  box-shadow: 0 0 6px var(--neon-green);
}

#blog-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Blog page specific nav button styles */
#pagination-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: center;
  margin: 2em auto 0 auto;
  gap: 0.5em;
  padding: 0 1em;
  max-width: 100%;
  width: fit-content;
  z-index: 9;
}

.blog-mode #pagination-nav .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.3em 0.3em;
  font-size: 0.85em;
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--neon-green);
  text-decoration: none;
  transition: background-color 0.2s ease;
  box-shadow: none;
}

.blog-mode #pagination-nav .button-link:hover,
.blog-mode #pagination-nav .button-link.active {
  background-color: var(--neon-green);
  color: black;
}

.blog-mode #pagination-nav .button-link.active {
  box-shadow: 0 0 6px var(--neon-green);
}

.section h1,
h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  color: #a8f0a5;
  text-shadow: 0 0 2px var(--neon-green);
}

.tags {
  margin-bottom: 0.5em;
}

.tag {
  display: inline-block;
  margin-right: 0.5em;
  padding: 0.2em 0.5em;
  background-color: var(--neon-green);
  color: black;
  font-family: "Courier New", Courier, monospace;
  border-radius: 3px;
  cursor: pointer;
}

.tag:hover {
  background-color: black;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
}

.reset,
.collapse-all-button {
  max-width: fit-content;
  padding: 0.5em 1em;
  font-family: monospace;
  font-weight: bold;
  border: 2px solid var(--neon-green);
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--neon-green);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  z-index: 9;
}

.reset:hover {
  box-shadow: 0 0 8px var(--neon-green), 0 0 12px var(--neon-green);
}

.collapse-all-button:hover {
  box-shadow: 0 0 8px var(--neon-green), 0 0 12px var(--neon-green);
}

@media (max-width: 600px) {
  .blog-global-buttons-wrapper {
    justify-content: center;
    padding: 0 1em;
  }

  .blog-global-buttons-wrapper button {
    width: fit-content;
    max-width: 100%;
  }

  .blog-mode #pagination-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 1em;
    gap: 0.5em;
  }

  .blog-mode #pagination-nav .button-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: auto;
    max-width: none;
    font-size: 0.85em;
    padding: 0.3em 0.3em;
    margin: 0.2em;
    box-shadow: none;
  }

  #tag-index {
    display: none;
  }

  .blog-card:hover {
    transform: none;
    box-shadow: 0 0 10px var(--neon-green); /* optional: revert glow */
    background-color: transparent; /* optional: revert bg */
  }
}
