:root{
  --max:none;
  --radius:18px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Default theme: dark */
:root, [data-theme="dark"]{
  --bg:#18171a;
  /* --panel:#10121a; */
  /* --panel:#222222; */
  --panel:#2c2c2c;
  --text:#e9eef5;
  --muted:#aab4c0;
  --selectedmenu: #ff0000;
  --line:rgba(100, 100, 100, .20);
  --accent:#f3ae01;
  --alternateaccent:#f3ae01;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* Light theme */
[data-theme="light"]{
  /* --bg:#f6f7fb; */
  --bg:#f1f1f1;
  --panel:#ffffff;
  --text:#10131a;
  --muted:#5b6572;
  --selectedmenu: #ff0000;
  --line:rgba(16,19,26,.10);
  --accent:#2f5bff;
  --alternateaccent:#f3ae01;  
  --shadow: 0 10px 24px rgba(16,19,26,.10);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
}

body.home-animated{
  background:
    radial-gradient(1200px 700px at 12% 18%, rgba(96, 130, 255, .22), transparent 62%),
    radial-gradient(900px 560px at 84% 12%, rgba(92, 255, 214, .16), transparent 58%),
    radial-gradient(1000px 640px at 70% 82%, rgba(255, 140, 86, .12), transparent 62%),
    radial-gradient(900px 560px at 22% 88%, rgba(150, 110, 255, .14), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 125% 125%, 115% 115%, 120% 120%, 110% 110%, auto;
  animation: homeAmbientShift 16s ease-in-out infinite alternate;
}
@keyframes homeAmbientShift{
  0%{ background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0 0; }
  100%{ background-position: 8% 6%, 92% 8%, 94% 90%, 8% 94%, 0 0; }
}
html[data-theme="light"] body.home-animated{
  background:
    radial-gradient(1200px 700px at 12% 18%, rgba(47, 91, 255, .16), transparent 62%),
    radial-gradient(900px 560px at 84% 12%, rgba(17, 166, 139, .12), transparent 58%),
    radial-gradient(1000px 640px at 70% 82%, rgba(255, 112, 44, .10), transparent 62%),
    radial-gradient(900px 560px at 22% 88%, rgba(121, 97, 255, .10), transparent 60%),
    var(--bg);
}
@media (prefers-reduced-motion: reduce){
  body.home-animated{ animation: none; }
}

/* Shared media-fit rules across public pages */
#featuredGrid .thumb img,
#seriesGrid .thumb img,
#galleryGrid .thumb img,
#homeSeriesGrid .thumb img,
#featuredStrip .thumb img,
.series-pieces-grid .thumb img,
.artwork-media img,
#moreGrid .thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
#featuredGrid .thumb img,
#seriesGrid .thumb img,
#homeSeriesGrid .thumb img,
#featuredStrip .thumb img,
.series-pieces-grid .thumb img{
  background: var(--bg);
}

a{color:inherit;text-decoration:none}
a:hover{color:var(--selectedmenu)}
img{max-width:100%;display:block}

.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:12px clamp(14px, 2.5vw, 32px);
}

/* Smooth theme transitions (respects reduced motion) */
@media (prefers-reduced-motion: no-preference){
  html.theme-animate, html.theme-animate *{
    transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
  }
}

.header{
  position:sticky; top:0; z-index:50;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
@supports (background: color-mix(in srgb, black, white)){
  .header{ background: color-mix(in srgb, var(--bg) 78%, transparent); }
  .card{
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--panel) 92%, transparent),
      color-mix(in srgb, var(--panel) 70%, transparent)
    );
  }
}

.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.brand{
  display:flex; align-items:baseline; gap:10px;
  font-weight:650;
  letter-spacing:.2px;
}
.brand-logo-image{
  display:block;
  width:min(220px, 44vw);
  height:auto;
}
.brand small{color:var(--muted); font-weight:500}
.navlinks{display:flex; gap:18px; align-items:center}
.navlinks a{color:var(--muted)}
.navlinks a.active{color:var(--selectedmenu)}
.nav-toggle{display:none}
@media (min-width: 761px){
  .nav-toggle{display:none !important}
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:7px 11px;
  border:1px solid var(--line);
  border-radius:999px;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}
.btn:hover{border-color:rgba(255,255,255,.18)}
[data-theme="light"] .btn:hover{border-color:rgba(16,19,26,.18)}
.btn.primary{
  background:rgba(138,167,255,.12);
  border-color:rgba(138,167,255,.35);
}
[data-theme="light"] .btn.primary{
  background:rgba(47,91,255,.10);
  border-color:rgba(47,91,255,.28);
}

.hero{
  /* padding:56px 0 26px; */
}
.hero h1{
  /* font-size: clamp(32px, 5vw, 56px); */
  font-size: clamp(22px, 5vw, 36px);
  margin:0 0 10px;
  letter-spacing:-.8px;
}
.hero p{color:var(--muted); font-size:18px; max-width:70ch}
.hero .cta{display:flex; gap:12px; margin-top:18px; flex-wrap:wrap}

.section-title{
  display:flex; align-items:end; justify-content:space-between;
  gap:12px;
  margin:34px 0 14px;
}
.section-title h2{margin:0; font-size:18px; letter-spacing:.2px}
.section-title span{color:var(--muted); font-size:14px}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:16px;
}
.card{
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
}
[data-theme="light"] .card:hover{
  border-color: rgba(16,19,26,.18);
}
.card .meta{
  padding:12px 12px 14px;
}
.card .title{font-weight:600; margin:0 0 4px}
.card .sub{color:var(--muted); font-size:13px}

.thumb{
  aspect-ratio: 4/3;
  background: rgba(255,255,255,.03);
  display:flex; align-items:center; justify-content:center;
}
.thumb img{
  width:100%; height:100%;
  object-fit: cover;
}

.filters{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  padding:12px 0 18px;
  border-bottom:1px solid var(--line);
  margin-bottom:16px;
}
.chip{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  cursor:pointer;
  user-select:none;
}
.chip.active{
  border-color: rgba(138,167,255,.35);
  background: rgba(138,167,255,.10);
  color: var(--text);
}
[data-theme="light"] .chip.active{
  border-color: rgba(47,91,255,.28);
  background: rgba(47,91,255,.10);
}

.search{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
}
.search input{
  border:none; outline:none;
  background:transparent;
  color:var(--text);
  width:min(320px, 55vw);
}

/* Theme controls */
.theme-controls{
  display:flex;
  align-items:center;
  gap:10px;
}

.icon-btn{
  width:34px; height:34px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
  border-radius:999px;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}
.icon-btn:hover{ border-color: rgba(255,255,255,.18); }
[data-theme="light"] .icon-btn:hover{ border-color: rgba(16,19,26,.18); }

.icon{
  width:18px; height:18px;
  display:block;
  fill: currentColor;
}

.segmented{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden;
}
.segmented button{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:5px 8px;
  cursor:pointer;
  font-size:12px;
}
.segmented button:hover{ color:var(--text); }
.segmented button.active{
  color:var(--text);
  background: rgba(138,167,255,.12);
}
[data-theme="light"] .segmented button.active{
  background: rgba(47,91,255,.10);
}

.footer{
  border-top:1px solid var(--line);
  margin-top:46px;
  padding:26px 0;
  color:var(--muted);
  font-size:14px;
}
.footer .row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  padding: 0 clamp(8px, 2vw, 20px);
}

input, textarea, select{
  color: var(--text);
  background: transparent;
}

@media (max-width: 760px){
  .nav{
    flex-wrap:wrap;
    align-items:center;
  }
  .nav-toggle{
    display:inline-flex;
    order:30;
    margin-left:8px;
  }
  .nav > .theme-controls{ margin-left:auto; }
  .navlinks{
    display:none;
    width:100%;
    order:10;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    margin-top:10px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
  }
  .nav.nav-open .navlinks{display:flex}
  .navlinks a{
    padding:10px 12px;
    border-radius:10px;
    border:1px solid transparent;
  }
  .search{width:100%; margin-left:0}
  .segmented{ display:none; }
  .nav > .btn{display:none}
}


input, textarea, select{
  color: var(--text);
  background: transparent;
}


/* -----------------------------
   Theme-safe dropdown styling
------------------------------ */

select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  width:100%;
  background: var(--panel);
  border:1px solid var(--line);
  border-radius:14px;

  padding:10px 44px 10px 12px; /* room for arrow */
  font:inherit;
  line-height:1.2;
  box-shadow:none;

  /* Arrow (CSS) */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

select:hover{
  border-color: rgba(138,167,255,.35);
}
[data-theme="light"] select:hover{
  border-color: rgba(47,91,255,.28);
}

select:focus,
select:focus-visible{
  outline:none;
  border-color: rgba(138,167,255,.55);
  box-shadow: 0 0 0 3px rgba(138,167,255,.18);
}
[data-theme="light"] select:focus,
[data-theme="light"] select:focus-visible{
  border-color: rgba(47,91,255,.45);
  box-shadow: 0 0 0 3px rgba(47,91,255,.16);
}

select:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* Try to theme the open dropdown list (browser support varies) */
select option{
  background: var(--panel);
  color: var(--text);
}

/* Keep selects aligned with inputs inside .field blocks */
.field select{
  margin-top:6px;
}









/* -----------------------------
   Theme-safe input styling
------------------------------ */

input, textarea{
  width:100%;
  background: var(--panel);
  color: var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  font:inherit;
  box-shadow:none;
}

/* Textarea sizing */
textarea{
  min-height: 120px;
  resize: vertical;
}

/* Hover */
input:hover, textarea:hover{
  border-color: rgba(138,167,255,.35);
}
[data-theme="light"] input:hover,
[data-theme="light"] textarea:hover{
  border-color: rgba(47,91,255,.28);
}

/* Focus */
input:focus, input:focus-visible,
textarea:focus, textarea:focus-visible{
  outline:none;
  border-color: rgba(138,167,255,.55);
  box-shadow: 0 0 0 3px rgba(138,167,255,.18);
}
[data-theme="light"] input:focus,
[data-theme="light"] input:focus-visible,
[data-theme="light"] textarea:focus,
[data-theme="light"] textarea:focus-visible{
  border-color: rgba(47,91,255,.45);
  box-shadow: 0 0 0 3px rgba(47,91,255,.16);
}

/* Disabled */
input:disabled, textarea:disabled{
  opacity:.6;
  cursor:not-allowed;
}

/* Placeholder */
input::placeholder,
textarea::placeholder{
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

/* Keep your search pill looking like a pill */
.search input{
  width:auto;
  border:none;
  background:transparent;
  padding:0;
  box-shadow:none;
}
.search input:focus,
.search input:focus-visible{
  border:none;
  box-shadow:none;
}







/* -----------------------------
   Dashboard table zebra rows
------------------------------ */

.table tbody tr:nth-child(odd){
  background: color-mix(in srgb, var(--panel) 86%, transparent);
}

.table tbody tr:nth-child(even){
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

/* Keep hover readable */
.table tbody tr:hover{
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
}

/* If your rows have borders, this helps them stay crisp */
.table tbody tr{
  border-bottom: 1px solid var(--line);
}







.btn.danger{
  border-color: rgba(255,80,80,.35);
  background: rgba(255,80,80,.10);
}
[data-theme="light"] .btn.danger{
  border-color: rgba(255,80,80,.28);
  background: rgba(255,80,80,.10);
}
