/* ============================================================
   GRiM.COM — shared site styles
   Retro/Y2K guestbook energy, polished with one consistent
   palette + font system. Edit the tokens in :root to retheme
   everything at once.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Audiowide&family=Caveat+Brush&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* palette */
  --bg-deep:    #170a2e;
  --bg-mid:     #2c1257;
  --purple:     #9b6bd6;
  --purple-hi:  #c9a3ff;
  --gold:       #f5c518;
  --gold-soft:  #f0d98a;
  --cyan:       #3be6ef;
  --cream:      #f7ecd2;
  --ink:        #170a2e;

  --panel:      rgba(35, 16, 70, 0.72);
  --panel-solid:#23103f;
  --card:       rgba(247, 236, 210, 0.94);

  /* type */
  --font-display: 'Audiowide', 'Impact', sans-serif;
  --font-body:    'Space Grotesk', Verdana, sans-serif;
  --font-accent:  'Caveat Brush', cursive;

  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--cream);
  background-image: url('images/grim-wallpaper.png');
  background-repeat: repeat;
  background-position: top left;
  background-attachment: fixed;
  min-height: 100vh;
}

::selection { background-color: #c9a3ff66; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- shell / container ---------- */
.container {
  width: 88%;
  max-width: 1180px;
  margin: 28px auto 60px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

/* ---------- header ---------- */
#headerbar {
  width: 100%;
  padding: 22px 26px 6px;
  background: var(--panel-solid);
}

#headerbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 38pt;
  letter-spacing: 1px;
  font-style: italic;
  text-transform: uppercase;
  background: linear-gradient(120deg, var(--purple-hi), var(--gold) 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px rgba(155,107,214,0.35);
}

#headerbar .tagline {
  display: block;
  margin-top: -6px;
  font-family: var(--font-accent);
  font-size: 15pt;
  color: var(--purple-hi);
}

/* ---------- retro OS window (nav lives in its menu bar now) ---------- */
.os-window {
  background: #000;
  border-radius: 5px;
  overflow: hidden;
  box-shadow:
    inset 1px 1px 0 rgba(201,163,255,0.5),
    inset -1px -1px 0 rgba(0,0,0,0.9),
    0 14px 40px rgba(0,0,0,0.55);
  width: 100%;
}

.os-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: linear-gradient(90deg, var(--bg-mid), #0d0518);
  border-bottom: 1px solid rgba(201,163,255,0.3);
}

.os-titlebar .os-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 10.5pt;
  letter-spacing: 0.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.os-title .os-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--gold), var(--purple-hi));
}

.os-controls {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.os-controls span {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c0f33;
  border: 1px solid rgba(201,163,255,0.45);
  border-radius: 2px;
  font-size: 9px;
  color: #fff;
  line-height: 1;
}

.os-menubar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  padding: 5px 8px;
  background: #0d0518;
  border-bottom: 1px solid rgba(201,163,255,0.22);
}

.os-menubar a {
  padding: 7px 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5pt;
  color: #e8dcff;
  text-decoration: none;
  border-radius: 2px;
}

.os-menubar a:hover,
.os-menubar a.active {
  background: transparent;
  color: var(--purple-hi);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.os-body {
  background: #000;
  color: #fff;
  padding: 24px 28px;
}

.os-body h1,
.os-body h2 {
  font-family: var(--font-display);
  color: var(--gold);
  margin: 0 0 10px;
}

.os-panel { display: none; }
.os-panel.active { display: block; }

.os-body a { color: var(--cyan); }

.os-body img {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.section-divider {
  border: none;
  border-top: 1px solid rgba(201,163,255,0.3);
  margin: 18px 0;
}

.section-divider-gif {
  display: block;
  margin: 18px auto;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* ---------- ticker / marquee ---------- */
.undernav {
  position: relative;
  display: flex;
  width: 100%;
  height: 38px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

#marqueehead {
  width: 42%;
  color: var(--ink);
  font-size: 13pt;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-accent);
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

marquee {
  width: 58%;
  padding: 2px 10px;
  display: flex;
  align-items: center;
  border-top: 3px solid var(--cyan);
  border-bottom: 3px solid var(--cyan);
  box-shadow: inset rgba(0,0,0,0.6) 0px 0px 10px;
  background-color: var(--panel-solid);
  color: var(--cyan);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10.5pt;
  letter-spacing: 0.5px;
}

/* ---------- shared helpers ---------- */
.leftcolumn img,
.rightcolumn img,
.bodymain img { max-width: 100%; }

.rightcolumn,
.leftcolumnbox,
.innerbox { overflow: auto; scrollbar-width: thin; }

.bodymain,
.leftcolumn { background: var(--panel); }

/* ---------- left sidebar ---------- */
.leftcolumn {
  width: 26%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 12px;
  gap: 14px;
  font-size: 10.5pt;
  line-height: 1.5;
}

.leftcolumn h2 {
  align-self: flex-start;
  margin: 0 0 -4px;
  font-family: var(--font-display);
  font-size: 13pt;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245,197,24,0.35);
}

.leftcolumnbox ul { padding-left: 20px; margin: 6px 0; }

.leftcolumnbox {
  border: 1px solid rgba(201,163,255,0.35);
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: rgba(23,10,46,0.55);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
}

.socials {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.socials img {
  width: 36px;
  filter: drop-shadow(0 0 6px rgba(155,107,214,0.5));
}

/* ---------- slideshow ---------- */
.slideshow-wrapper {
  width: 100%;
  max-width: 560px;
  margin: 18px auto 0;
}
.slideshow-wrapper #slideshow {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(201,163,255,0.35);
}
.slideshow-wrapper .slide {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: none;
}
.slideshow-wrapper .slide:first-child { display: block; }
#dots { text-align: center; margin-top: 8px; }
#dots span {
  display: inline-block;
  margin: 0 4px;
  cursor: pointer;
  font-size: 11px;
  color: var(--purple-hi);
  font-family: var(--font-body);
  opacity: 0.6;
}
#dots span.active,
#dots span:hover { opacity: 1; color: var(--cyan); }

/* ---------- main content ---------- */
.bodymain {
  padding: 16px;
  width: 74%;
  font-size: 10.5pt;
  line-height: 1.55;
  background: transparent;
}

/* pages with no sidebar (the window is the whole show) */
.bodymain.full-width {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

/* ---------- generic content cards (blog / book review pages) ---------- */
.page-heading {
  font-family: var(--font-display);
  font-size: 22pt;
  margin: 0 0 6px;
  color: var(--gold);
}

.page-sub {
  font-family: var(--font-body);
  font-size: 11pt;
  color: var(--purple-hi);
  margin: 0 0 18px;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.entry-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 5px solid var(--purple);
  border-radius: 10px;
  padding: 16px 18px;
  color: #fff;
}

.entry-card.book { border-left-color: var(--gold); }

.entry-meta {
  font-size: 9.5pt;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--purple-hi);
  margin-bottom: 4px;
}

.entry-card.book .entry-meta { color: var(--gold-soft); }

.entry-title {
  font-family: var(--font-display);
  font-size: 14pt;
  margin: 0 0 8px;
  color: #fff;
}

.stars { color: var(--gold); letter-spacing: 2px; font-size: 13pt; }

.entry-card p { margin: 6px 0 0; color: #e8e0f5; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 8.5pt;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(155,107,214,0.35);
  color: #fff;
}

/* ---------- book reviews: cover grid + detail view ---------- */
.book-browse {
  margin-top: 6px;
}

.book-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 18px;
  padding: 4px 2px 12px;
}

.book-cover {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.book-cover:hover { transform: translateY(-4px); }

.book-cover-art {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 26px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  gap: 4px;
}

.book-cover-art.has-image {
  padding: 0;
  overflow: hidden;
  background: #000;
}

.book-cover-art.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.book-cover-title {
  font-family: var(--font-display);
  font-size: 11pt;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.book-cover-author {
  font-family: var(--font-body);
  font-size: 8.5pt;
  color: rgba(255,255,255,0.75);
}

.book-detail { display: none; }
.book-detail.active { display: block; }

.book-back {
  background: none;
  border: none;
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 10pt;
  cursor: pointer;
  padding: 0 0 14px;
}

.book-back:hover { text-decoration: underline; }

.book-detail-inner {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.book-detail-cover .book-cover-art {
  width: 190px;
  height: 280px;
}

.book-detail-text {
  flex: 1;
  min-width: 220px;
}

.book-detail-text .entry-title { margin: 2px 0 8px; }
.book-detail-text p { color: #e8e0f5; margin: 10px 0 0; }


/* ---------- blog: drop-down entries ---------- */
.entry-list { gap: 10px; }

details.entry-card { padding: 0; }

details.entry-card > summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 18px;
}

details.entry-card > summary::-webkit-details-marker { display: none; }

details.entry-card > summary::after {
  content: "\25B8";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-hi);
  transition: transform 0.15s ease;
}

details.entry-card[open] > summary::after { transform: translateY(-50%) rotate(90deg); }

details.entry-card > summary .entry-meta { margin-bottom: 2px; }
details.entry-card > summary .entry-title { margin: 0; }
details.entry-card > summary:hover .entry-title { color: var(--purple-hi); }

.entry-body {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.entry-body p { margin: 0; }

/* ---------- footer note ---------- */
.site-footer {
  width: 100%;
  padding: 14px 18px;
  text-align: center;
  font-size: 9pt;
  color: var(--purple-hi);
  background: var(--panel-solid);
}

/* ---------- responsive ---------- */
@media only screen and (max-width: 1301px) {
  .container { width: 95%; }
}

@media only screen and (max-width: 750px) {
  #headerbar { order: 1; }
  .undernav { order: 2; flex-direction: column; height: auto; }
  #marqueehead, marquee { width: 100%; }
  .bodymain { order: 3; width: 100%; }
  .site-footer { order: 5; }
  .leftcolumn { order: 4; width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .os-menubar { justify-content: center; }
}

.entry-photo { display: block; max-width: 100%; height: auto; margin: 14px 0 0; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; }
