  @font-face { src: url(https://conandrum.neocities.org/fonts/Heatwave%20Regular.otf); font-family: "Heatwave"; }
@font-face { src: url(https://conandrum.neocities.org/fonts/Gotham%20Book.otf); font-family: "Gotham"; }

  :root {
  --bg: #F5F1EB;
  --surface: #FAF7F2;
  --primary: #DB6A28;
  --primary-hover: #B84F16;
  --secondary: #17375E;
  --accent: #6B4FA3;
  --highlight: #E8B24E;
  --text: #38352F;
  --text-muted: #6D7075;
  --border: #DDD7D0;
  --success: #4BAA84;
  --error: #C74A3A;
}

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Gotham";
    background-image:url(https://conandrum.neocities.org/img/starsagain.gif);
    display: flex;
    justify-content: center;
    padding: 24px;
  }

  .page {
    width: 100%;
    max-width: 900px;
    background: var(--secondary);
    border: 5px solid var(--highlight);
    padding: 10px;
  }

  header {
    text-align: center;
    padding: 14px 0 10px;
    font-family: "Heatwave";
  }

  header h1 {
  margin: 0;
  color: var(--highlight);
  font-size: clamp(36px, 12vw, 90px);
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 var(--primary);
}

header h2 {
  margin: 0;
  color: var(--highlight);
  font-size: clamp(13px, 4vw, 20px);
  letter-spacing: 2px;
}

  nav {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
  }

  nav a {
    color: var(--highlight);
    text-decoration: none;
    font-size: 12px;
    margin: 0 6px;
  }

  nav a:hover {
    color: var(--primary);
    text-decoration: underline;
  }

  .content {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  .sidebar {
    width: 130px;
    background: var(--secondary);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .sidebar .item {
    text-align: center;
  }

  .sidebar .item a {
    display: block;
    text-decoration: none;
  }

  .sidebar .item .thumb-frame {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--highlight);
    background: var(--surface);
  }

  .sidebar .item .thumb-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .sidebar .item span {
    display: block;
    color: var(--highlight);
    font-size: 11px;
    margin-top: 4px;
  }

  .sidebar .item a:hover .thumb-frame {
    border-color: var(--primary);
  }

  .sidebar .item a:hover span {
    color: var(--primary);
    text-decoration: underline;
  }

  .main {
    flex: 1;
    background: rgba(0, 0, 0, 0);
    padding: 10px;
    display: flex;
    flex-direction: column;
  }

  .main .welcome {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin: 0 0 10px;
  }

  .main .image-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 400px;
  overflow: hidden;
}

.main .image-frame img {
  max-width: 100%;
  max-height: 320px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
}

.main .image-frame p {
  color: var(--highlight);
  font-size: 13px;
  line-height: 1.6;
  text-align: justify;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 10px;
}

  footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    padding: 10px 0 2px;
  }
  
#pagedoll {
  position: fixed !important;
  bottom: 10px;
  right: 10px;
  left: auto;
  top: auto;
  width: clamp(105px, 15vw, 210px);
  height: auto;
  margin: 0;
  z-index: 9999;
  display: block;
}

#pagedoll img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  body {
    padding: 8px;
  }

  .content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sidebar .item {
    width: 80px;
  }

  .main .image-frame img {
    max-height: 220px;
  }

  #pagedoll {
    width: clamp(70px, 20vw, 120px);
  }
}


/* ---- subpage-specific additions, built on top of style.css tokens ---- */

  .content.subpage {
    display: block;
    margin-top: 10px;
  }

  .subpage-main {
    max-width: 640px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0);
    padding: 10px 14px 20px;
  }

  .subpage-main .page-title {
    font-family: "Heatwave";
    color: var(--highlight);
    text-align: center;
    font-size: 34px;
    letter-spacing: 2px;
    margin: 6px 0 4px;
  }

  .subpage-main .page-intro {
    color: var(--highlight);
    text-align: center;
    font-size: 13px;
    font-style: italic;
    opacity: 0.85;
    margin: 0 0 26px;
  }

  .era {
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(232, 178, 78, 0.25);
  }

  .era:last-of-type {
    border-bottom: none;
  }

  .era .era-years {
    display: inline-block;
    font-family: "Heatwave";
    color: var(--primary);
    background: var(--surface);
    border: 2px solid var(--highlight);
    font-size: 12px;
    letter-spacing: 1px;
    padding: 2px 10px;
    margin-bottom: 8px;
  }

  .era h3 {
    font-family: "Heatwave";
    color: var(--highlight);
    font-size: 22px;
    letter-spacing: 1px;
    margin: 0 0 8px;
  }

  .era p {
    color: var(--highlight);
    font-size: 13px;
    line-height: 1.7;
    text-align: justify;
    margin: 0;
    opacity: 0.92;
  }
  
.img-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start; /* or center, if you want them vertically centered on each other */
  gap: 12px;
  margin: 20px auto;
}

.img-row img {
  height: 300px;      /* normalize by this */
  width: auto;         /* let width follow the image's natural aspect ratio */
  max-width: 100%;     /* prevents overflow on narrow screens */
  object-fit: cover;
  border: 3px solid var(--highlight);
  background: var(--surface);
  display: block;
}

  /* ---- gallery ---- */

  .gallery-section {
    margin-top: 8px;
  }

  .gallery-section h3 {
    font-family: "Heatwave";
    color: var(--highlight);
    text-align: center;
    font-size: 24px;
    letter-spacing: 1px;
    margin: 0 0 4px;
  }

  .gallery-section .gallery-sub {
    text-align: center;
    color: var(--highlight);
    font-size: 12px;
    font-style: italic;
    opacity: 0.75;
    margin: 0 0 16px;
  }

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  .gallery-grid button {
    all: unset;
    cursor: pointer;
    display: block;
    aspect-ratio: 1 / 1;
    border: 3px solid var(--highlight);
    background: var(--surface);
    overflow: hidden;
  }

  .gallery-grid button:hover,
  .gallery-grid button:focus-visible {
    border-color: var(--primary);
    outline: none;
  }

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

  /* ---- lightbox ---- */

  .lightbox {
    position: fixed;
    inset: 0;
    background: rgba(23, 55, 94, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 40px 16px;
  }

  .lightbox.open {
    display: flex;
  }

  .lightbox figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .lightbox img {
    max-width: min(80vw, 620px);
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 4px solid var(--highlight);
    background: var(--surface);
  }

  .lightbox figcaption {
    color: var(--highlight);
    font-size: 12px;
    letter-spacing: 0.5px;
    text-align: center;
  }

  .lightbox .lb-close {
    all: unset;
    cursor: pointer;
    position: absolute;
    top: 18px;
    right: 24px;
    color: var(--highlight);
    font-family: "Heatwave";
    font-size: 26px;
    line-height: 1;
  }

  .lightbox .lb-close:hover {
    color: var(--primary);
  }

  .lightbox .lb-nav {
    all: unset;
    cursor: pointer;
    color: var(--highlight);
    font-family: "Heatwave";
    font-size: 34px;
    padding: 10px 14px;
  }

  .lightbox .lb-nav:hover {
    color: var(--primary);
  }

  .lightbox .lb-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

  @media (max-width: 480px) {
    .lightbox img { max-width: 90vw; max-height: 60vh; }
    .lightbox .lb-nav { font-size: 26px; padding: 6px 10px; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }