/* Stuck in a Woman -- ported from the original site's css/style.css.

   Colours, wallpaper and fonts come from /assets/theme.css (this template's
   tokens plus the site's overrides). Dark mode swaps in the dark.* tokens, the
   same way the old site's prefers-color-scheme block did. Font files and the
   wallpaper images are site static files (/fonts, /img), not part of the
   template package. */

@font-face {
  font-family: "Mystery Quest";
  src: url("../fonts/mystery-quest.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Just enough Font Awesome for the icons the posts use. */
@font-face {
  font-family: "FontAwesome";
  src: url("../fonts/fontawesome-webfont.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; }
.fa-reddit:before { content: "\f1a1"; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: var(--dark-color-bg);
    --color-text: var(--dark-color-text);
    --color-menu: var(--dark-color-menu);
    --color-box: var(--dark-color-box);
    --color-border: var(--dark-color-border);
    --wallpaper-url: var(--dark-wallpaper-url);
  }
}
:root[data-theme="dark"] {
  --color-bg: var(--dark-color-bg);
  --color-text: var(--dark-color-text);
  --color-menu: var(--dark-color-menu);
  --color-box: var(--dark-color-box);
  --color-border: var(--dark-color-border);
  --wallpaper-url: var(--dark-wallpaper-url);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  background-image: var(--wallpaper-url);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  font-family: var(--font-body);
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

a { color: inherit; }

.masthead {
  position: relative;
  width: 100%;
  text-align: left;
  margin-bottom: 20px;
  font-family: var(--font-title);
  font-weight: 400;
  font-style: normal;
  font-size: 36pt;
}
.masthead h1 { font-size: inherit; font-weight: 400; }
.masthead h1 a { text-decoration: none; }
#headerblurb { font-size: 0.5em; }

button, .tag-button {
  border-radius: 25px;
  border: 2px solid #000000;
  cursor: pointer;
  padding: 3px;
  background: #efefef;
  color: #000;
  font: inherit;
  font-size: 0.85em;
  text-decoration: none;
  display: inline-block;
  margin: 2px 0;
}

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

.container {
  display: flex;
  width: 100%;
  max-width: 100%;
  background: var(--color-box);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.menu {
  width: 200px;
  flex-shrink: 0;
  background: var(--color-menu);
  padding: 20px;
}
.menu ul { list-style: none; }
.menu ul li a {
  display: block;
  padding: 10px;
  text-decoration: none;
}
.menu ul li a:hover { background: rgba(0, 0, 0, 0.1); }
.menu ul li a[aria-current="page"] { font-weight: bold; }

#searchTitle {
  width: 100%;
  padding: 5px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#menu-toggle {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 1000;
  color: var(--color-text);
}

.content {
  flex: 1;
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 300px;
}

#mainarticle, .intro, #articles, .prevnext { width: 100%; }
#mainarticle { line-height: 1.4; }
.intro { margin-bottom: 20px; }
.articleTitle { margin-bottom: 10px; }
figure.image { margin: 0 0 10px; }
figure.image img { cursor: pointer; }

/* ---- the home grid */
#grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  max-width: 1000px;
  width: 100%;
  margin: auto;
}
.grid-item {
  cursor: pointer;
  padding: 10px;
  border: 1px solid var(--color-border);
  text-align: center;
  background: var(--color-box);
  color: var(--color-text);
  text-decoration: none;
  display: block;
}
.grid-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}
@media (max-width: 768px) {
  #grid-container { grid-template-columns: 1fr; }
}

/* ---- Full Postings */
.article-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin: 0 auto 15px;
  max-width: 800px;
  text-align: left;
}
/* The link is the flex item, not the img: without a fixed basis it shrinks by
   however much each row's text pushes it, and no two thumbnails match. */
.article-thumb { flex: 0 0 200px; }
.article-item img {
  display: block;
  width: 200px;
  height: auto;
}
.article-text { flex-grow: 1; }
.article-text a { text-decoration: none; }
.article-date { font-size: smaller; }
.article-text p { margin: 0.6em 0 0.4em; }
#articles hr { margin: 0 auto 15px; max-width: 800px; }
/* The tag list sits under the postings as plain links, not a wall of buttons. */
.tag-index { margin: 10px auto 15px; max-width: 800px; font-size: 0.85em; }
.tag-index h3 { font-size: 1em; margin: 0 0 0.4em; }
.tag-index p { margin: 0; line-height: 1.8; }
.tag-index a { text-decoration: none; margin-right: 0.9em; white-space: nowrap; }
.tag-index a:hover { text-decoration: underline; }
.tag-index span { opacity: 0.7; }

/* ---- prev / next */
.prevnext {
  padding-top: 20px;
  text-align: center;
}
.prevnext hr { margin-bottom: 20px; }
.prevnext a { text-decoration: none; }

/* Filtering (search box) hides with this rather than display:none inline. */
[data-stuck-hidden] { display: none !important; }

/* ---- the slideshow overlay (assets/stuck.js) */
.stuck-slideshow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  touch-action: pan-y;
}
.stuck-slideshow img {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  object-fit: contain;
  transition: opacity 0.2s;
}
.stuck-slideshow .stuck-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 1100;
  transition: opacity 0.5s;
}
.stuck-slideshow .stuck-buttons button {
  font-size: 18px;
  min-width: 36px;
  min-height: 36px;
}
.stuck-slideshow .stuck-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px 14px;
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  transition: opacity 0.5s;
  pointer-events: none;
}
.stuck-slideshow.is-idle .stuck-buttons,
.stuck-slideshow.is-idle .stuck-caption { opacity: 0; }

/* ---- small screens: the sidebar becomes a drop-down behind the ☰ button */
@media (max-width: 600px) {
  .container { flex-direction: column; }
  .menu { width: 100%; }
  /* Only collapse when the script is there to open it again. */
  .js .menu {
    position: absolute;
    top: 60px;
    left: 0;
    padding: 15px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    visibility: hidden;
    opacity: 0;
    z-index: 999;
  }
  .js .menu.active {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }
  .article-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .article-thumb { flex: none; width: 100%; }
  .article-item img { width: 100%; }
  .article-text { text-align: left; }
}
