@media (max-width: 800px) {
  .shop-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--bg);
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }
  .shop-content {
    padding-top: 4.2rem; /* space for fixed header */
  }
}
/* =========================
   TOKENS + RESET
   ========================= */
:root {
  --bg: #0a0704;
  --panel: #120e09;
  --gold: #dd9139;
  --gold-dim: rgba(185, 131, 72, 0.42);
  --gold-glow: rgba(185, 131, 72, 0.18);
  --text: #dd9139;
  --text-dim: #dd9139;

  --font-title: clamp(0.9rem, 2.9vw, 1.7rem);
  --font-heading: clamp(0.8rem, 2vw, 1rem);
  --font-base: clamp(0.95rem, 1.9vw, 1.05rem);
  --font-small: clamp(0.8rem, 1vw, 0.95rem);

  --page-pad: clamp(1rem, 3vw, 2.5rem);

  --spacing-xs: 0.35rem;
  --spacing-sm: 0.6rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2.5rem;
}

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

/* =========================
   SCROLLBARS
   ========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg);
}

/* WebKit (Chrome / Safari / Edge) */
*::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

*::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 0 !important;
}

*::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 0 !important;
  -webkit-border-radius: 0 !important;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}

*::-webkit-scrollbar-corner {
  background: var(--bg);
}

/* Guaranteed square scrollbar (overlay) for selected scroll containers */
.sb-square {
  scrollbar-width: none; /* Firefox: hide native */
  -ms-overflow-style: none; /* legacy Edge */
}

.sb-square::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sb-square .sb-square__track {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  background: var(--bg);
  pointer-events: none;
  z-index: 5;
}

.sb-square .sb-square__thumb {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: var(--gold);
  border-radius: 0;
}

html,
body {
  height: 100%;
  overflow-x: hidden; /* prevent horizontal scrolling globally */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Victor Mono", "Rajdhani", monospace;
  font-size: var(--font-base);
  line-height: 1.6;
  letter-spacing: 0.05em;

  /* Desktop/tablet: no scroll */
  height: 100svh;
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
}

/* Hide any Netlify branding or badge that may be injected by the host/site. */
img[src*="netlify"],
a[href*="netlify.com"],
[id*="netlify"],
[class*="netlify"],
[alt*="Netlify"],
[title*="Netlify"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Background overlays */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nav-item.active::before {
  content: "▶";
  opacity: 1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.015) 0%,
      rgba(255, 255, 255, 0.015) 0.2%,
      transparent 0%,
      transparent 0.6%
    ),
    repeating-linear-gradient(
      to right,
      rgba(0, 0, 0, 0.12) 0%,
      rgba(0, 0, 0, 0.12) 0.2%,
      transparent 0.2%,
      transparent 0.8%
    );
  mix-blend-mode: soft-light;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
}

/* =========================
   SHOP PAGE
   ========================= */
body.shop-page {
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
}

@media (max-width: 800px) {
  body.shop-page {
    height: auto;
    min-height: 100svh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .shop-page .main-wrapper,
  .shop-content {
    overflow: visible;
  }
}

.shop-page .main-wrapper {
  overflow: hidden;
  min-height: 0;
}

.sidebar-blurb {
  padding-right: 1rem;
}

.shop-content {
  grid-template-rows: auto 1fr auto;
  gap: var(--spacing-md);
  overflow: hidden;
}

.product-hero {
  display: grid;
  gap: var(--spacing-md);
}

.product-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
  border-top: 1px solid var(--gold-dim);
  padding-top: var(--spacing-sm);
}

.product-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-buttons {
  display: inline-flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.thumb-strip {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.thumb-strip .thumb {
  background: none;
  border: 1px solid var(--gold-dim);
  padding: 0.15rem;
  cursor: pointer;
}

.thumb-strip .thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.shop-info-grid .info-box {
  height: 100%;
}

.product-stock {
  color: var(--text-dim);
  font-size: var(--font-small);
}

.shop-header {
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing5-s rrm);
}

@media (max-width: 800px) {
  .shop-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .content-title {
    order: 1;
    text-align: left;
    flex: 1 1 0;
  }
  .shop-header-right {
    order: 2;
    text-align: right;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
  }
  .product-price {
    font-size: 1.1rem;
    color: var(--gold);
    margin-left: auto;
  }
}

.shop-header-right {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.shop-status {
  font-size: var(--font-small);
  color: var(--text-dim);
}

.shop-status.success {
  color: #62c88a;
}

.shop-status.error {
  color: #d66a6a;
}

.shop-status.info {
  color: var(--text-dim);
}

.shop-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: var(--spacing-sm);
}

.filter-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.filter-group.secondary {
  margin-left: auto;
}

.filter-pill {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--gold-glow);
  box-shadow: 0 0 6px var(--gold-glow);
}

.filter-select,
.filter-input {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 0.45rem 0.6rem;
  min-width: 180px;
}

.filter-input::placeholder {
  color: var(--text-dim);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  align-content: start;
}

.product-card {
  border: 1px solid var(--gold-dim);
  background: rgba(18, 14, 9, 0.75);
  box-shadow: 0 0 10px rgba(185, 131, 72, 0.08);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
}

.product-card__media {
  border: 1px solid var(--gold);
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #0d0a06;
  border: 1px solid var(--gold-dim);
}

.thumb-row {
  display: flex;
  gap: var(--spacing-xs);
}

.thumb {
  background: none;
  border: 1px solid var(--gold-dim);
  padding: 0.15rem;
  cursor: pointer;
}

.thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.product-row {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-sm);
}

.product-name {
  font-size: var(--font-heading);
  color: var(--gold);
}

.product-sub {
  color: var(--text-dim);
  font-size: var(--font-small);
}

.product-price {
  font-size: 1.1rem;
  color: var(--gold);
}

.product-stock {
  font-size: var(--font-small);
  color: var(--text-dim);
}

.product-desc {
  font-size: var(--font-small);
  color: var(--text-dim);
  line-height: 1.5;
}

.product-meta {
  font-size: var(--font-small);
  color: var(--gold);
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-xs);
}

.btn {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.5rem 1rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--gold-glow);
  box-shadow: 0 0 8px var(--gold-glow);
}

.btn.ghost {
  background: none;
}

.size-picker {
  display: flex;
  gap: var(--spacing-xs);
  margin: var(--spacing-xs) 0;
}

.size-pill {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.size-pill.active,
.size-pill:hover {
  border-color: var(--gold);
}

.size-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.empty-state {
  border: 1px solid var(--gold-dim);
  padding: var(--spacing-md);
  text-align: center;
  color: var(--text-dim);
}

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

/* =========================
   CART DRAWER
   ========================= */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 90vw);
  height: 100vh;
  background: #0f0c08;
  border-left: 1px solid var(--gold-dim);
  box-shadow: -6px 0 14px rgba(0, 0, 0, 0.5);
  padding: var(--spacing-md);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--spacing-sm);
  z-index: 20;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer__body {
  overflow-y: auto;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
  padding: var(--spacing-sm) 0;
}

.cart-drawer__footer {
  display: grid;
  gap: var(--spacing-xs);
  padding-bottom: 4rem;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.cart-close,
.cart-remove,
.qty-btn {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  cursor: pointer;
  padding: 0.15rem 0.45rem;
}

.cart-items {
  display: grid;
  gap: var(--spacing-sm);
}

.cart-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--spacing-sm);
  align-items: center;
  border: 1px solid var(--gold-dim);
  padding: var(--spacing-xs);
}

.cart-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--gold-dim);
}

.cart-row__meta {
  display: grid;
  gap: 0.1rem;
}

.cart-row__title {
  color: var(--gold);
}

.cart-row__sub {
  color: var(--text-dim);
  font-size: var(--font-small);
}

.cart-row__price {
  color: var(--gold);
}

.cart-row__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.cart-subtotal {
  font-weight: 600;
}

.cart-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

.cart-multi {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.cart-empty {
  text-align: center;
  color: var(--text-dim);
}

/* =========================
   TOP BAR
   ========================= */
.top-bar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto; /* left / title / right */
  align-items: center;
  gap: 1rem;

  padding: 1.2rem var(--page-pad) 1rem;
  border-bottom: 1px solid var(--gold-dim);
  background: var(--bg);
}

/* Prevent wrapping so it stays on one line */
.top-bar,
.top-bar * {
  white-space: nowrap;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ozzy-label {
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  font-size: var(--font-small);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ozzy-label:hover {
  background: var(--gold-glow);
}

.top-bar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0; /* critical for ellipsis */
}

.title {
  font-size: var(--font-small);
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.12em;
  font-family: "Rajdhani", "Victor Mono", monospace;

  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
}

.cart-btn {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.35rem 0.7rem;
  font-size: var(--font-small);
  line-height: 1.6;
  min-height: calc(var(--font-small) * 1.6 + 0.7rem);
  min-width: calc(var(--font-small) * 1.6 + 0.7rem);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.cart-btn:hover {
  background: var(--gold-glow);
  box-shadow: 0 0 8px var(--gold-glow);
}

.date-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.date,
.time {
  color: var(--gold);
  font-size: var(--font-small);
  letter-spacing: 0.08em;
  font-weight: 400;
  font-family: "Rajdhani", "Victor Mono", monospace;
}

/* =========================
   MAIN LAYOUT
   ========================= */
.main-wrapper {
  position: relative;
  z-index: 2;

  display: grid;
  grid-template-columns: minmax(240px, 26%) 1fr;
  gap: clamp(1rem, 2vw, 1.4rem);

  padding: 0 var(--page-pad);
  width: 100%;

  min-height: 0; /* critical */
  overflow: hidden;
}

/* Sidebar: desktop/tablet no scroll */
.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--gold-dim);
  padding: 1rem 0 1.4rem;

  min-height: 0;
  overflow: hidden;

  /* Let sidebar text react to the available frame height instead of
     clipping/overflowing when space is tight. */
  container-type: size;
  container-name: sidebar;
}

/* Text inside the sidebar wraps and scales down with the frame's height
   so it always fits instead of being clipped. */
.sidebar .info-header,
.sidebar .info-list li,
.sidebar .description-text,
.sidebar .edu-school,
.sidebar .sidebar-blurb,
.sidebar .portfolio-btn {
  white-space: normal;
  overflow-wrap: break-word;
}

.sidebar .info-header {
  font-size: clamp(0.6rem, 1.6cqh, 0.95rem);
}

.sidebar .info-list li,
.sidebar .description-text,
.sidebar .sidebar-blurb {
  font-size: clamp(0.62rem, 2.5cqh, 0.95rem);
}

.sidebar .edu-school {
  font-size: clamp(0.55rem, 2.1cqh, 0.8rem);
}

.sidebar .info-box {
  padding: clamp(0.4rem, 2cqh, 1rem);
}

.sidebar .info-list {
  gap: clamp(0.15rem, 0.8cqh, 0.6rem);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: var(--font-small);
  font-weight: 500;
  cursor: pointer;
  padding: 0.65rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  justify-content: flex-start;
}

.menu-icon {
  font-size: 120%;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 2cqh, 1.4rem);
}

body.portfolio-page .sidebar {
  overflow: hidden;
}

body.portfolio-page .sidebar-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.portfolio-btn {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.65rem 1.2rem;
  font-size: clamp(0.75rem, 3.6cqh, 18px);
  font-family: "Rajdhani", monospace;
  cursor: default;
  font-weight: 600;
  pointer-events: none;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 0.7rem;
}

.section-header {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 18px;
  text-align: left;
  cursor: pointer;
  padding: 0.1rem 0;
  letter-spacing: 0.05em;
  font-family: "Rajdhani", monospace;
  font-weight: 400;
  transition: color 0.3s ease;
}

.section-header:hover {
  color: var(--text);
}

.section-items {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-height 0.3s ease;
  max-height: 100vh;
}

.section-items[hidden] {
  display: none;
}

.section-header[aria-expanded="false"] ~ .section-items {
  max-height: 0;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  padding: 0.25rem 0.2rem 0.25rem 0.65rem;
  font-family: "Rajdhani", monospace;
  transition: color 0.2s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--gold);
}

.nav-item.active {
  color: var(--gold);
  padding-left: calc(0.65rem + 4px);
}

/* =========================
   CONTENT AREA (DESKTOP/TABLET = NO SCROLL)
   ========================= */
.content-area {
  min-height: 0;
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr auto; /* header / artwork / info */
  gap: clamp(0.6rem, 1.2vw, 1rem);

  padding: clamp(0.8rem, 1.8vw, 1.6rem) clamp(1.1rem, 3vw, 2rem)
    clamp(2rem, 4vw, 3rem);
}

body.home-page .content-area {
  overflow: hidden;
  grid-template-rows: auto 1fr;
  align-content: start;
}

body.home-page .homepage-projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

body.home-page .homepage-project-card {
  display: grid;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  padding-top: 0.5rem;
}

body.home-page .homepage-project-title {
  font-size: var(--font-heading);
  color: var(--gold);
  letter-spacing: 0.08em;
  font-weight: 600;
}

body.home-page .homepage-project-link {
  display: flex;
  margin: auto;
  width: 80%;
  align-items: center;
  justify-content: center;
  min-height: min(60svh, 560px);
}

body.home-page .homepage-project-image {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Shrink + dim the spinning placeholder gif while the real artwork loads,
   so it doesn't look like a giant stretched spinner filling the card. */
body.home-page .homepage-project-image.is-loading {
  width: 25%;
  height: 25%;
  margin: auto;
  opacity: 0.6;
}

body.home-page .sidebar-content {
  gap: clamp(0.4rem, 2cqh, 1rem);
}

.sidebar-about-gif {
  width: 100%;
  height: auto;
  max-height: 55cqh;
  min-height: 0;
  flex-shrink: 1;
  object-fit: contain;
}

body.home-page .sidebar-blurb {
  color: var(--text-dim);
  font-size: clamp(0.62rem, 2.5cqh, 0.95rem);
  line-height: 1.55;
  padding: 0rem, 1rem;
}

/* Sticky header so artwork never overlaps */
.content-header {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.8rem;

  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--gold-dim);
}

.content-title {
  font-size: var(--font-heading);
  color: var(--gold);
  letter-spacing: 0.08em;
  font-weight: 600;
}

.project-section {
  color: var(--text-dim);
  font-size: calc(var(--font-small) * 0.8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Artwork */
.artwork-container {
  display: grid;
  grid-template-columns: auto 1fr auto; /* prev / frame / next */
  gap: 1.2rem;
  align-items: center;
  margin: 0;
}

.artwork-container[data-single-image="true"] {
  grid-template-columns: 1fr;
}

.arrow-btn {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border-radius: 2px;
}

.arrow-prev {
  grid-column: 1;
  justify-self: end;
}

.frame {
  grid-column: 2;
  justify-self: start;
}

.arrow-next {
  grid-column: 3; /* place to the right of the frame */
  justify-self: start;
}

.artwork-container[data-single-image="true"] .arrow-btn,
.artwork-container[data-single-image="true"] .arrow-prev,
.artwork-container[data-single-image="true"] .arrow-next {
  display: none;
}

.artwork-container[data-single-image="true"] .frame,
.artwork-container[data-single-image="true"] .portfolio-zoom-frame {
  grid-column: 1;
  justify-self: center;
}

.arrow-btn:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.frame {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none; /* remove outer frame line */
  padding: 0; /* remove inner spacing */
  background: none; /* remove background decoration */
  box-shadow: none; /* remove glow/shadows */

  width: 30%;
  height: min(275px, 30svh); /* keeps desktop from needing scroll */

  flex-shrink: 0;
  position: relative;
  justify-self: center; /* ensure horizontal centering in content-area */
  touch-action: pan-y; /* allow vertical scroll, block horizontal pan */
}

.frame::before {
  content: none; /* remove inner line */
}

.artwork-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ensure full image fits inside the frame */
  display: block;
  touch-action: pan-y; /* prevent horizontal panning moving layout */
}

/* =========================
   PORTFOLIO IMAGE ZOOM (scoped)
   ========================= */
#portfolio .portfolio-zoom-frame {
  overflow: visible; /* allow controls to sit outside frame */
}

#portfolio .portfolio-zoom-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden; /* clip zoomed image inside original frame */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}

@media (max-width: 800px) {
  #portfolio .portfolio-zoom-viewport {
    touch-action: pan-y;
  }
}

#portfolio .portfolio-zoom-controls {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  display: grid;
  gap: var(--spacing-xs);
  z-index: 3;
}

@media (min-width: 801px) {
  /* Align zoom controls with arrow-next positioning:
     arrow-next sits to the right of the frame by the grid gap (1.2rem)
     and has a fixed width (2.6rem). This places the zoom controls' right
     edge on the same vertical line as the arrow-next right edge. */
  #portfolio .portfolio-zoom-controls {
    top: 0;
    right: calc(-1.2rem - 2.6rem);
  }
}

#portfolio .portfolio-zoom-btn {
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 2px;
  font-family: "Rajdhani", monospace;
  font-size: 1.1rem;
  line-height: 1;
}

#portfolio .portfolio-zoom-btn:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

#portfolio .portfolio-zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#portfolio .artwork-img.portfolio-zoom-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transform: translate3d(var(--pz-x, 0px), var(--pz-y, 0px), 0)
    scale(var(--pz-scale, 1));
  transform-origin: center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

#portfolio .artwork-img.portfolio-zoom-img.pz-can-drag {
  cursor: grab;
}

#portfolio .artwork-img.portfolio-zoom-img.pz-dragging {
  cursor: grabbing;
}

.no-border {
  border: none;
}

.no-effects {
  background: none;
  box-shadow: none;
  padding: 0;
}

.about-img {
  object-fit: contain;
}

/* Info */
.info-grid {
  min-height: 0;
  overflow: hidden;

  display: grid;
  grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
  gap: 1.2rem;
  align-items: start;
  padding-bottom: 2rem;
}

/* ✅ IMPORTANT: allow grid children to shrink/expand without clipping */
.info-left,
.info-right {
  min-width: 0;
}

.info-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-box {
  border: 1px solid var(--gold-dim);
  padding: 1rem;

  /* ✅ CHANGED: do NOT hide overflow here (it can clip content) */
  overflow: visible;
}

/* ✅ Let the description box expand vertically to fit text */
.description-box {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;

  /* key: allow it to take more vertical space */
  height: auto;
  align-self: stretch;
}

.info-header {
  font-size: var(--font-small);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.info-list li {
  color: var(--text-dim);
  font-size: var(--font-small);
  position: relative;
  transition:
    background-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.info-list a {
  color: inherit;
  display: block;
  width: 100%;
  cursor: pointer;
  text-decoration: none;
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  color: var(--gold-dim);
}

.edu-school {
  font-size: 0.7em;
}

/* Hover highlight for About page lists */
.about-layout .info-list li:hover,
.info-grid .info-list li:hover {
  background: rgba(185, 131, 72, 0.12);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold-dim);
}

.description-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--gold-dim);
}

.year {
  color: var(--gold);
  font-size: var(--font-small);
  font-weight: 600;
}

/* ✅ CHANGED: remove clamp so text can fully show */
.description-text {
  color: var(--text-dim);
  font-size: var(--font-small);
  line-height: 1.8;

  /* allow full text */
  display: block;
  overflow: visible;

  /* safety for long words/urls */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.description-link {
  align-self: flex-end;
  color: var(--gold);
  text-decoration: underline;
  font-size: var(--font-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0;
  border: none;
  transition: all 0.3s ease;
}

.description-link:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* =========================
   BOTTOM NAV
   ========================= */
.bottomnav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 2.4rem;
  border-top: 1px solid var(--gold-dim);
  background: var(--bg);

  overflow: hidden; /* desktop/tablet no scroll */
}

.bottomnav::before {
  content: "";
  position: absolute;
  left: 1.4rem;
  top: 50%;
  width: 3.4rem;
  height: 1px;
  background: var(--gold-dim);
  transform: translateY(-50%);
}

.bottomnav::after {
  content: "";
  position: absolute;
  left: 1.4rem;
  top: calc(50% - 0.9rem);
  width: 1px;
  height: 1.8rem;
  background: var(--gold-dim);
}

.nav-bottom-item {
  background: none;
  border: none;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  font-size: calc(var(--font-small) + 0.15rem);
  font-weight: 450;
  cursor: pointer;
  font-family: "Rajdhani", monospace;
  letter-spacing: 0.05em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}

.nav-bottom-item:first-child {
  margin-left: calc(var(--spacing-lg) * 4);
}

.nav-bottom-item:hover {
  color: var(--gold);
}

.nav-bottom-item.active {
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(192, 138, 66, 0.15);
  padding: 0.35rem 0.9rem;
  box-sizing: border-box;
}

.nav-bottom-item:not(:last-child)::after {
  content: "";
  color: var(--gold-dim);
  margin-left: 1.2rem;
  margin-right: 1.2rem;
}

/* Focus */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   MOBILE: allow scrolling
   ========================= */
@media (max-width: 800px) {
  body {
    height: auto;
    min-height: 100svh;
    overflow-y: auto; /* mobile can scroll vertically */
    overflow-x: hidden; /* block horizontal scroll on mobile */
    grid-template-rows: auto 1fr;
    overscroll-behavior-x: none; /* avoid horizontal bounce */
  }

  /* Keep one line, hide date/time, keep cart at right */
  .top-bar {
    padding: var(--spacing-sm) var(--spacing-md);
    gap: 0.6rem;
  }

  .date-time {
    display: none; /* hides date + time, cart stays */
  }

  .main-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem;
    overflow: visible;
    align-content: start;
  }

  .sidebar {
    border-right: none;
    padding: 0;
    overflow: visible;
    /* Container queries based on frame height only make sense on
       desktop/tablet where the sidebar has a fixed height. On mobile
       the sidebar height is intrinsic (content-driven), so keeping
       container-type: size here collapses it to 0 height and breaks
       the menu toggle / sidebar layout. */
    container-type: normal;
  }

  body.home-page .sidebar {
    display: none;
  }

  body.home-page .main-wrapper {
    gap: 0;
  }

  body.home-page .content-area {
    padding-left: 0;
    padding-right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .sidebar-content {
    display: none;
    padding: 0 0 1rem var(--spacing-md);
    padding-top: 1px;
  }

  .sidebar.open .sidebar-content {
    display: flex;
  }

  .portfolio-btn {
    display: none; /* hide portfolio label on mobile menu */
  }

  .content-area {
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

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

  .content-title {
    white-space: nowrap;
  }

  .content-title {
    order: 1;
  }

  .project-section {
    order: 2;
    margin-left: auto;
  }

  .artwork-container {
    grid-template-columns: 1fr;
  }

  .arrow-prev,
  .arrow-next,
  .frame {
    grid-column: 1;
  }

  .frame {
    justify-self: center;
    width: 100%;
    max-width: 100vw;
    height: 55svh; /* fix to viewport height proportion on mobile */
  }

  .arrow-btn {
    display: none;
  }

  .info-grid {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  /* Mobile order: Description → Scope → Tools */
  .info-right {
    order: 1;
    width: 100%;
  }

  .info-left {
    order: 2;
    width: 100%;
  }

  .info-left .info-box:last-child {
    order: 1;
    width: 100%;
  }

  .info-left .info-box:first-child {
    order: 2;
    width: 100%;
  }

  .info-box {
    overflow: visible;
  }

  /* About page: show Description above Projects on mobile */
  .info-grid .description-box {
    order: 1;
  }
  .info-grid .info-box:not(.description-box) {
    order: 2;
  }

  .bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: var(--spacing-sm);
    padding: 1rem 1rem 2rem;
    margin: 0;
    justify-content: center;
    white-space: nowrap;
  }

  .bottomnav::before,
  .bottomnav::after {
    content: none;
  }

  .nav-bottom-item:first-child {
    margin-left: 0;
  }

  .nav-bottom-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    white-space: nowrap; /* keep labels on one line */
    letter-spacing: 0;
    flex: 0 0 auto; /* prevent shrinking that could cause wrap */
  }

  .nav-bottom-item:not(:last-child)::after {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --font-title: clamp(1rem, 3vw, 1.35rem);
    --font-heading: clamp(0.95rem, 2.6vw, 1.2rem);
  }

  .content-area {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .nav-bottom-item {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  .info-box {
    padding: var(--spacing-sm);
  }
}

/* Extra-small phones: tighten spacing and scale text to fit frame */
@media (max-width: 450px) {
  :root {
    --font-title: clamp(0.95rem, 2.6vw, 1.2rem);
    --font-heading: clamp(0.85rem, 2.2vw, 1.05rem);
    --font-base: clamp(0.85rem, 1.6vw, 0.95rem);
    --font-small: clamp(0.75rem, 1.4vw, 0.9rem);
    --page-pad: clamp(0.6rem, 2vw, 1rem);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.45rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.8rem;
  }

  .top-bar {
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .main-wrapper {
    gap: var(--spacing-sm);
  }

  .content-area {
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md)
      calc(2.8rem + env(safe-area-inset-bottom));
  }

  .content-header {
    gap: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
  }

  .artwork-container {
    gap: var(--spacing-sm);
  }

  .frame {
    height: 46svh; /* slightly shorter to ensure info fits below */
  }

  .info-box {
    padding: var(--spacing-sm);
  }

  .nav-bottom-item {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .bottomnav {
    justify-content: center;
    padding-bottom: 2rem;
    padding-top: 1rem; /* center items below 450px */
  }
}

/* Ultra-small phones: further compress layout for <= 390px */
@media (max-width: 390px) {
  :root {
    --font-title: clamp(0.9rem, 2.2vw, 1.05rem);
    --font-heading: clamp(0.8rem, 2vw, 0.95rem);
    --font-base: clamp(0.8rem, 1.4vw, 0.9rem);
    --font-small: clamp(0.8rem, 1.2vw, 0.85rem);
    --page-pad: clamp(0.5rem, 1.6vw, 0.9rem);

    --spacing-xs: 0.2rem;
    --spacing-sm: 0.4rem;
    --spacing-md: 0.6rem;
    --spacing-lg: 0.9rem;
    --spacing-xl: 1.4rem;
  }

  .top-bar {
    padding: var(--spacing-sm) var(--spacing-md);
    gap: var(--spacing-xs);
  }

  .content-area {
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md)
      calc(2.6rem + env(safe-area-inset-bottom));
  }

  .content-header {
    gap: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
  }

  .artwork-container {
    gap: var(--spacing-xs);
  }

  .frame {
    height: 44svh; /* more room for info on ultra-small */
  }

  .info-box {
    padding: var(--spacing-sm);
  }
}

@media (max-width: 550px) {
  .bottomnav {
    align-items: flex-end;
  }

  .nav-bottom-item {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    padding-top: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
  }

  .nav-bottom-item.active {
    padding: 0.35rem 0.9rem;
  }
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-layout img {
    padding-right: 0;
  }

  .content-area {
    grid-template-columns: 1fr;
    padding-bottom: 4rem;
  }

  .right-column {
    display: flex;
    flex-direction: column;
  }

  body {
    overflow-y: auto; /* keep vertical scrolling */
    overflow-x: hidden; /* block horizontal scrolling */
  }
}

/* About page layout */
.about-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: start;
}

/* About page: content-area shows both panels; scrolls to reveal Wakadelics below */
.about-page .content-area {
  display: block;
  height: 100%;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 0;
}

.about-page .content-slider {
  position: static;
  inset: auto;

  height: auto;
  width: 100%;
}

.about-page .content-panel {
  height: auto;
  min-height: 0;

  padding: clamp(0.8rem, 1.8vw, 1.6rem) clamp(1.1rem, 3vw, 2rem)
    clamp(2rem, 4vw, 3rem);
  box-sizing: border-box;

  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.about-page .content-panel[aria-hidden="true"] {
  display: none;
}

.about-page .content-header {
  position: static;
  top: auto;
}

.about-page .panel-body {
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-md);
}

.about-page .panel-body > * {
  flex: 0 0 auto;
}

.about-page .panel-body .info-grid {
  overflow: visible;
}

.about-page [data-panel="wakadelics"] .panel-body {
  gap: var(--spacing-xl);
}

.project-trigger {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 0;
  display: block;
  width: 100%;
  text-align: left;
}

.wakadelics-hero {
  display: flex;
  justify-content: center;
  align-items: center;
}

.wakadelics-square {
  width: max(1rem, 3vw);
  object-fit: cover;
  display: block;
}

.wakadelics-video {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: var(--spacing-sm);
}

.wakadelics-video-el {
  width: 100%;
  max-width: 920px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  max-height: min(34svh, 340px);
}

.wakadelics-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-sm);
  padding-bottom: var(--spacing-md);
}

.wakadelics-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* About page: on mobile, use natural padding for the content area */
@media (max-width: 800px) {
  .about-page .content-area {
    padding: var(--spacing-sm) var(--spacing-md)
      calc(4rem + env(safe-area-inset-bottom));
  }

  .about-page .panel-body {
    overflow: visible;
  }
}

.image-section {
  display: flex;
  justify-content: center;
}

.skills-section .info-box {
  border: none;
  padding-top: 2rem;
}

.skills-section .info-list li {
  cursor: pointer;
  user-select: none;
  padding-left: calc(var(--spacing-md) + var(--spacing-xs));
}

.skills-section .info-list li::before {
  content: "▶";
  opacity: 0;
  transition: opacity 120ms ease;
  color: var(--gold);
}

.skills-section .info-list li:hover {
  background: transparent;
  box-shadow: none;
}

.skills-section .info-list li:hover::before {
  opacity: 1;
}

.skills-section .info-list li.selected {
  background: transparent;
  box-shadow: none;
  color: var(--gold);
}

.skills-section .info-list li.selected::before {
  opacity: 1;
}

.selected {
  background: rgba(185, 131, 72, 0.2);
  color: var(--gold);
}

.about-layout img {
  width: 100%;
  max-width: 320px;
  height: auto;
  max-height: min(275px, 30svh);
  padding-right: 1rem;
}

/* =========================
   COMMISSION FORM STYLES
   ========================= */
.commission-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 1rem;
}

/* Allow dropdown to show on commissions page */
#commissions {
  overflow: auto;
}

.commissions-page .main-wrapper {
  overflow: visible;
  grid-template-columns: 1fr;
  padding-bottom: 4rem;
}

.commissions-page .sidebar {
  display: none;
}

.commissions-page .bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.commissions-page .content-area {
  overflow: visible;
  padding-top: 0;
}

.commissions-page .content-header {
  background: var(--bg);
  margin-top: calc(-1 * clamp(0.8rem, 1vw, 1rem));
  padding-top: calc(clamp(0.8rem, 1.8vw, 1.6rem));
  margin-left: calc(-1 * clamp(1.1rem, 3vw, 2rem));
  margin-right: calc(-1 * clamp(1.1rem, 3vw, 2rem));
  padding-left: clamp(1.1rem, 3vw, 2rem);
  padding-right: clamp(1.1rem, 3vw, 2rem);
  width: calc(100% + 2 * clamp(1.1rem, 3vw, 2rem));
}

.commissions-page body {
  overflow: auto;
}

@media (min-width: 801px) {
  .portfolio-page .content-area,
  .shop-page .content-area {
    grid-template-rows: auto auto auto;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .portfolio-page .info-grid,
  .shop-page .info-grid {
    min-height: max-content;
    overflow: visible;
  }
}

@media (max-width: 800px) {
  .portfolio-page .content-area,
  .shop-page .content-area {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
}

.commission-form select,
.commission-form input[type="text"],
.commission-form input[type="email"],
.commission-form input[type="date"],
.commission-form textarea {
  width: 100%;
  padding: 0.8rem;
  background: rgba(18, 14, 9, 0.55);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  font-family: inherit;
  font-size: var(--font-small);
  border-radius: 2px;
  transition: all 0.3s ease;
  appearance: none; /* remove default styling */
  -webkit-appearance: none;
  -moz-appearance: none;
}

.commission-form select {
  position: relative;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b98348' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1rem;
  padding-right: 2.5rem; /* space for arrow */
}

.commission-form input[type="date"] {
  position: relative;
  /* Remove custom background icon to avoid duplication with native indicator */
  background-image: none;
  padding-right: 0.8rem;
}

/* Hide native WebKit calendar indicator to rely on custom popup */
.commission-form input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}

.commission-form select option,
.commission-form select optgroup {
  background: var(--bg);
  color: var(--text);
  font-family: "Victor Mono", "Rajdhani", monospace;
  font-size: var(--font-small);
  padding: 0.5rem;
}

/* Custom select styles */
.custom-select-wrapper {
  position: relative;
}

.custom-select {
  width: 100%;
  padding: 0.8rem;
  background: rgba(18, 14, 9, 0.55);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: "Victor Mono", "Rajdhani", monospace;
  font-size: var(--font-small);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.custom-select:focus,
.custom-select-wrapper:focus-within .custom-select {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.custom-select-value {
  color: var(--text-dim);
}

.custom-select.selected .custom-select-value {
  color: var(--text);
}

.custom-select-arrow {
  color: var(--gold);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}

.custom-option {
  padding: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  font-family: "Victor Mono", "Rajdhani", monospace;
  font-size: var(--font-small);
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--gold-dim);
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background: var(--gold-glow);
  color: var(--gold);
}

.custom-option.selected {
  background: var(--gold);
  color: var(--bg);
}

.commission-form select:focus,
.commission-form input:focus,
.commission-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.commission-form textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
}

.char-count {
  text-align: right;
  font-size: calc(var(--font-small) * 0.8);
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.upload-area {
  border: 2px dashed var(--gold-dim);
  padding: 2rem;
  text-align: center;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--gold);
  background: rgba(185, 131, 72, 0.05);
}

.upload-placeholder span {
  font-size: 3rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.upload-placeholder p {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--font-small);
}

#file-list {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.file-item {
  background: var(--gold-glow);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  font-size: calc(var(--font-small) * 0.8);
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.file-item button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin-left: 0.3rem;
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.3rem;
  padding-bottom: 3rem;
}

.submit-btn {
  background: #120d07;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.8rem 2rem;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.submit-btn:hover {
  background: var(--text);
  color: #120d07;
  box-shadow: 0 0 12px var(--gold-glow);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.confirmation-message {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
  padding-top: 1rem;
}

.confirmation-message .info-box {
  border-color: var(--gold);
}

.confirmation-message h3 {
  color: var(--gold);
}

/* Calendar popup styles */
.commission-form .info-box {
  position: static;
}
.date-field {
  position: relative;
}
.date-field input {
  padding-right: 2rem; /* room for calendar icon */
}
.calendar-icon {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.calendar-icon:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}
.date-field .calendar-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  font-family: "Victor Mono", "Rajdhani", monospace;
  color: var(--text);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border-bottom: 1px solid var(--gold-dim);
}

.calendar-header button {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  border-radius: 2px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.calendar-header button:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

#month-year {
  font-size: var(--font-small);
  color: var(--gold);
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 0.8rem;
}

.calendar-day {
  background: none;
  border: 1px solid var(--gold-dim);
  color: var(--text-dim);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 2px;
  font-size: calc(var(--font-small) * 0.8);
  font-family: inherit;
  transition: all 0.3s ease;
  text-align: center;
}

.calendar-day:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
}

.calendar-day.today {
  background: var(--gold-glow);
  color: var(--gold);
}

.calendar-day.selected {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.calendar-day.disabled {
  color: var(--text-dim);
  opacity: 0.5;
  cursor: not-allowed;
}

.calendar-day-name {
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  padding: 0.3rem;
  font-size: calc(var(--font-small) * 0.7);
}

/* Mobile adjustments for form */
@media (max-width: 800px) {
  .commission-form {
    max-width: none;
    padding: 0 var(--spacing-md);
  }

  .upload-area {
    padding: 1.5rem;
  }

  .upload-placeholder span {
    font-size: 2.5rem;
  }

  /* Keep popup aligned below input on mobile */
  .date-field .calendar-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
  }
}

/* Desktop: add extra right padding on image section */
@media (min-width: 801px) {
  .image-section {
    padding-right: 6rem; /* base 3rem + extra 3rem */
  }
}

@media (min-width: 1100px) {
  .image-section {
    padding-right: 8rem;
  }
}

@media (min-width: 801px) {
  body.home-page .homepage-project-link {
    width: 40%;
  }
}
