:root {
  color-scheme: dark;
  --ink: #10120f;
  --panel: #191c17;
  --panel-hover: #23271f;
  --line: #393e33;
  --cream: #eee9d9;
  --cream-muted: #b5b4a7;
  --bronze: #c6aa79;
  --font-main: "Space Grotesk", Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ink); color: var(--cream); font: 400 16px/1.5 var(--font-main); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 62% 32% at 50% 0%, rgba(162,140,87,.09), transparent 85%), linear-gradient(90deg,rgba(255,255,255,.008) 1px,transparent 1px); background-size: auto,9px 9px; z-index: -1; }
a { color: inherit; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, #gallery-panel:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
::selection { background: #a9956e; color: var(--ink); }
.shell { width: min(100% - 48px, 1100px); margin: 0 auto; padding: 34px 0 30px; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 0 17px; color: var(--cream-muted); font-size: 9px; font-weight: 600; letter-spacing: .18em; }
.tiny-star { color: var(--bronze); margin-right: 6px; font-size: 12px; vertical-align: -1px; }
.back { color: var(--cream); text-decoration: none; transition: color .2s; white-space: nowrap; }
.back span { color: var(--bronze); font-size: 16px; vertical-align: -1px; margin-right: 6px; }
.back:hover { color: var(--bronze); }
.header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 36px 0 35px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: block; width: 72px; height: 72px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; }
.brand-text strong { font-size: 26px; letter-spacing: -.055em; font-weight: 700; }
.brand-text span { margin-top: 9px; font-size: 12px; letter-spacing: .075em; font-weight: 600; }
.header-note { font-size: 10px; font-weight: 600; color: var(--cream-muted); letter-spacing: .14em; text-align: right; }
.header-note span { color: var(--bronze); padding: 0 5px; }
.intro { border-top: 1px solid var(--line); padding-top: 38px; margin-bottom: 43px; }
.intro-eyebrow { color: var(--bronze); font-size: 10px; font-weight: 600; letter-spacing: .2em; }
h1 { margin: 12px 0 8px; font-size: clamp(40px, 6.7vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -.065em; }
.accent { color: var(--bronze); }
.intro p { margin: 0; color: var(--cream-muted); font-size: 13px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { position: relative; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--cream-muted); padding: 14px 26px 17px; font-size: 12px; font-weight: 600; letter-spacing: .12em; cursor: pointer; }
.tab:first-child { padding-left: 0; }
.tab:hover { color: var(--cream); }
.tab.active { color: var(--cream); border-bottom-color: var(--bronze); }
.filter-bar { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 27px; }
.filter-bar[hidden] { display: none; }
.filter-label { font-size: 9px; font-weight: 600; letter-spacing: .14em; color: var(--cream-muted); white-space: nowrap; padding-top: 11px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 2px; background: var(--panel); color: var(--cream-muted); font-size: 11px; font-weight: 600; cursor: pointer; transition: background .2s,border-color .2s,color .2s; }
.filter-button:hover { color: var(--cream); border-color: var(--bronze); }
.filter-button[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.art-card { display: block; min-width: 0; padding: 0; overflow: hidden; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; color: var(--cream); cursor: pointer; transition: transform .2s,border-color .2s,background .2s; }
.art-card:hover { transform: translateY(-3px); background: var(--panel-hover); border-color: var(--bronze); }
.art-visual { width: 100%; aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#292c25,#191b17); }
.art-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder { text-align: center; font-size: 10px; font-weight: 500; letter-spacing: .16em; line-height: 1.5; color: #aaa99d; padding: 20px; }
.placeholder span { display: block; margin-bottom: 10px; font-size: 26px; color: var(--bronze); }
.art-caption { padding: 15px 16px 17px; }
.art-caption strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.art-caption small { display: block; margin-top: 6px; color: var(--cream-muted); font-size: 11px; letter-spacing: .04em; }
.gallery-masonry { display: block; columns: 2; column-gap: 13px; }
.gallery-masonry .art-card { display: inline-block; width: 100%; margin-bottom: 13px; vertical-align: top; break-inside: avoid; page-break-inside: avoid; }
.gallery-masonry .art-visual { aspect-ratio: auto; min-height: 190px; }
.gallery-masonry .art-visual img { width: 100%; height: auto; object-fit: contain; }
.gallery-masonry .art-visual:has(img) { min-height: 0; }
.empty { padding: 48px 12px; color: var(--cream-muted); text-align: center; }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 68px; padding-top: 19px; border-top: 1px solid var(--line); color: #777d71; font-size: 9px; letter-spacing: .16em; }
.footer a { text-decoration: none; color: var(--cream-muted); }
.footer a:hover { color: var(--bronze); }
.footer a span { color: var(--bronze); }
#art-dialog { position: fixed; width: min(830px,calc(100vw - 28px)); max-width: none; max-height: min(92dvh,950px); margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #606054; border-radius: 3px; background: var(--panel); color: var(--cream); box-shadow: 0 25px 90px #000a; }
#art-dialog::backdrop { background: rgba(4,6,4,.88); backdrop-filter: blur(4px); }
.dialog-close { position: sticky; display: grid; place-items: center; float: right; right: 13px; top: 13px; width: 42px; height: 42px; margin: 13px 13px -55px 0; padding: 0; z-index: 3; background: #10120fed; border: 1px solid #b5b4a76b; border-radius: 50%; color: var(--cream); font-size: 26px; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: var(--bronze); border-color: var(--bronze); }
.dialog-hero { position: relative; isolation: isolate; min-height: 360px; background: #22251f; }
.dialog-image { display: block; }
.dialog-image .art-visual { display: block; aspect-ratio: auto; min-height: 360px; overflow: visible; }
.dialog-image .art-visual img { display: block; height: auto; max-height: none; width: 100%; object-fit: contain; }
.dialog-image .placeholder { min-height: 480px; display: flex; flex-direction: column; justify-content: center; }
.dialog-copy { position: absolute; inset: 0 0 auto; padding: 26px 77px 95px 28px; background: linear-gradient(to bottom,rgba(7,9,7,.98),rgba(7,9,7,.83) 57%,transparent 100%); text-shadow: 0 1px 4px #000; }
.dialog-copy h2 { margin: 0 0 8px; overflow-wrap: anywhere; font-size: clamp(24px,4vw,36px); line-height: 1.1; letter-spacing: -.045em; }
.dialog-copy p { margin: 8px 0; max-width: 55ch; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.dialog-copy #dialog-meta { color: #e3cfaa; font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.dialog-tags span { font-size: 10px; padding: 5px 9px; border: 1px solid #d1c8b475; background: #10120f99; }
/* Additional media is full-bleed within the dialog, with breathing room vertically. */
.dialog-media { display: grid; gap: 26px; padding: 24px 0; }
.dialog-media[hidden] { display: none; }
.dialog-media figure { position: relative; margin: 0; min-width: 0; }
.dialog-media img, .dialog-media video { display: block; width: 100%; height: auto; background: #111; }
/* Caption floats above the artwork, mirroring the main image's fading header. */
.dialog-media figcaption {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  padding: 17px 72px 43px 24px;
  background: linear-gradient(to bottom, rgba(7,9,7,.9), rgba(7,9,7,.55) 42%, transparent);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
.dialog-media figure p { margin: 0; padding: 30px; text-align: center; background: #22251f; color: var(--cream-muted); font-size: 12px; }
/* With assets absent, keep captions above the unavailable-media message. */
.dialog-media figure:has(> p) { display: flex; flex-direction: column; }
.dialog-media figure:has(> p) figcaption {
  position: static;
  order: -1;
  padding: 16px clamp(16px, 3vw, 24px) 0;
  background: #22251f;
}
.dialog-media figure:has(> p) p { padding: 10px 24px 25px; }
body:has(dialog[open]) { overflow: hidden; }
@media(min-width:700px) {
  .gallery { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 19px; }
  .gallery-masonry { columns: 3; column-gap: 19px; }
  .gallery-masonry .art-card { margin-bottom: 19px; }
}
@media(min-width:1050px) {
  .gallery { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .gallery-masonry { columns: 4; }
}
@media(max-width:600px) {
  .shell { width: min(100% - 38px,470px); padding-top: 23px; }
  .topline { font-size: 8px; letter-spacing: .1em; }
  .header { padding: 26px 0; }
  .brand-logo { width: 55px; height: 55px; }
  .brand { gap: 9px; }
  .brand-text strong { font-size: 19px; }
  .brand-text span { font-size: 9px; margin-top: 7px; }
  .header-note { display: none; }
  .intro { padding-top: 29px; margin-bottom: 28px; }
  .intro-eyebrow { font-size: 9px; }
  h1 { font-size: 47px; }
  .tab { padding: 14px 18px 15px; font-size: 10px; }
  .filter-bar { display: block; margin-bottom: 20px; }
  .filter-label { display: block; margin-bottom: 11px; padding: 0; }
  .filter-button { font-size: 10px; }
  .art-caption { padding: 12px 11px 13px; }
  .art-caption strong { font-size: 12px; }
  .art-caption small { font-size: 10px; }
  .dialog-copy { padding: 23px 62px 78px 17px; }
  .dialog-copy p { font-size: 12px; }
  .dialog-media { padding: 14px 0; gap: 18px; }
  .dialog-media figcaption { padding: 15px 60px 38px 16px; }
  .footer { margin-top: 48px; font-size: 8px; }
}
@media(max-width:350px) {
  .topline > span { font-size: 7px; }
  .back { font-size: 7px; }
  .brand-text strong { font-size: 17px; }
  .tab { padding-right: 13px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* v1.5 selectable media gallery */
.dialog-hero { min-height: 0; }
.dialog-image .art-visual { min-height: 0; }
.dialog-image .art-visual img, .dialog-image .art-visual video { display: block; width: 100%; height: auto; max-height: 62dvh; object-fit: contain; background: #111; }
.dialog-copy { position: static; padding: 24px; background: var(--panel); text-shadow: none; }
.selected-caption { margin: 0; padding: 14px 24px; font-size: 13px; }
.dialog-media { display: grid; grid-template-columns: repeat(auto-fill,minmax(72px,1fr)); gap: 10px; padding: 16px 24px; }
.media-thumbnail { position: relative; min-width: 0; min-height: 60px; aspect-ratio: 1; padding: 3px; border: 2px solid transparent; background: #22251f; color: var(--cream); cursor: pointer; overflow: hidden; font: inherit; font-size: 10px; overflow-wrap: anywhere; }
.media-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.media-thumbnail span { position: absolute; bottom: 3px; left: 3px; background: #10120fed; padding: 4px; }
.media-thumbnail[aria-pressed="true"] { border-color: var(--bronze); }
.media-thumbnail:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.media-unavailable { padding: 70px 24px; text-align: center; }
/* Keep the full selected artwork inside the visible viewport. */
.dialog-image .art-visual { display: flex; justify-content: center; align-items: center; background: #111; }
.dialog-image .art-visual img, .dialog-image .art-visual video { width: auto; height: auto; max-width: 100%; max-height: min(62dvh,670px); object-fit: contain; }
.dialog-image .placeholder { width: 100%; min-height: min(50dvh,480px); }

/* v1.6 portfolio additions */
.art-cover { position: relative; width: 100%; }
.wip-badge { position: absolute; top: 10px; right: 10px; padding: 6px 10px; color: var(--cream); background: #10120ff0; border: 1px solid var(--bronze); font-size: 11px; font-weight: 600; letter-spacing: .08em; pointer-events: none; }
.tabs { flex-wrap: wrap; }
.dialog-image[hidden], .healed-comparison[hidden] { display: none; }
.dialog-image .art-visual { position: relative; flex-direction: column; }
.video-toggle { min-width: 120px; min-height: 44px; margin: 10px; padding: 10px 16px; color: var(--cream); background: #22251f; border: 1px solid var(--bronze); cursor: pointer; font: inherit; font-size: 12px; }
.video-toggle:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.healed-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 24px 16px 16px; }
.healed-comparison figure { min-width: 0; margin: 0; }
.healed-comparison h3 { margin: 0 0 12px; font-size: 18px; }
.comparison-image { height: min(55dvh,580px); display: flex; justify-content: center; align-items: center; background: #111; overflow: hidden; }
.comparison-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.comparison-image .placeholder { min-height: 0; width: 100%; font-size: 10px; text-align: center; padding: 8px; }
.healed-comparison figcaption { margin-top: 10px; font-size: 12px; overflow-wrap: anywhere; }
@media(max-width:600px) { .healed-comparison { gap: 8px; padding: 24px 10px 12px; } .healed-comparison h3 { font-size: 16px; } .tabs .tab { padding-inline: 12px; } }

/* v1.7: higher-contrast work-in-progress marker. */
.wip-badge { color: #fff; background: #b4232d; border: 1px solid #ffb2b9; box-shadow: 0 2px 8px #0008; font-weight: 700; }
