:root {
  --bg: #fcfcfc;
  --text: #222;
  --accent: #666;
  --border: #e0e0e0;
  --font-header: 'Sometype Mono', monospace;
  --font-body: 'Helvetica', sans-serif;
}

/* =============== Base =============== */
* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* =============== Loader =============== */
.orange-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 1rem;
  transition: opacity 1.5s ease;
}

.emoji-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 2.2rem;
}

.emoji-container span {
  display: inline-block;
  animation: bounce 0.6s ease infinite;
}
.emoji-container span:nth-child(2) { animation-delay: 0.12s; }
.emoji-container span:nth-child(3) { animation-delay: 0.24s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
}

.loader-image {
  max-width: 180px;
  width: 70%;
  height: auto;
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  image-rendering: auto;
}
.not-found .image-wrapper img {
  animation: violent-shake 0.4s infinite;
  max-width: 280px;
  width: 80%;
  height: auto;
  border-radius: 12px;
}

/* violent shake (404) */
@keyframes violent-shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  10%  { transform: translate(-5px, 5px) rotate(-1deg); }
  20%  { transform: translate(5px, -5px) rotate(1deg); }
  30%  { transform: translate(-5px, -5px) rotate(-1deg); }
  40%  { transform: translate(5px, 5px) rotate(1deg); }
  50%  { transform: translate(-3px, 3px) rotate(-0.5deg); }
  60%  { transform: translate(3px, -3px) rotate(0.5deg); }
  70%  { transform: translate(-3px, -3px) rotate(-0.5deg); }
  80%  { transform: translate(3px, 3px) rotate(0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}


/* =============== Header & Nav =============== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem 1rem;
  border-bottom: none;
}

header h1 {
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 2.2rem;
  color: #b45b00;
  letter-spacing: 0.5px;
  margin: 0;
}
header h1 a {
  color: #b45b00;
  text-decoration: none;
  transition: color 0.2s ease;
}
header h1 a:hover { color: #000; }

nav {
  font-family: var(--font-header);
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
nav a {
  color: #b45b00;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
nav a:hover {
  color: #944500;
  border-bottom: 2px dotted #944500;
  transform: translateY(-1px);
}

/* Floating Nav */
.floating-nav {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  gap: 1.2rem;
  font-size: 1rem;
}
.floating-nav a { color: #b45b00; }
.floating-nav a:hover { color: #000; }

/* helper */
.intro {
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 720px;
  margin: 1rem auto 0.5rem auto;
  text-align: center;
  color: #777;
}


.bio {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #fff7ec; /* soft orange-tint box */
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 900px;
  margin: 2rem auto 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* subtle depth */
}

.bio img {
  width: 120px;
  height: 120px;
  border-radius: 50%; /* makes it circular */
  object-fit: cover;
  border: 3px solid #E68A00; /* matches your theme */
}

.bio-text {
  font-family: 'Sometype Mono', monospace;
  color: #6B2700;
}

.bio-text h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 900;
  color: #b45b00;
}

.bio-text p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.highlight {
  background: #ffdd88;    /* soft pastel yellow highlight */
  padding: 0.15em 0.3em;  /* small inner spacing */
  border-radius: none;     /* rounded corners */
  font-weight: bold;      /* bold text */
  color: #5a3200;         /* dark warm brown for readability */
}



.index-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* four equal columns */
  gap: 10px; /* space between images */
  max-width: 100%;
}

.index-grid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* keeps them uniform */
  border-radius: 6px; /* optional */
  aspect-ratio: 2 / 3;
}

/* =============== POSTERS gallery =============== */
.poster-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}
.poster-gallery img {
  width: calc(33.333% - 10px);   /* desktop: 3 per row */
  height: auto;
  border-radius: 4px;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* =============== ORIGINALS: custom gallery =============== */
.custom-gallery {
  display: grid;
  row-gap: 0.25rem;       /* small gap everywhere by default */
  column-gap: 0.5rem;     /* keep columns nicely spaced */
  max-width: 1300px;
  width: min(94vw, 1400px);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Slightly bigger space after row 1 and row 2 only */
.row-one { margin-bottom: 0.4rem; }
.row-two { margin-bottom: 0.4rem; }

/* Force row 3 and row 4 closer together */
.row-three { margin-bottom: 0.15rem; }
.row-four { margin-top: 0; }

/* Row 1: two equal */
.row-one {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.row-one img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

/* Row 2: left stack (2) + right tall */
.row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
.left-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
}
.left-stack img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.img-vert {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

/* Row 3 */
.row-three {
  display: grid;
  grid-template-columns: 7fr 5fr;   /* left can be wider; adjust 7/5 to taste */
  gap: 0.6rem;
  align-items: stretch;
  margin: 0;
}

/* Left image: sets the row height via aspect-ratio */
.row-three .img-5x4 {
  width: 100%;
  aspect-ratio: 5 / 4;   /* 2561x2048 ≈ 5:4 */
  height: auto;
  object-fit: cover;      /* swap to 'contain' if you want zero crop */
  display: block;
  border-radius: 6px;
}

/* Right column: two rows with the same proportion as 968:521 */
.right-stack-wide {
  display: grid;
  grid-template-rows: 968fr 521fr;  /* preserves the natural height ratio */
  gap: 0.5rem;
  height: 100%;
  margin: 0;
}

.right-stack-wide img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* swap to 'contain' for zero crop (will letterbox) */
  display: block;
  border-radius: 6px;
}
/* Row 4 */
.row-four img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}
/* ===== Comic feature section ===== */
/* === COMIC FEATURE (matches your current HTML) === */
/* === Comic feature (desktop) === */
.comic-feature {
  /* container + background + sizing */
  max-width: 1800px;          /* tighter than full page */
  margin: 1.5rem auto 2rem;
  padding: 1rem;
  background: #E68A00;        /* soft orange-tint section */
  background-color: #E68A00; /* soft orange-beige */


  /* layout */
  display: grid;
  grid-template-columns: 2.5fr 1.2fr 2fr; /* left / cover / right */
  grid-template-rows: auto auto; /*two equal rows */
  column-gap: 0.8rem;
  row-gap: 0.25rem;                    /* ← zero gap between rows (pages vs panels) */
  align-items: start;
}

/* left: top pages (3 across) */
.comic-feature .previews {
  grid-column: 1;
  grid-row: 1;                  /* row 1 only */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: start; /* ⬅ prevents extra empty space under shorter images */
  margin: 0;
}
.comic-feature .previews img {
  width: 100%;
  height: auto;                 /* fill the row height */
  aspect-ratio: 2/3.175;  /* pages ratio (2:3.175) */
  object-fit: contain;            /* uniform crop */
  display: block;
  border: 2px solid transparent; /* soft orange-ish like your theme */
}

/* left: bottom panels (3 across, uncropped) */
.comic-feature .panels {
  grid-column: 1;
  grid-row: 2;                  /* row 2 only */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: start;
  margin: 0;
}
.comic-feature .panels img {
  width: 100%;
  height: auto;                 /* tile height matches row height */
  aspect-ratio: 95 / 72;        /* ~950×720 */
  object-fit: contain;          /* show full panel, no crop */
  background: transparent;             /* fills the letterbox area */
  display: block !important;     /* kill inline baseline space */
  width: 100% !important;
  height: auto !important;  
  border: 2px solid transparent; /* soft orange-ish like your theme */
}

/* middle: cover spans both rows and defines total height */
.comic-feature .cover {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  aspect-ratio: 720 / 1140;   /* <-- add this */
}
.comic-feature .cover img {
  width: 100%;
  height: 100%;                 /* IMPORTANT: no height:100% */
  aspect-ratio: 720 / 1140;     /* same ratio as pages */
  object-fit: contain;            /* or 'contain' if you prefer no crop */
  display: block;
  border-radius: 8px;
}

/* right: title (top) + description + buy (bottom) */
.comic-feature .side {
  grid-column: 3;
  grid-row: 1 / span 2;         /* spans both rows to match cover height */
  display: grid;
  grid-template-rows: auto 1fr auto;  /* title / description (flex) / button */
  gap: 0.6rem;
  align-items: stretch;
}
.comic-feature .side .title {
  font-family: 'Sometype Mono', monospace;
   font-weight: 900;        /* was 700, now extra bold */
  font-size: 1.7rem;       /* adjust size to taste */
  color: #6B2700;
  line-height: 1.2;
  text-transform: uppercase;
}
.comic-feature .side .description {
  font-family: 'Sometype Mono', monospace;
  background: transparent;
  padding: 0.8rem;
  color: #6B2700;
  overflow: auto;
}
.comic-feature .side .buy {
  display: flex;
  justify-content: flex-end;  /* align button to page right edge */
}
.comic-feature .side .buy-btn {
  display: inline-block;
  background: #6B2700;
  border: 2px solid #6B2700;
  color: #FFF4E5;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-family: 'Sometype Mono', monospace;
  transition: transform 0.2s ease, background 0.2s ease;
}
.comic-feature .side .buy-btn:hover {
  background: #3D2D01;
  transform: translateY(-1px);
}
.comic-feature {
  background: #DE9B00; 
  border: 1px solid #DE9B00;
  padding: 1rem;                   /* ensure content isn’t flush to edges */
}




/* =============== COMMISSIONS =============== */
.commissions-title {
  max-width: 1600px;
  margin: 0 auto 0.75rem;
  padding: 0 1rem;
  font-family: var(--font-header);
  font-size: 1.2rem;
  font-weight: 600;
  color: #b45b00;
}
.commissions-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* desktop: 5 across */
  gap: 10px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
}
.commissions-gallery img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: transparent;
}

/* =============== EXTRA GALLERY (H + 4 V) =============== */
/* Desktop:
   Row1: H spans 2 cols, V1 on right
   Row2: V2 V3 V4
*/
.extra-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "h h v1"
    "v2 v3 v4";
  gap: 10px;
  margin: 1rem auto;
  max-width: 1600px;
  padding: 0 1rem;
}
.extra-gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}
.extra-gallery img:nth-child(1) { grid-area: h;  aspect-ratio: 3 / 2; }
.extra-gallery img:nth-child(2) { grid-area: v1; aspect-ratio: 2 / 3; }
.extra-gallery img:nth-child(3) { grid-area: v2; aspect-ratio: 2 / 3; }
.extra-gallery img:nth-child(4) { grid-area: v3; aspect-ratio: 2 / 3; }
.extra-gallery img:nth-child(5) { grid-area: v4; aspect-ratio: 2 / 3; }

/* =============== Floating subscribe =============== */
.floating-subscribe {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  font-size: 1.4rem;
  background-color: #ffe8cf;
  border: 1.5px solid #ffcc99;
  border-radius: 50%;
  padding: 0.4rem;
  color: #b45b00;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(255, 198, 140, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease;
  z-index: 999;
}
.floating-subscribe:hover {
  background-color: #ffddb0;
  transform: scale(1.1);
  color: #944500;
}

/* =============== Contact styles =============== */
.contact-form {
  background: #fff9f4;
  border: 2.5px dashed #ffd2a3;
  border-radius: 16px;
  padding: 2.2rem;
  margin: 2.5rem auto;
  max-width: 500px;
  text-align: left;
  font-family: var(--font-header);
  color: #b45b00;
  box-shadow: 0 6px 14px rgba(255, 202, 142, 0.15);
}
.contact-form h2 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  text-align: center;
  color: #b45b00;
}
.contact-form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: #a35600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem;
  border-radius: 10px;
  border: 2px solid #ffd9b3;
  background: #fffaf2;
  color: #333;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #ffb07c;
  box-shadow: 0 0 0 4px rgba(255, 176, 124, 0.2);
}
.contact-form button {
  display: inline-block;
  margin: 1.5rem auto 0;
  background: #ffe4c7;
  border: 2px solid #ffcc99;
  color: #944500;
  font-size: 1rem;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.contact-form button:hover {
  background: #ffd8af;
  transform: scale(1.05);
}

.contact-box {
  background: #fff8f1;
  border: 2.5px dotted #ffd9b3;
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin: 3rem auto 2rem;
  max-width: 440px;
  text-align: center;
  font-family: var(--font-header);
  color: #b45b00;
  box-shadow: 0 4px 10px rgba(255, 198, 140, 0.15);
}
.contact-box h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: #b45b00;
}
.contact-box p {
  font-size: 0.9rem;
  color: #aa5c00;
  margin-top: 0.3rem;
}
.contact-box a {
  color: #b45b00;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.contact-box a:hover { color: #000; }

.social-links {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.social-links li { font-size: 0.7rem; }

.subtitle {
  text-align: center;
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.5rem;
  font-style: italic;
  letter-spacing: 0.2px;
}



/* =============== Responsive =============== */
/* Tablet and down */
@media (max-width: 1024px) {
  header { padding: 1rem; }
}
@media (min-width: 701px) and (max-width: 1024px) {
  .comic-pages,
  .comic-panels {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .comic-cover-cta .buy-button { justify-self: start; }
}

/* Mobile: <=700px */
@media (max-width: 700px) {
  .bio {
    flex-direction: column;
    text-align: center;
  }

  .bio img {
    margin-bottom: 0.8rem;
  }
  .index-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem
  }
  /* Posters: 2 per row */
  .poster-gallery img { width: calc(50% - 5px); }

  /* Floating nav smaller/tighter */
  .floating-nav {
    font-size: 0.55rem;
    gap: 0.6rem;
    flex-wrap: wrap;
    top: 1.7rem;
    right: 1rem;
  }

  header {
    padding: 1rem 1.5rem;
  }
  header h1 { font-size: 1.4rem; }

  /* Originals spacing tweaks */
  .custom-gallery { gap: 0.75rem; padding: 0.75rem; }
  .row-one img { max-height: 300px; }

  /* Extra-gallery becomes: H on top, then two rows of two verticals */
  .extra-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "h h"
      "v2 v3"
      "v4 v1"; /* order the four however you like */
    max-width: 700px;
  }

  /* Commissions: 1 per row on mobile */
  .commissions-gallery {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .commissions-title {
    padding: 0 1rem;
    margin-bottom: 0.75rem;
  }
   .custom-gallery {
    max-width: none;          /* stop constraining width */
    width: 100%;
    padding: 0 0.75rem;       /* small side padding */
    gap: 0.5rem;              /* overall tighter gaps */
  }

  /* Row 1: two images, smaller gap and fuller tiles */
  .row-one {
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;              /* ↓ was 0.75rem */
  }
  .row-one img {
    aspect-ratio: 2 / 3;      /* taller tiles fill space nicely */
    object-fit: cover;        /* no letterboxing on mobile */
    border-radius: 6px;
  }
   /* ========== Comics section: compact mobile overrides ========== */
  /* control tile height everywhere on mobile */
  :root { --tileH: clamp(90px, 24vw, 150px); }

  .comic-feature {
    grid-template-columns: 0.9fr 1.1fr;              /* cover a bit wider than side */
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "cover side"
      "previews previews"
      "panels panels";
    column-gap: 0.5rem;
    row-gap: 0.4rem;
    padding: 0.6rem;
    max-width: 680px;                                 /* keep section narrow on phones */
  }

  .comic-feature .cover      { grid-area: cover; align-self: start; }
  .comic-feature .side       { grid-area: side;  align-self: start; }
  .comic-feature .previews   { grid-area: previews; }
  .comic-feature .panels     { grid-area: panels; }

  /* cap the cover so it doesn’t dominate; align roughly to two tile heights */
  .comic-feature .cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* side text scaled down a touch */
  .comic-feature .side {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.4rem;
  }
  .comic-feature .side .title { font-size: 1rem; line-height: 1.2; }
  .comic-feature .side .description {
    font-size: 0.9rem;
    padding: 0.5rem;
    max-height: none;
    overflow: visible;
  }

  /* keep previews/panels three across, but use consistent small tiles */
  .comic-feature .previews,
  .comic-feature .panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
  }
  .comic-feature .previews img {
    width: 100%;
    height: auto;
    object-fit: contain;                                /* no crop */
  }
  .comic-feature .panels img {
    width: 100%;
    height: var(--tileH);
    object-fit: contain;                                /* no crop */
    background: transparent;
  }

/* extra-small phones: stack side under cover if it’s still cramped */
@media (max-width: 420px) {
  .comic-feature {
    grid-template-columns: 1fr;
    grid-template-areas:
      "cover"
      "side"
      "previews"
      "panels";
  }
  /* center the Buy button on mobile */
.comic-feature .side .buy {
  display: flex;
  justify-content: center;   /* center horizontally */
  align-items: center;       /* vertical alignment inside the row */
}

/* optional: give the button a little breathing room from the text */
.comic-feature .side .buy .buy-btn {
  margin-top: 0.5rem;       /* tweak to taste */
 }
}