:root {
  --blue: #0000FF;
  --white: #FFFFFF;
  --pink: #FF00FF;
  --cyan: #00FFFF;
  --yellow: #FFFF00;
  --green: #00FF00;
  --red: #FF0000;
  --dark-red: #800000;
  --dark-blue: #000080;
  --grey: #808080;
  --dark-grey: #363636;

  /* Windows 98 UI Colors */
  --win98-bg: #c0c0c0;
  --win98-light: #ffffff;
  --win98-inner-light: #dfdfdf;
  --win98-shadow: #808080;
  --win98-dark: #000000;
}

@font-face {
  font-family: "Apple Garamond Light";
  src: url("/fonts/AppleGaramond-Light.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

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

html, body {
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden; /* Prevents global page scroll */
}

/* ─── MASTER GRID FRAME LAYOUT ─── */
body.frame-layout {
  background-color: var(--white);
  background-repeat: repeat;
  color: var(--white);
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 16px;
  line-height: 1.5;
  width: 100vw;
  margin: 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 100px minmax(0, 1fr);
  grid-template-areas:
    "rtop"
    "rbottom";
}

a {
  text-decoration: none;
}

/* ─── FRAME 1: TOP HEADER ("rtop") ─── */
.frame-rtop {
  grid-area: rtop;
  display: flex;
  align-items: center;
  vertical-align: center;
  padding: 0 20px;
  z-index: 10;
  position: relative;
  min-width: 0;

  border-bottom: 6px solid transparent;
}

.frame-rtop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 6px;
  background: linear-gradient(
    to bottom,
    var(--win98-light) 0%, var(--win98-light) 16.6%,
    var(--win98-bg) 16.6%, var(--win98-bg) 66.6%,
    var(--win98-shadow) 66.6%, var(--win98-shadow) 83.3%,
    var(--win98-dark) 83.3%, var(--win98-dark) 100%
  );
}

/* ─── FRAME 2: MAIN CONTENT AREA ("rbottom") ─── */
.frame-rbottom {
  grid-area: rbottom;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
}

/* ─── FRAME DIVIDER: RIGHT NAV ("vdiv") ─── */
.frame-vdiv {
  display: none;
}

/* ─── NAVIGATION: floats in the old top-right column position,
   no longer a bordered grid sidebar ─── */
.frame-nav.feed_nav {
  position: fixed;
  top: 50px; /* exact vertical center of the 100px header row */
  transform: translateY(-50%);
  right: 20px;
  z-index: 99;
}

.feed_nav-inner {
  display: flex;
  gap: 0;
  padding: 0;
  text-align: left;
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 16px;
}

.feed_nav a {
  display: inline-block;
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 13px;
  text-transform: uppercase;
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  padding: 4px 10px;
  text-decoration: none;
  cursor: pointer;
}

.feed_nav a + a {
  margin-left: -1px;
}

.feed_nav a:hover {
  background: #ffff00;
  color: #000000;
}

.feed_nav a.select {
  background: #000000;
  color: #ffff00;
}

/* ─── PAGES ─── */
.page {
  display: none;
  min-height: auto;
}

.page.active {
  display: block;
}

html.no-js .page:target {
  display: block !important;
}

/* ─── CONTENT CONTAINER ─── */
#content_container {
  padding: 30px 20px 0 20px;
  position: relative;
  z-index: 10;
}

.entry {
  clear: both;
}

.project_content {
  color: black;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.project_content img,
.project_content video {
  float: none !important;
  display: block;
  position: relative;
  margin: 0 auto 15px auto;
  max-width: 100%;
  height: auto;
}

.project_content .caption {
  margin: 0 0 10px 0;
  text-align: center;
  white-space: pre-line;
}

.project_content .meta {
  font-size: 12px;
  color: var(--dark-grey);
}

.project_content .tags {
  font-size: 12px;
  color: var(--grey);
  margin-top: 4px;
}

.project_content .reblog-note {
  font-size: 12px;
  font-style: italic;
  color: var(--pink);
}

.project_bottom {
  clear: both;
  margin: 10px 0 60px 0;
}

/* ─── LOAD MORE (pagination) ─── */
.load-more-btn {
  display: block;
  margin: 20px auto 40px auto;
  padding: 10px 28px;
  background: #000000;
  color: #ffff00;
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 16px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

.load-more-btn:hover {
  background: #ffff00;
  color: #000000;
}

/* ─── FOOTER ─── */
#site_footer {
  clear: both;
  color: #000000;
  padding: 15px 0 30px 0;
  font-size: 14px;
  text-align: center;
}

/* ─── BLINK ANIMATIONS ─── */
.blink-link {
  animation: blink 0.2s infinite;
  display: inline-block;
  will-change: opacity;
}

.blink-arrows {
  animation: blink 0.6s infinite;
  display: inline-block;
  font-family: "Lucida Console", Monaco, monospace;
  font-size: 14px;
  will-change: opacity;
}

@keyframes blink {
  0%, 15%  { opacity: 0; }
  16%, 100% { opacity: 1; }
}

/* ─── INDEX PAGE ─── */
#index {
  padding: 30px 20px 0 20px;
}

.index {
  margin: 20px 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.index .module {
  position: relative;
  text-align: center;
}

/* ─── FEED IMAGE FRAMES ─── */


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

.cardimgcrop {
  margin: 0 0 12px 0;
  position: relative;
  width: 200px;
  height: 150px;
  overflow: hidden;
  transform: translate(0, 0);
}

.cardimgcrop:hover {
  transform: translate(3px, 3px);
}

.cardimgcrop .crop-inner,
.cardimgcrop .crop-inner a {
  display: block;
  width: 100%;
  height: 100%;
}

.crop-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-text-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.thumb_title {
  overflow: hidden;
  padding-top: 2px;
  white-space: nowrap;
  text-align: center;
  width: 200px;
  font-size: 14px;
  line-height: 15px;
}

.thumb_title a {
  background: #000000;
  color: #ffff00;
  font-size: 14px;
  line-height: 15px;
  padding: 0 10px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-decoration: none;
  text-transform: uppercase;
}

.thumb_title a:hover {
  background: #ffff00;
  color: #000000;
}

/* ─── TAG FILTER (Index page) ─── */
.tag-filter {
  max-width: 900px;
  margin: 0 auto 30px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag-pill {
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 13px;
  text-transform: uppercase;
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  padding: 4px 10px;
  cursor: pointer;
}

.tag-pill:hover {
  background: #ffff00;
}

.tag-pill.active {
  background: #000000;
  color: #ffff00;
  border-color: #000000;
}

.marquee-container {
  overflow: hidden;
  width: 100%;
  color: #000000;
  text-align: center;
  padding: 10px 0;
  font-family: "Apple Garamond Light", Times, serif;
  font-size: 50px;
}

.marquee-content {
  display: inline-block;
}

.site-title-link {
  color: inherit;
  cursor: pointer;
}

/* ─── RESPONSIVE MOBILE VIEW ─── */
@media (max-width: 768px) {
  /* Header can no longer assume a fixed 100px row — the title wraps
     to 2 lines at phone widths, so let the row grow to fit it. */
  body.frame-layout {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .frame-rtop {
    padding: 14px 84px 14px 16px; /* right padding clears the floating nav badge */
    min-height: 64px;
  }

  .frame-rtop::after {
    bottom: -6px;
  }

  .marquee-container {
    /* scales with viewport width instead of a fixed 50px */
    font-size: clamp(1.1rem, 6vw, 1.6rem);
    text-align: left;
    padding: 0;
    line-height: 1.25;
  }

  /* Nav badge: anchor to the corner rather than trying to stay
     vertically centered on a header whose height now varies with
     how many lines the title wraps to. */
  .frame-nav.feed_nav {
    top: 12px;
    right: 10px;
    transform: none;
  }

  .feed_nav-inner {
    display: flex;
    gap: 0;
  }

  .feed_nav a {
    font-size: 12px;
    padding: 6px 8px;
  }

  #content_container,
  #index {
    padding: 18px 14px 0 14px;
  }

  .project_content {
    padding: 0 4px;
  }

  .tag-filter {
    padding: 0 14px;
    gap: 6px;
  }

  .tag-pill {
    font-size: 12px;
    padding: 6px 10px; /* larger touch target than desktop */
  }

  /* Index grid: fixed 200px cards only fit one per row on a phone.
     Switch each card to a fraction of the row width instead, with
     aspect-ratio standing in for the old fixed 150px height. */
  .index {
    gap: 12px;
  }

  .index .module {
    width: calc(50% - 6px);
  }

  .cardimgcrop {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .thumb_title {
    width: 100%;
  }

  .card-text-preview {
    font-size: 12px;
    padding: 8px;
  }
}

/* Very small phones: two columns gets cramped, so drop to one. */
@media (max-width: 420px) {
  .index .module {
    width: 100%;
  }

  .cardimgcrop {
    aspect-ratio: 16 / 10;
  }
}