:root{
  --bg-dark: #0b0b0d;
  --slab: #111113;
  --text: #f2f2f2;
  --muted: #b5b5b5;
  --red: #b11226;

  --content-max: 700px;
  --frame-pad: 2rem;
}

/* =========================================================
   TYPOGRAPHY: Special Elite + hierarchy
   ========================================================= */

body,
h1, h2, h3, h4, h5, h6{
  font-family: "Special Elite", cursive;
  text-rendering: optimizeLegibility;
}

p, li, blockquote, ol, ul, dl, dd{
  font-family: "Special Elite", cursive;
}

code, pre{
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Hierarchy */
h1{ font-size: 2.8rem; }
h2{ font-size: 2.4rem; }
h3{ font-size: 2rem; }

p, li{
  font-size: 1rem;
  line-height: 1.63;
}

/* =========================================================
   GLOBAL BACKGROUND
   ========================================================= */

body{
  margin: 0;
  background-image: url("/assets/images/bg-checker.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
}

/* Layout wrapper */
.page-content{
  padding: 0;
}

/* =========================================================
   SOLID CENTER COLUMN
   ========================================================= */

.frame{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--frame-pad);
  background: var(--slab);
  border-radius: 12px;
  min-height: 100vh;
  box-sizing: border-box;

  /* anchors overlay + back button */
  position: relative;
  overflow: hidden;
}

@media (max-width: 700px){
  .frame{
    padding: 1.5rem;
    border-radius: 0;
    min-height: auto;
  }
}

/* =========================================================
   INTRO SLAB
   ========================================================= */

.landing-wrap{
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.archive-slab{
  width: 100%;
  background: var(--slab);
  border-left: 4px solid var(--red);
  padding: 3rem 2.5rem;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
}

@media (max-width: 700px){
  .archive-slab{
    border-left: none;
    border-bottom: 4px solid var(--red);
    padding: 2.2rem 1.5rem;
    border-radius: 10px;
  }
}

/* Intro text */
.site-title{
  font-size: 2.6rem;
  margin: 0 0 1rem 0;
}

.site-sub{
  color: var(--muted);
  margin-bottom: 2rem;
}

/* Button */
.enter-button{
  display: inline-block;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--red);
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
}

.enter-button:hover{
  background: var(--red);
}

/* =========================================================
   INTRO MEMES
   ========================================================= */

.meme-row{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.meme-row--top{
  margin-bottom: 1.2rem;
}

.meme-row--bottom{
  margin-top: 1.6rem;
}

.meme{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  position: relative;
}

/* Smaller icon accent */
.meme--d{
  max-width: 190px;
  justify-self: start;
}

/* “Pinned scrapbook” offsets — tweak freely */
.meme--a{ top: -6px; left: -4px; transform: rotate(-1.2deg); }
.meme--b{ top:  4px; left:  2px; transform: rotate(0.9deg); }
.meme--c{ top:  3px; left: -3px; transform: rotate(-0.7deg); }
.meme--d{ top: 10px; left:  8px; transform: rotate(1.4deg); }

@media (min-width: 780px){
  .meme-row{ gap: 16px; }
  .meme-row--top{ margin-bottom: 1.4rem; }
  .meme-row--bottom{ margin-top: 1.8rem; }
}

@media (max-width: 420px){
  .meme--d{ max-width: 150px; }
}

/* =========================================================
   LINK OVERRIDES
   ========================================================= */

a,
a:visited,
.site-title,
.site-title:visited,
.post-link,
.post-link:visited,
.page-link,
.page-link:visited{
  color: var(--red) !important;
  text-decoration: none;
}

a:hover,
a:focus,
.post-link:hover,
.page-link:hover{
  color: #ff2a3d !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   FRAME OVERLAY (behind content, inside the charcoal column)
   ========================================================= */

.frame > *{
  position: relative;
  z-index: 2; /* ensures content sits above overlay */
}

.frame::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background-image: url("/assets/images/overlays/red-tribal-overlay.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  opacity: 0.18;
  mix-blend-mode: screen;
}

/* =========================================================
   PLAYER SHELL
   ========================================================= */

.player{
  margin: 1.5rem 0 2rem;
  padding: 0.6rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
}

/* =========================================================
   NAV BACK (fire exit)
   ========================================================= */

.nav-back-img{
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 10; /* above content, below modal */
}

.nav-back-img img{
  width: 88px;
  height: auto;
  display: block;
  opacity: 0.9;
  transition: transform 140ms ease, opacity 140ms ease, filter 140ms ease;
}

.nav-back-img:hover img{
  opacity: 1;
  transform: translateX(-4px);
  filter: drop-shadow(0 0 6px rgba(255,0,0,0.6));
}

/* Hide on home if your theme uses body.home */
body.home .nav-back-img{
  display: none;
}

@media (max-width: 700px){
  .nav-back-img{
    top: 0.9rem;
    right: 0.9rem;
  }

  .nav-back-img img{
    width: 64px;
  }
}

/* =========================================================
   MODAL (matches albums.html + album-wall.js)
   ========================================================= */

/* The overlay container */
#albumModal.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999; /* absolutely above the wall + frame */
}

/* When JS adds .is-open */
#albumModal.modal.is-open{
  display: block;
}

/* Backdrop */
#albumModal .modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

/* Panel */
#albumModal .modal-panel{
  position: relative;
  width: min(900px, calc(100vw - 28px));
  margin: 6vh auto;
  background: var(--slab);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
  padding: 1.2rem;

  /* mobile accessibility: allow scrolling inside the panel */
  max-height: calc(100vh - 12vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Close button */
#albumModal .modal-close{
  position: sticky; /* stays reachable while scrolling */
  top: 0;
  float: right;
  margin: -0.2rem -0.2rem 0 0;

  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.9;
}

#albumModal .modal-close:hover{ opacity: 1; }

/* Body layout */
#albumModal .modal-body{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.2rem;
  align-items: start;
}

/* Cover sizing */
#albumModal #albumCover{
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

/* Spotify area */
#albumModal .spotify-player{
  margin-top: 0.8rem;
}

#albumModal #albumPlayer{
  border: 0;
  border-radius: 12px;
  display: block;
  width: 100%;
}

/* Mobile polish */
@media (max-width: 860px){
  #albumModal .modal-panel{
    margin: 2vh auto;
    max-height: calc(100vh - 4vh);
  }

  #albumModal .modal-body{
    grid-template-columns: 1fr;
  }

  #albumModal #albumCover{
    max-width: 420px;
    justify-self: center;
  }
}

/* ===== Subjects Grid – clean final version ===== */

.subject-grid{
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin: 0 auto;
  padding: 0;
  justify-items: center;   /* centers tiles inside grid cells */
}

@media (min-width: 1000px){
  .subject-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 4 across on desktop */
  }
}

.subject-tile{
  display: block;
  text-decoration: none;
  width: 100%;
  max-width: 300px;  /* prevents absurd stretching */
}

.subject-tile img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.subject-tile .label{
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
}

.wide {
  max-width: 90%;
}


/* === Meme side rails === */

.side {
  position: absolute;
  top: 0;
  width: 260px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 60px;
  pointer-events: none;
  z-index: 0;
}

.side.left { left: 0; }
.side.right { right: 0; }

.side img {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}

/* Keep main content above */
.page-content {
  position: relative;
  z-index: 1;
}

/* === Mobile safety: disable meme rails === */
@media (max-width: 900px) {
  .side { display: none !important; }
}


/* Push main content inward to make space for side columns */
.content {
  margin: 0 200px;
}

/* Hide side memes on the intro (home) page */
body.home .side {
  display: none !important;
}

/* ===== Gallery Slideshow ===== */

/* Push it down so it never fights the fire-exit back button */
.gallery-slideshow{
  margin-top: 110px;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 12px;
  align-items: center;
}

.gallery-viewport{
  position: relative;
  height: min(70vh, 520px);
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  overflow: hidden;
}

/* Only one visible at a time */
.gallery-slide{
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
  text-decoration: none;
}

.gallery-slide.is-active{
  display: flex;
}

/* Fit image INSIDE the viewport (no cropping) */
.gallery-slide img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

/* Controls */
.gallery-btn{
  height: 56px;
  width: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.gallery-btn:hover{
  background: rgba(0,0,0,0.55);
}

/* Mobile: keep it comfy */
@media (max-width: 700px){
  .gallery-slideshow{ margin-top: 90px; grid-template-columns: 48px 1fr 48px; }
  .gallery-btn{ height: 48px; width: 48px; border-radius: 12px; }
  .gallery-viewport{ height: min(60vh, 420px); }
}



