/*
  HaydenZOfficial ArtZGallery — Royal Neocities Overhaul
  Replace the repository's existing styles.css with this file.
*/

:root {
  --bg: #13001f;
  --bg-2: #240037;
  --surface: #2c1045;
  --surface-2: #3a1757;
  --surface-3: #511f72;
  --ink: #fff8cf;
  --muted: #d9c8e8;
  --line: rgba(255, 222, 92, 0.38);
  --purple: #7b2cbf;
  --purple-bright: #b45cff;
  --purple-dark: #2b083e;
  --gold: #ffdc55;
  --gold-bright: #fff19a;
  --amber: #f3a712;
  --pink: #ff6fd8;
  --cyan: #76f7ff;
  --dark: #100018;
  --light: #fff8cf;
  --success: #86ff9f;
  --danger: #ff6b8d;
  --radius: 0.35rem;
  --shadow: 0 0 0 2px rgba(255, 220, 85, 0.18),
            0 18px 55px rgba(8, 0, 18, 0.68),
            0 0 34px rgba(180, 92, 255, 0.25);
  --max-width: 1420px;
  --pixel-shadow: 3px 3px 0 #1b0029, 6px 6px 0 rgba(255, 220, 85, 0.25);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold) var(--purple-dark);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, Geneva, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at 14% 10%, rgba(180, 92, 255, 0.32), transparent 27rem),
    radial-gradient(circle at 86% 18%, rgba(255, 220, 85, 0.17), transparent 24rem),
    radial-gradient(circle at 70% 80%, rgba(123, 44, 191, 0.28), transparent 30rem),
    linear-gradient(145deg, #0e0018 0%, #25003b 43%, #3d1258 72%, #160021 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.82) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,220,85,.78) 0 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(180,92,255,.72) 0 1px, transparent 1.6px);
  background-position: 0 0, 37px 51px, 83px 17px;
  background-size: 113px 113px, 149px 149px, 191px 191px;
  opacity: .5;
  animation: star-drift 34s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(17, 0, 30, .11) 4px
  );
  mix-blend-mode: multiply;
  opacity: .65;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

h1, h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.045em;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.2rem, 8.5vw, 8.3rem);
  color: var(--gold-bright);
  text-shadow:
    2px 2px 0 #501778,
    5px 5px 0 #1b0028,
    0 0 24px rgba(255, 220, 85, .28);
}

h2 {
  font-size: clamp(2.6rem, 5.4vw, 5.6rem);
  color: var(--gold-bright);
  text-shadow: 3px 3px 0 rgba(75, 10, 108, .9);
}

h3 {
  margin-bottom: .5rem;
  font-size: 1.35rem;
  letter-spacing: -.025em;
}

::selection { background: var(--gold); color: #24002f; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  padding: .75rem 1rem;
  color: #1a0224;
  background: var(--gold);
  border: 2px solid #fff2a1;
  box-shadow: 4px 4px 0 #33004a;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: .7rem auto 0;
  padding: .8rem 1rem;
  background:
    linear-gradient(90deg, rgba(35, 0, 53, .95), rgba(78, 19, 109, .92), rgba(35, 0, 53, .95));
  border: 2px solid var(--gold);
  box-shadow: 5px 5px 0 rgba(9, 0, 18, .82), 0 0 25px rgba(180,92,255,.32);
  backdrop-filter: blur(16px);
}

.site-header::before,
.site-header::after {
  content: "✦";
  position: absolute;
  top: 50%;
  color: var(--gold);
  font-size: .7rem;
  transform: translateY(-50%);
}
.site-header::before { left: -.45rem; }
.site-header::after { right: -.45rem; }

.brand {
  display: inline-flex;
  gap: .7rem;
  align-items: center;
  color: var(--gold-bright);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #28003b;
}

.brand-logo {
  width: 3.15rem;
  height: 3.15rem;
  flex: 0 0 auto;
  object-fit: contain;
  filter:
    drop-shadow(3px 3px 0 rgba(25, 0, 37, .95))
    drop-shadow(0 0 10px rgba(180, 92, 255, .72))
    drop-shadow(0 0 5px rgba(255, 220, 85, .42));
  transform: rotate(-3deg);
  transition: transform 180ms ease, filter 180ms ease;
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  filter:
    drop-shadow(4px 4px 0 rgba(25, 0, 37, .95))
    drop-shadow(0 0 15px rgba(180, 92, 255, .9))
    drop-shadow(0 0 9px rgba(255, 220, 85, .72));
  transform: rotate(3deg) scale(1.08);
}

.site-nav {
  display: flex;
  gap: .55rem;
  align-items: center;
}

.site-nav a,
.nav-admin,
.site-footer a {
  padding: .48rem .72rem;
  color: var(--gold-bright);
  background: rgba(19,0,31,.45);
  border: 1px solid rgba(255,220,85,.45);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  font-weight: 900;
  cursor: pointer;
}

.nav-admin { appearance: none; }

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-admin:hover,
.nav-admin:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: #21002d;
  background: var(--gold);
  box-shadow: 3px 3px 0 #160020;
  transform: translate(-1px, -1px);
}

.menu-button {
  display: none;
  width: 2.9rem;
  height: 2.6rem;
  padding: .65rem;
  background: var(--gold);
  border: 2px solid #fff4ad;
  box-shadow: 3px 3px 0 #1a0027;
  cursor: pointer;
}

.menu-button span:not(.sr-only) {
  display: block;
  height: 3px;
  margin: 4px 0;
  background: #24002f;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, .85fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  width: min(calc(100% - 1.4rem), var(--max-width));
  min-height: min(860px, calc(100dvh - 6rem));
  margin: 1.5rem auto 0;
  padding: clamp(3rem, 7vw, 7rem) clamp(1.2rem, 4vw, 4.5rem);
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,.025)),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,220,85,.07) 40px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,220,85,.07) 40px),
    linear-gradient(135deg, rgba(28,0,43,.96), rgba(77,18,108,.85) 56%, rgba(27,0,43,.95));
  border: 3px double var(--gold);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "ROYAL DIGITAL ARCHIVE  ✦  ROYAL DIGITAL ARCHIVE  ✦  ROYAL DIGITAL ARCHIVE";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: .38rem 0;
  overflow: hidden;
  color: #2b0538;
  background: linear-gradient(90deg, var(--gold), #fff1a3, var(--gold));
  border-bottom: 2px solid #5b1d72;
  white-space: nowrap;
  font-family: monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.hero::after {
  content: "✦";
  position: absolute;
  right: 3%;
  bottom: 2%;
  color: rgba(255,220,85,.35);
  font-size: clamp(8rem, 20vw, 22rem);
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(180,92,255,.25));
  transform: rotate(14deg);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 3; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .28rem .58rem;
  color: #250031;
  background: var(--gold);
  border: 2px solid #fff4ae;
  box-shadow: 3px 3px 0 #400057;
  font-family: monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow::before { content: "✦"; }

.hero-text {
  max-width: 38rem;
  margin-bottom: 2rem;
  color: #efe1ff;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  text-shadow: 1px 1px 0 #240031;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: .78rem 1.2rem;
  color: #250031;
  background: linear-gradient(#fff4a5, var(--gold));
  border: 2px solid #fff8c9;
  border-radius: 0;
  box-shadow: 5px 5px 0 #2a003b, 0 0 18px rgba(255,220,85,.18);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: .78rem;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.button::after { content: " ↗"; }
.button:hover, .button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #21002f, 0 0 28px rgba(255,220,85,.35);
  filter: saturate(1.15);
}
.button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #21002f; }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button-ghost { color: var(--gold-bright); background: rgba(60,11,88,.68); border-color: var(--gold); }
.button-light { color: #26002f; background: var(--gold-bright); border-color: #fffce5; }
.full-button { width: 100%; }

.hero-art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: min(65vw, 650px);
  perspective: 900px;
}

.hero-mascot-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 560px);
  aspect-ratio: 1;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  overflow: visible;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 231, 104, .28), transparent 38%),
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(255, 220, 85, .09) 18px 20px),
    linear-gradient(145deg, rgba(124, 38, 166, .96), rgba(41, 3, 61, .98) 68%);
  border: 7px solid var(--gold-bright);
  outline: 3px solid #260035;
  box-shadow:
    15px 15px 0 rgba(14, 0, 22, .72),
    -8px -8px 0 rgba(180, 92, 255, .25),
    0 0 40px rgba(255, 220, 85, .2);
  transform: rotate(1.5deg);
}

.hero-mascot-panel::before,
.hero-mascot-panel::after {
  content: "";
  position: absolute;
  z-index: 4;
  width: 26%;
  height: 38px;
  background: linear-gradient(90deg, rgba(255, 244, 165, .9), rgba(255, 220, 85, .72));
  border: 2px solid rgba(62, 0, 78, .85);
  box-shadow: 4px 4px 0 rgba(20, 0, 30, .48);
}

.hero-mascot-panel::before {
  top: -19px;
  left: 8%;
  transform: rotate(-8deg);
}

.hero-mascot-panel::after {
  right: 7%;
  bottom: -18px;
  transform: rotate(7deg);
}

.hero-mascot-gif {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 15px 0 rgba(19, 0, 28, .48))
    drop-shadow(0 0 18px rgba(255, 220, 85, .18));
}

.mascot-sticker {
  position: absolute;
  z-index: 5;
  padding: .38rem .62rem;
  color: #250031;
  background: var(--gold);
  border: 2px solid #fff4ae;
  box-shadow: 4px 4px 0 #310044;
  font-family: monospace;
  font-size: clamp(.58rem, 1vw, .75rem);
  font-weight: 900;
  letter-spacing: .12em;
  white-space: nowrap;
}

.mascot-sticker-top {
  top: 5%;
  right: -5%;
  transform: rotate(5deg);
}

.mascot-caption {
  position: absolute;
  z-index: 5;
  left: 4%;
  bottom: 4%;
  padding: .42rem .62rem;
  color: var(--gold-bright);
  background: rgba(30, 0, 43, .88);
  border: 2px solid var(--gold);
  box-shadow: 4px 4px 0 rgba(10, 0, 18, .8);
  font-family: monospace;
  font-size: clamp(.58rem, 1vw, .76rem);
  font-weight: 900;
  letter-spacing: .08em;
}

.mascot-spark {
  position: absolute;
  z-index: 6;
  color: var(--gold-bright);
  font-size: clamp(2.5rem, 5vw, 4.7rem);
  line-height: 1;
  text-shadow: 3px 3px 0 #3c0051, 0 0 18px rgba(255, 220, 85, .5);
  animation: mascot-twinkle 1.8s ease-in-out infinite;
}

.mascot-spark-one {
  top: 16%;
  left: -3%;
  transform: rotate(-12deg);
}

.mascot-spark-two {
  right: 2%;
  bottom: 16%;
  animation-delay: -.9s;
}

@keyframes mascot-twinkle {
  0%, 100% { opacity: .65; transform: scale(.9) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.14) rotate(8deg); }
}

/* Gallery */
.gallery-section {
  position: relative;
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: 3rem auto;
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 3vw, 3rem);
  background:
    radial-gradient(circle at 8% 12%, rgba(255,220,85,.1), transparent 20rem),
    linear-gradient(155deg, rgba(25,0,39,.96), rgba(61,15,88,.94));
  border: 3px ridge var(--gold);
  box-shadow: var(--shadow);
}

.gallery-section::before {
  content: "★ CLICK A PIECE TO ENTER FULLSCREEN ★";
  position: absolute;
  top: .8rem;
  right: 1rem;
  color: var(--gold);
  font-family: monospace;
  font-size: .66rem;
  letter-spacing: .1em;
  opacity: .82;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px dashed rgba(255,220,85,.55);
}

.gallery-count {
  margin-bottom: .55rem;
  padding: .3rem .55rem;
  color: #26002f;
  background: var(--gold);
  border: 2px solid #fff3a5;
  box-shadow: 3px 3px 0 #23002f;
  font-family: monospace;
  font-weight: 900;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: 2.5rem;
}

.filter-button {
  padding: .62rem .9rem;
  color: var(--gold-bright);
  background: rgba(33,0,48,.75);
  border: 2px solid rgba(255,220,85,.65);
  border-radius: 0;
  box-shadow: 3px 3px 0 rgba(14,0,22,.75);
  font-family: monospace;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-button::before { content: "[ "; }
.filter-button::after { content: " ]"; }
.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  color: #270033;
  background: var(--gold);
  border-color: #fff5af;
  transform: translate(-1px, -1px);
}

.gallery-grid {
  columns: 3 300px;
  column-gap: 1.35rem;
}

.art-card {
  break-inside: avoid;
  margin: 0 0 1.4rem;
  transform: rotate(-.5deg);
  transition: transform 180ms ease, filter 180ms ease;
}

.art-card:nth-child(3n + 2) { transform: rotate(.7deg); }
.art-card:nth-child(3n) { transform: rotate(-.25deg); }
.art-card:hover { position: relative; z-index: 2; transform: translateY(-7px) rotate(0); filter: saturate(1.08); }

.art-card-button {
  display: block;
  width: 100%;
  padding: .55rem;
  text-align: left;
  color: var(--ink);
  background: linear-gradient(145deg, #fff7c8, #e5be40);
  border: 3px solid #fff4a4;
  outline: 3px solid #2b043d;
  box-shadow: 9px 10px 0 rgba(13,0,20,.72), 0 0 25px rgba(180,92,255,.2);
  cursor: zoom-in;
}

.art-card-button:focus-visible { outline: 4px solid var(--cyan); outline-offset: 5px; }

.art-card-image-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 5);
  background:
    linear-gradient(45deg, #35104a 25%, transparent 25%),
    linear-gradient(-45deg, #35104a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #35104a 75%),
    linear-gradient(-45deg, transparent 75%, #35104a 75%),
    #21002f;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  border: 3px solid #270035;
}

.art-card-image-wrap::after {
  content: "VIEW ✦";
  position: absolute;
  right: .45rem;
  bottom: .45rem;
  padding: .22rem .38rem;
  color: #270033;
  background: var(--gold);
  border: 1px solid #fff8c5;
  font-family: monospace;
  font-size: .62rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.art-card:hover .art-card-image-wrap::after { opacity: 1; transform: translateY(0); }

.art-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease, filter 250ms ease;
}

.art-card:hover img { transform: scale(1.025); filter: contrast(1.05); }

.art-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: .75rem .45rem .2rem;
  color: #250031;
}

.art-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 900;
}

.art-card-category {
  flex: 0 0 auto;
  padding: .16rem .32rem;
  color: #fff3b1;
  background: #481062;
  border: 1px solid #270035;
  font-family: monospace;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.state-card {
  padding: clamp(2rem, 6vw, 5rem);
  color: var(--muted);
  text-align: center;
  background: rgba(30,0,45,.72);
  border: 2px dashed var(--gold);
  box-shadow: inset 0 0 35px rgba(180,92,255,.12);
}

.state-card h3 { color: var(--gold-bright); }
.empty-icon { display: block; margin-bottom: .7rem; color: var(--gold); font-size: 3rem; animation: twinkle 1.7s steps(2) infinite; }
.error-state { border-color: var(--danger); }

/* About + contact */
.about-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(300px, 1fr);
  gap: clamp(2rem, 8vw, 8rem);
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: 3rem auto;
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 4vw, 4rem);
  background:
    repeating-linear-gradient(135deg, rgba(255,220,85,.045) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, rgba(72,15,102,.93), rgba(26,0,41,.96));
  border: 3px double var(--gold);
  box-shadow: var(--shadow);
}

.about-copy {
  align-self: end;
  max-width: 42rem;
  padding: 1.3rem;
  color: #efe1ff;
  background: rgba(16,0,25,.55);
  border-left: 5px solid var(--gold);
  border-right: 1px solid rgba(255,220,85,.35);
  box-shadow: 7px 7px 0 rgba(10,0,18,.45);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.about-copy p:last-child { margin-bottom: 0; }

.contact-section {
  position: relative;
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: 3rem auto 0;
  padding: clamp(4rem, 10vw, 9rem) clamp(1rem, 5vw, 5rem);
  overflow: hidden;
  color: var(--light);
  background:
    radial-gradient(circle at 88% 50%, rgba(255,220,85,.23), transparent 18rem),
    linear-gradient(110deg, #170021, #6a1f8f 58%, #3b0c52);
  border: 3px ridge var(--gold);
  box-shadow: var(--shadow);
}

.contact-section::after {
  content: "✦ MESSAGE ME ✦ MESSAGE ME ✦ MESSAGE ME ✦";
  position: absolute;
  right: -3rem;
  bottom: 1.4rem;
  color: rgba(255,241,154,.16);
  font-family: "Arial Black", sans-serif;
  font-size: clamp(1.7rem, 5vw, 5rem);
  white-space: nowrap;
  transform: rotate(-7deg);
}

.contact-section h2 { position: relative; z-index: 2; max-width: 12ch; margin-bottom: 1.5rem; }
.contact-section > p:not(.eyebrow) { position: relative; z-index: 2; max-width: 42rem; margin-bottom: 2rem; color: #eadcf5; font-size: 1.15rem; }
.contact-section .button { position: relative; z-index: 2; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: 0 auto 1rem;
  padding: 1.25rem 1rem;
  color: #d9c8e8;
  background: #12001c;
  border: 2px solid rgba(255,220,85,.55);
  border-top: 0;
  font-family: monospace;
  font-size: .8rem;
}
.site-footer p { margin: 0; }

.footer-signature {
  display: inline-flex;
  gap: .75rem;
  align-items: center;
}

.footer-logo {
  width: 3.4rem;
  height: 3.4rem;
  flex: 0 0 auto;
  object-fit: contain;
  filter:
    drop-shadow(2px 2px 0 #250034)
    drop-shadow(0 0 8px rgba(180, 92, 255, .65));
}

/* Dialogs */
dialog {
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 3px solid var(--gold);
  border-radius: 0;
  box-shadow: 0 0 0 4px #250034, 0 30px 100px rgba(0,0,0,.82), 0 0 45px rgba(180,92,255,.45);
}

dialog::backdrop {
  background:
    radial-gradient(circle at center, rgba(64,14,91,.42), rgba(5,0,10,.92));
  backdrop-filter: blur(7px) saturate(.8);
}

/* Fullscreen viewer — fixes oversized/cropped artwork */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at center, rgba(74,20,103,.58), rgba(7,0,12,.98) 72%),
    #08000d;
  border: 0;
  box-shadow: none;
}

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
}

.lightbox-image-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(3.8rem, 6vh, 5rem) clamp(3.6rem, 6vw, 6.5rem) 1rem;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255,220,85,.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,220,85,.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(180,92,255,.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(180,92,255,.06) 75%);
  background-position: 0 0, 0 18px, 18px -18px, -18px 0;
  background-size: 36px 36px;
}

.lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 35px rgba(0,0,0,.7));
}

.lightbox figcaption {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 2rem;
  max-height: min(28dvh, 240px);
  padding: 1rem clamp(1rem, 6vw, 6rem) 1.25rem;
  overflow: auto;
  color: #fff7cf;
  background:
    linear-gradient(90deg, rgba(31,0,47,.98), rgba(85,20,119,.98), rgba(31,0,47,.98));
  border-top: 3px solid var(--gold);
  box-shadow: 0 -10px 35px rgba(0,0,0,.48);
}

.lightbox figcaption::before {
  content: "NOW VIEWING";
  position: absolute;
  top: 0;
  right: 1rem;
  padding: .1rem .35rem;
  color: #290034;
  background: var(--gold);
  font-family: monospace;
  font-size: .6rem;
  font-weight: 900;
}

.lightbox figcaption h2 {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  letter-spacing: -.025em;
  text-shadow: 2px 2px 0 #250035;
}

.lightbox figcaption > p {
  align-self: end;
  margin-bottom: 0;
  color: #eadcf5;
}

.lightbox-category {
  margin-bottom: .35rem;
  color: var(--gold);
  font-family: monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-nav,
.icon-button {
  position: absolute;
  z-index: 8;
  display: grid;
  place-items: center;
  color: #260033;
  background: var(--gold);
  border: 2px solid #fff5b1;
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(22,0,32,.88);
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.icon-button:hover { color: var(--gold-bright); background: var(--purple); }

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  font-size: 1.8rem;
}

.lightbox-nav {
  top: 50%;
  width: 3.1rem;
  height: 3.1rem;
  font-size: 1.2rem;
  transform: translateY(-50%);
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* Admin dashboard */
.admin-dialog {
  width: min(96vw, 1180px);
  max-height: 94dvh;
  overflow: auto;
  background:
    repeating-linear-gradient(135deg, rgba(255,220,85,.035) 0 2px, transparent 2px 16px),
    var(--surface);
}

.edit-dialog { width: min(94vw, 620px); max-height: 92dvh; overflow: auto; }

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  color: var(--ink);
  background: rgba(39,4,56,.96);
  border-bottom: 3px solid var(--gold);
  backdrop-filter: blur(12px);
}

.dialog-header h2 {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.compact-header { position: relative; }
.icon-button { position: static; flex: 0 0 auto; width: 2.8rem; height: 2.8rem; font-size: 1.5rem; }

.auth-panel { width: min(100%, 520px); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem); }
.panel-intro { margin-bottom: 1.5rem; }
.panel-intro p:last-child { color: var(--muted); }
.stack-form { display: grid; gap: 1rem; }
.stack-form label { display: grid; gap: .45rem; color: var(--gold-bright); font-family: monospace; font-size: .82rem; font-weight: 900; text-transform: uppercase; }

input, textarea, select {
  width: 100%;
  padding: .82rem .9rem;
  color: #fff8d7;
  background: #190024;
  border: 2px solid rgba(255,220,85,.55);
  border-radius: 0;
  outline: 0;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.22);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(180,92,255,.28); }
.optional { color: var(--muted); font-weight: 500; text-transform: lowercase; }
.form-status { min-height: 1.4rem; margin: 0; font-size: .88rem; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }

.dashboard { padding: 0 1.3rem 1.3rem; }
.dashboard-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.3rem 0;
  padding: .8rem .95rem;
  color: var(--gold-bright);
  background: rgba(17,0,27,.72);
  border: 2px solid rgba(255,220,85,.45);
}
.dashboard-label { margin-bottom: .1rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.signed-in-email { margin: 0; font-weight: 900; }
.text-button { padding: .3rem .5rem; color: var(--gold); background: transparent; border: 1px solid var(--gold); cursor: pointer; }

.dashboard-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(380px, 1.2fr); gap: 1.3rem; align-items: start; }
.upload-panel, .manage-panel { padding: 1.2rem; background: rgba(23,0,35,.72); border: 2px solid var(--gold); box-shadow: 6px 6px 0 rgba(8,0,14,.5); }

.file-drop-zone {
  position: relative;
  display: grid !important;
  place-items: center;
  min-height: 220px;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--gold-bright);
  text-align: center;
  background:
    linear-gradient(45deg, rgba(180,92,255,.09) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(180,92,255,.09) 25%, transparent 25%),
    #14001f;
  background-size: 26px 26px;
  border: 2px dashed var(--gold);
  cursor: pointer;
}
.file-drop-zone:hover, .file-drop-zone.is-dragging { background-color: #2f0a44; border-color: var(--gold-bright); }
.file-drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop-zone > span:last-of-type { color: var(--muted); font-weight: 500; font-size: .78rem; }
.upload-symbol { color: var(--gold); font-size: 2.4rem; }
.file-drop-zone.has-preview { min-height: 300px; padding: 0; background: #09000e; border-style: solid; }
.file-drop-zone.has-preview > span, .file-drop-zone.has-preview > strong { display: none; }
.upload-preview, #upload-preview { width: 100%; height: 100%; max-height: 420px; object-fit: contain; }

.manage-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.count-pill { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .6rem; color: #270033; background: var(--gold); border: 2px solid #fff5ad; font-family: monospace; font-size: .78rem; font-weight: 900; }
.manage-list { display: grid; gap: .65rem; max-height: 720px; overflow: auto; padding-right: .25rem; }
.manage-item { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .65rem; background: rgba(42,8,60,.85); border: 1px solid rgba(255,220,85,.38); }
.manage-item img { width: 74px; height: 74px; object-fit: cover; background: var(--surface-2); border: 2px solid var(--gold); }
.manage-info { display: grid; min-width: 0; }
.manage-info strong { overflow: hidden; color: var(--gold-bright); text-overflow: ellipsis; white-space: nowrap; }
.manage-info span { color: var(--muted); font-size: .76rem; }
.manage-actions { display: flex; gap: .45rem; }
.manage-actions button { padding: .42rem .58rem; color: var(--gold-bright); background: #1a0028; border: 1px solid var(--gold); cursor: pointer; }
.manage-actions button:hover { color: #250031; background: var(--gold); }

/* Motion */
@keyframes star-drift { to { background-position: 113px 113px, -112px 200px, 274px -174px; } }
@keyframes twinkle { 0%, 100% { opacity: .75; transform: scale(.88) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { min-height: 570px; }
  .gallery-grid { columns: 2 270px; }
  .about-section { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body::after { opacity: .4; }

  .site-header { align-items: center; }
  .brand-logo { width: 2.65rem; height: 2.65rem; }
  .brand { gap: .5rem; font-size: .88rem; }
  .menu-button { display: block; }
  .site-nav {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    display: none;
    width: min(20rem, calc(100vw - 1.4rem));
    padding: .75rem;
    background: #260037;
    border: 2px solid var(--gold);
    box-shadow: 7px 7px 0 rgba(10,0,18,.72);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a, .nav-admin { width: 100%; text-align: left; }

  .hero { padding-top: 4.6rem; }
  .hero-art { min-height: 460px; }
  .hero-mascot-panel { width: min(92vw, 510px); border-width: 5px; }

  .section-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .gallery-section::before { position: static; display: block; margin-bottom: 1rem; }
  .gallery-grid { columns: 1; }
  .art-card { transform: none !important; }

  .lightbox figure { grid-template-rows: minmax(0, 1fr) auto; }
  .lightbox-image-wrap { padding: 4.3rem .75rem .75rem; }
  .lightbox figcaption {
    grid-template-columns: 1fr;
    gap: .55rem;
    max-height: 35dvh;
    padding: .85rem 1rem 1rem;
  }
  .lightbox figcaption > p { font-size: .88rem; }
  .lightbox-nav { top: auto; bottom: calc(min(35dvh, 260px) + .8rem); width: 2.7rem; height: 2.7rem; transform: none; }
  .lightbox-prev { left: .65rem; }
  .lightbox-next { right: .65rem; }
  .lightbox-close { top: .65rem; right: .65rem; width: 2.7rem; height: 2.7rem; }

  .site-footer { flex-direction: column; }
  .admin-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; }
  .dashboard { padding: 0 .75rem 1rem; }
  .dialog-header { padding: 1rem; }
  .dashboard-bar { align-items: start; }
  .upload-panel, .manage-panel { padding: 1rem; }
  .manage-item { grid-template-columns: 58px minmax(0, 1fr); }
  .manage-item img { width: 58px; height: 58px; }
  .manage-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(2.75rem, 16vw, 4.5rem); }
  .hero-art { min-height: 360px; }
  .hero-mascot-panel { width: min(88vw, 390px); padding: 1rem; }
  .mascot-sticker-top { right: -1%; }
  .mascot-caption { max-width: 82%; }
  .filters { gap: .45rem; }
  .filter-button { padding: .52rem .62rem; font-size: .7rem; }
}



/* ================================================================
   HadenZ link portal / commissions hub
   ================================================================ */
.artist-only-action {
  position: relative;
}

.contact-heading {
  position: relative;
  z-index: 2;
}

.link-marquee {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: .45rem 1rem;
  overflow: hidden;
  color: #2a0036;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold));
  border-bottom: 2px solid #fff7b4;
  font-family: monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  white-space: nowrap;
  text-align: center;
  text-shadow: none;
}

.featured-link-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}

.featured-link,
.social-link {
  --card-accent: var(--gold);
  position: relative;
  color: var(--ink);
  text-decoration: none;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 15%, transparent), transparent 58%),
    rgba(18, 0, 28, .9);
  border: 2px solid var(--card-accent);
  box-shadow: 6px 6px 0 rgba(8, 0, 14, .72), 0 0 22px color-mix(in srgb, var(--card-accent) 22%, transparent);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.featured-link:hover,
.featured-link:focus-visible,
.social-link:hover,
.social-link:focus-visible {
  outline: 0;
  transform: translate(-3px, -3px) rotate(-.35deg);
  box-shadow: 10px 10px 0 rgba(8, 0, 14, .82), 0 0 34px color-mix(in srgb, var(--card-accent) 40%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 25%, transparent), transparent 62%),
    rgba(31, 3, 46, .98);
}

.featured-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 150px;
  padding: 1.2rem;
  overflow: hidden;
}

.featured-link::before {
  content: "";
  position: absolute;
  right: -2.5rem;
  bottom: -2.5rem;
  width: 8rem;
  height: 8rem;
  border: 1px dashed color-mix(in srgb, var(--card-accent) 50%, transparent);
  transform: rotate(25deg);
}

.link-icon,
.social-icon {
  display: grid;
  place-items: center;
  color: #21002c;
  background: var(--card-accent);
  border: 2px solid #fff8cc;
  box-shadow: 3px 3px 0 #21002e;
  font-family: "Arial Black", Impact, sans-serif;
  font-weight: 900;
}

.link-icon {
  width: 3.4rem;
  height: 3.4rem;
  font-size: 1.5rem;
  transform: rotate(-4deg);
}

.link-copy {
  display: grid;
  gap: .25rem;
}

.link-copy strong {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
}

.link-copy > span:last-child {
  color: #e8daf3;
  font-size: .9rem;
}

.link-kicker {
  color: var(--card-accent);
  font-family: monospace;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.link-arrow {
  align-self: start;
  color: var(--card-accent);
  font-size: 1.4rem;
  font-weight: 900;
}

.links-section {
  position: relative;
  width: min(calc(100% - 1.4rem), var(--max-width));
  margin: 2rem auto 0;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem);
  background:
    repeating-linear-gradient(90deg, rgba(255, 220, 85, .04) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(0deg, rgba(180, 92, 255, .05) 0 1px, transparent 1px 38px),
    linear-gradient(145deg, rgba(24, 0, 37, .97), rgba(77, 17, 108, .95));
  border: 3px double var(--gold);
  box-shadow: var(--shadow);
}

.links-section::before,
.links-section::after {
  position: absolute;
  color: var(--gold);
  font-size: 1.4rem;
  content: "✦";
}
.links-section::before { top: .65rem; left: .8rem; }
.links-section::after { right: .8rem; bottom: .65rem; }

.links-heading {
  margin-bottom: 2rem;
}

.links-heading h2 {
  max-width: 13ch;
}

.links-stamp {
  margin: 0;
  padding: .75rem .9rem;
  color: var(--gold-bright);
  background: #180023;
  border: 2px dashed var(--gold);
  box-shadow: 4px 4px 0 rgba(8, 0, 14, .7);
  font-family: monospace;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.35;
  text-align: center;
  transform: rotate(2deg);
}

.social-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.social-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  min-height: 92px;
  padding: .9rem;
}

.social-icon {
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.15rem;
}

.social-link > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.social-link strong {
  color: var(--gold-bright);
  font-size: 1rem;
}

.social-link small {
  overflow: hidden;
  color: var(--muted);
  font-family: monospace;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-link > span:last-child {
  color: var(--card-accent);
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: flex-end;
}

.platform-trello { --card-accent: #72a8ff; }
.platform-kofi { --card-accent: #ffcf62; }
.platform-paypal { --card-accent: #67b7ff; }
.platform-discord { --card-accent: #9e95ff; }
.platform-youtube { --card-accent: #ff6e7e; }
.platform-twitch { --card-accent: #bd8cff; }
.platform-tiktok { --card-accent: #73f7ff; }
.platform-instagram { --card-accent: #ff8bd8; }
.platform-x { --card-accent: #f2eaff; }
.platform-gamejolt { --card-accent: #b9ff63; }

@media (max-width: 900px) {
  .featured-link-grid,
  .social-link-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .featured-link-grid,
  .social-link-grid {
    grid-template-columns: 1fr;
  }

  .featured-link {
    min-height: 132px;
    padding: 1rem;
  }

  .links-stamp {
    align-self: flex-start;
  }

  .site-footer,
  .footer-links {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
