:root{
  --bg: #000;
  --fg: #f5f5f5;
  --accent: #FFCC18;
  --muted: rgba(255,255,255,.75);

  --header-bg: #b00020;   /* red */
  --logo-fill: #ffffff;   /* white */
  --debug: 0;             /* 0 off, 1 on (for outlines only) */
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a{ color: #5aa2ff; text-decoration: none; }
a:hover{ text-decoration: underline; }

/*
.article-container a.external {
  background-image: none !important;
  padding-right: 0 !important;
}
.article-container a.external::after,
.article-container a.external::before {
  content: none !important;
  display: none !important;
}
*/
/*
a.external { background-image: none !important; padding-right: 0 !important; }
a.external::after, a.external::before { content: none !important; display: none !important; }
*/

/* ===== Header ===== */

.site-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;

  background: var(--header-bg);
  padding: 12px 16px;
  gap: clamp(16px, 3vw, 32px);
}

/* Make SVG color controllable via one variable */
.logo{
  display: block;
  line-height: 0;
  color: var(--logo-fill);
}

/* Size by height, keep aspect */
.logo svg{
  display: block;
  height: 40px;
  width: auto;
}

/* FORCE Inkscape-exported strokes/fills to follow our variable */
.logo svg, .logo svg *{
  fill: currentColor !important;
  stroke: currentColor !important; /* if you want NO outline, change to: stroke: none !important; */
}

.site-nav{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;

  gap: clamp(16px, 4vw, 48px);
  line-height: 1;
}

.site-nav a{
  display: inline-flex;
  align-items: center;
  padding: 4px 0;

  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.site-nav a:hover{ text-decoration: underline; }

/* ===== Mobile menu/hamburger button (hidden on desktop) ===== */
.nav-toggle-btn{
  display: none;
  margin-left: auto;
  padding: 4px 14px;
  border-radius: 16px;
  background: var(--header-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
}

/* Collapse nav into hamburger on phone-portrait,
   and only on *very* narrow landscape screens */
@media (max-width: 625px) and (orientation: portrait),
       (max-width: 520px) and (orientation: landscape){

  .site-header{
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 0;
  }

  .logo svg{ height: 24px; }

  .nav-toggle-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav{
    display: none;
    flex: 1 0 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 8px;
    gap: 0;
  }

  .site-header.nav-open .site-nav{
    display: flex;
    border-top: 1px solid rgba(255,255,255,.25);
    padding-top: 4px;
  }

  .site-nav a{ padding: 6px 0; }
}

/* ===== Main / Hero ===== */

.site-main{
  flex: 1 1 auto;
  min-height: 0;            /* critical: prevents flex children overflow weirdness */
  display: flex;
  overflow: auto;           /* <-- add this */
  -webkit-overflow-scrolling: touch; /* nicer in Safari */
}

.hero{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}

.hero img{
  max-width: 80%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Hero <picture> wrapper: make centering deterministic */
.hero-media{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
}
.hero-media img{
  display:block;
  margin:0 auto;
}

/* Phone landscape: inset page so content doesn't run into rounded corners */
@media (hover:none) and (pointer:coarse) and (orientation:landscape){

  .site-header{
    padding-left: 20px;
    padding-right: 20px;

    /* iOS safe-area support */
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .hero{
    padding: 10px 8px;     /* tweak to taste */
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
  }

  .hero-media{
    width: 100%;
    height: 100%;
    display: flex;         /* keep centering deterministic */
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  .hero img{
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;       /* no cropping */
    object-position: center;
    box-sizing: border-box;
  }
}

/* Bigger hero on phone portrait */
@media (max-width: 625px) and (orientation: portrait){
  .hero{
    padding: 6px 8px;       /* less gutter = bigger image */
  }

  .hero img{
    width: 100%;            /* allow upscaling */
    max-width: 100%;
    max-height: none;       /* don’t height-cap it */
    height: auto;
  }
}

/* Desktop / non-phone: prevent the portrait hero from growing so tall it clips */
@media (min-width: 626px) and (hover: hover) and (pointer: fine){
  .hero img{
    max-width: min(80%, 1100px);
    max-height: calc(100vh - 180px);
  }
}

/* Prefer dynamic viewport height when supported */
@supports (height: 100dvh){
  @media (min-width: 626px) and (hover: hover) and (pointer: fine){
    .hero img{
      max-height: calc(100dvh - 180px);
    }
  }
}

/* ===== Footer ===== */

.site-footer{
  background: var(--header-bg);
  padding: 14px 16px;
  text-align: center;
}

.site-footer .sub{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ===== Debug outlines (safe) ===== */
.site-header { outline: calc(3px * var(--debug)) solid rgba(0,255,255,0.85); } /* cyan */
.logo        { outline: calc(3px * var(--debug)) solid rgba(0,255,0,0.85); }   /* green */
.logo svg    { outline: calc(3px * var(--debug)) solid rgba(0,0,255,0.85); }   /* blue */
.site-nav    { outline: calc(3px * var(--debug)) solid rgba(255,255,0,0.85); } /* yellow */
.site-nav a  { outline: calc(2px * var(--debug)) solid rgba(255,0,255,0.85); } /* magenta */


@media (max-width: 625px){
  /* shrink overall header */
  .site-header{
    padding: 4px 8px !important;   /* THIS affects height */
    gap: 6px !important;           /* mostly affects spacing, not height */
  }

  /* shrink the logo SVG (big contributor to height) */
  .logo svg{
    height: 26px !important;
  }

/* show Menu button, hide nav by default */
.nav-toggle-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 16px;
  background: var(--header-bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

  /* if your open-menu bar adds height, tighten it */
.site-nav{
  padding-top: 0 !important;
  padding-left: 8px;
  padding-right: 8px;
  /* distribute across the row */
  justify-content: space-between;

  /* let it use the full width */
  width: 100%;

  /* turn off gap so it doesn't fight space-between */
  gap: 0 !important;
}

  /* optional: make links less tall when the menu is open */
  .site-nav a{
    padding: 6px 0 !important;
  }
}


.logo svg{
  transform: translateX(8px);
}

.site-header.nav-open .site-nav{
  padding-top: 4px;
}

/* Short landscape viewports: keep full nav but reduce header height */
@media (max-height: 450px) and (orientation: landscape){
  .site-header{ padding: 6px 10px; }
  .logo svg{ height: 24px; }
  .site-nav{ gap: 16px; }      /* reduce spacing */
  .site-nav a{ padding: 2px 0; } /* reduce vertical hit */
}


/* LANDSCAPE PHONES (touch): full nav, no hamburger, add side inset for rounded corners */
@media (hover:none) and (pointer:coarse) and (orientation:landscape){
  .site-header{
    flex-wrap: nowrap !important;
    padding: 4px clamp(10px, 4vw, 40px) !important;   /* <-- change THIS number */
    gap: 8px !important;
  }

  .logo svg{ height: 24px !important; }
  .nav-toggle-btn{ display: none !important; }

  .site-nav{
    display: flex !important;
    width: auto !important;
    justify-content: flex-end !important;   /* or flex-start if you prefer */
    gap: clamp(16px, 4vw, 48px) !important;
    padding: 0 !important;
    border-top: 0 !important;
  }

  /* If nav-open was left on from portrait, don't “drop down” a mobile panel */
  .site-header.nav-open .site-nav{
    border-top: 0 !important;
    padding-top: 0 !important;
  }

  .site-main > :not(.hero){
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  .article-container{
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

}

/* tighten footer on phones */
@media (max-width: 625px){
  .site-footer{
    padding: 8px 12px;
  }

  .site-footer .sub{
    font-size: 12px;
    line-height: 1.25;
  }
}

/* extra squeeze for short landscape viewports */
@media (max-width: 625px) and (max-height: 450px){
  .site-footer{
    padding: 6px 10px;
  }

  .site-footer .sub{
    font-size: 11px;
    line-height: 1.2;
  }
}

/* ===== Footer: smaller on phones ===== */
@media (max-width: 625px){
  .site-footer{
    padding: 8px 10px;
  }
  .site-footer .sub{
    font-size: 12px;
    line-height: 1.3;
  }
}

/* ===== Footer: extra squeeze for phone landscape ===== */
@media (max-width: 625px) and (max-height: 450px){
  .site-footer{
    padding: 4px 8px;
  }
  .site-footer .sub{
    font-size: 11px;
    line-height: 1.2;
  }

  /* If your footer text uses <br>, kill it in landscape to save vertical space */
  .site-footer .sub br{
    display: none;
  }
}

/* Phone landscape: compact but readable footer */
@media (orientation: landscape) and (max-height: 500px){
  .site-footer{
    /* keep it roughly “header bar” sized, but not microscopic */
    max-height: 48px;
    padding: 6px 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .site-footer .sub{
    margin: 0;
    line-height: 1.15;
    text-align: center;

    /* allow up to 2 lines, then clip */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  /* remove forced line breaks to reduce height pressure */
  .site-footer .sub br{ display: none; }
}

/* iOS Safari in landscape tends to autosize text; keep it a notch smaller */
@supports (-webkit-touch-callout: none){
  @media (orientation: landscape) and (max-height: 500px){
    .site-footer .sub{ font-size: 9px; }
  }
}

/* everyone else (Android etc.) */
@media (orientation: landscape) and (max-height: 500px){
  .site-footer .sub{ font-size: 12px; }
}

/* Phone landscape (touch devices): tighten footer without going microscopic */
@media (hover: none) and (pointer: coarse) and (orientation: landscape){
  .site-footer{
    padding: 6px 10px;
  }

  .site-footer .sub{
    font-size: 12px;
    line-height: 1.2;
  }

  /* if your footer text contains <br>, kill it in landscape */
  .site-footer .sub br{
    display: none;
  }
}

/* iOS Safari: prevent landscape text autosizing from blowing the footer up */
@supports (-webkit-touch-callout: none){
  @media (hover: none) and (pointer: coarse) and (orientation: landscape){
    html{ -webkit-text-size-adjust: 100%; }
    .site-footer .sub{ font-size: 11px !important; }
  }
}



@media (max-width: 625px) and (orientation: portrait){

  /* Discography cards (the inline-flex divs under the Discography heading) */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]{
    display: grid !important;
    grid-template-columns: 120px 1fr;
    column-gap: 12px;
    row-gap: 6px;
    align-items: start;
  }

  /* Cover column */
h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]
> div[style*="flex:0 0 140px"]{
  grid-column: 1;
  grid-row: 1;              /* was: 1 / span 2 */
}
/*
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]
  > div[style*="flex:0 0 140px"]{
    grid-column: 1;
    grid-row: 1 / span 2;
  }
 */

  /* IMPORTANT: make the flex:1 wrapper “disappear” so its children become grid items */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]
  > div[style*="flex:1"]{
    display: contents !important;
  }

  /* Title + Don line stay in column 2 */
h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] p{
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  margin: 4px 0 0 !important;     /* tighten spacing */
}
/*
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] h3{
    grid-column: 2;
    grid-row: 1;
  }
 */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] p{
    grid-column: 2;
    grid-row: 2;
  }

  /* NOW the bullets can truly span both columns */
h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] ul{
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  margin-top: 6px !important;
}
/*
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] ul{
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    margin-top: 6px !important;
  }
 */

  /* Make the cover fit the new column */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"] img{
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 625px) and (orientation: portrait){

  /* Add a divider between releases (CSS “hr”) */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]{
    position: relative;
    padding-bottom: 12px;   /* space for the divider */
    margin-bottom: 12px;    /* space after the divider */
  }

  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]::after{
    content: "";
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(255,255,255,.18);
    margin-top: 10px;
  }

  /* Don’t draw it after the last one */
  h2#releases ~ div[style*="display:flex"][style*="gap:16px"][style*="align-items:flex-start"]:last-of-type::after{
    content: none;
  }
}

/* Music page: pull content inward on phone landscape (capsule/corners) */
@media (hover:none) and (pointer:coarse) and (orientation:landscape) and (max-height: 500px){
  body.page-music .page-wrap--music{
    padding-left: 60px !important;
    padding-right: 60px !important;
  }
  body.page-archive .page-wrap--archive{
    padding-left: 30px !important;
    padding-right: 10px !important;
  }
  body.page-archive-item .page-wrap--archive-item{
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}
