/* =============================================================================
   Art portfolio — styles
   Tweak the tokens in :root below to restyle the whole site.
   ============================================================================= */

:root {
  /* Palette (light) */
  --bg:        #faf8f4;
  --surface:   #ffffff;
  --ink:       #1b1a17;
  --ink-soft:  #5c574d;
  --ink-faint: #8a8479;
  --line:      #e7e1d5;
  --accent:    #9a4b2e;   /* terracotta — used sparingly */
  --accent-ink:#7c3a22;
  --focus:     #3b5bdb;

  /* Type */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --pad:  clamp(1.1rem, 4vw, 2.75rem);
  --gap:  clamp(1rem, 2.4vw, 1.9rem);
  --radius: 3px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 45px -22px rgba(0,0,0,.30);

  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #141310;
    --surface:   #1c1a15;
    --ink:       #f3efe6;
    --ink-soft:  #aaa294;
    --ink-faint: #7c7566;
    --line:      #302c23;
    --accent:    #dd8a5c;
    --accent-ink:#e8a883;
    --focus:     #9db2ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 50px -22px rgba(0,0,0,.7);
  }
}

/* ----------------------------------------------------------------------------- */
/* Reset-ish                                                                     */
/* ----------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 460;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: .6rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ----------------------------------------------------------------------------- */
/* Header / nav                                                                  */
/* ----------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.brand::after { content: "."; color: var(--accent); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: .45rem .7rem;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: .35rem 0;
  position: relative;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--accent);
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
  .nav {
    position: absolute;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav a {
    padding: 1rem var(--pad);
    border-top: 1px solid var(--line);
  }
  .nav a[aria-current="page"]::after { display: none; }
  .nav[hidden] { display: none; }
}

/* ----------------------------------------------------------------------------- */
/* Generic sections                                                              */
/* ----------------------------------------------------------------------------- */
main { display: block; }
.section { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.section + .section { padding-top: 0; }

.eyebrow {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 46ch;
}
.measure { max-width: 62ch; }

/* ----------------------------------------------------------------------------- */
/* Home hero                                                                     */
/* ----------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(3rem, 12vw, 7.5rem) clamp(2rem, 6vw, 3.5rem);
}
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 420;
  max-width: 14ch;
}
.hero .role {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  margin-bottom: 1.4rem;
}
.hero .intro {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
}

/* Compact hero — used on the consolidated Work/home page, above the grid. */
.hero--slim {
  padding-block: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 2.5vw, 1.5rem);
}
.hero--slim h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
.hero--slim .role { margin-bottom: .9rem; }
/* the grid section sits right under the slim hero — drop its big top padding */
.hero--slim + .section { padding-top: 0; }

/* ----------------------------------------------------------------------------- */
/* Section head                                                                  */
/* ----------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: .9rem;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
@media (max-width: 420px) {
  .section-head { flex-wrap: wrap; }
}
.section-head .more {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
}
.section-head .more:hover { color: var(--accent); }

/* "Click any piece to view it full-size" — a floating reminder that stays put
   while the page scrolls, so it's visible no matter how far down the grid you
   are. Purely a mouse-user affordance (each tile already has a real aria-label
   for screen readers), so it's aria-hidden and never blocks clicks. */
.scroll-hint {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .85rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 1rem;
  letter-spacing: .01em;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.4);
  pointer-events: none;
}
.scroll-hint svg { color: var(--accent); flex: none; }
@media (max-width: 640px) {
  .scroll-hint {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    justify-content: center;
    font-size: .88rem;
    padding: .7rem 1rem;
  }
}

/* ----------------------------------------------------------------------------- */
/* Tile — shared by the masonry grid and the spotlight rows                       */
/* ----------------------------------------------------------------------------- */
.tile {
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.tile figure { margin: 0; }
.tile .frame {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tile .frame img {
  width: 100%;
  height: auto;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .5s;
}
.tile:hover .frame img,
.tile:focus-visible .frame img { transform: scale(1.035); }

.tile figcaption {
  padding: .7rem .15rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.tile figcaption .title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-style: italic;
}
.tile figcaption .meta {
  font-size: .82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* The main grid holds an optional 2-column feature grid on top, then a masonry. */

/* Feature grid — the first few works, two larger columns */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  align-items: start;
  margin-bottom: var(--gap);
}
.feature-grid > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.feature-grid figcaption .title { font-size: 1.12rem; }
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid > .tile:last-child:nth-child(odd) { grid-column: auto; }
}

/* Masonry — the rest, via CSS columns */
.masonry {
  column-count: 3;
  column-gap: var(--gap);
}
@media (max-width: 900px) { .masonry { column-count: 2; } }
@media (max-width: 560px) { .masonry { column-count: 1; } }
.masonry .tile { break-inside: avoid; margin: 0 0 var(--gap); }

.badge-sold {
  position: absolute;
  top: .6rem; left: .6rem;
  background: var(--ink);
  color: var(--bg);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .5rem;
  border-radius: 2px;
}

/* ----------------------------------------------------------------------------- */
/* Filters (Work page)                                                           */
/* ----------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: clamp(1.4rem, 4vw, 2.4rem);
}
.filters button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .4rem .95rem;
  font-size: .82rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.filters button:hover { color: var(--ink); border-color: var(--ink-faint); }
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.empty-note { color: var(--ink-soft); padding: 2rem 0; }

/* ----------------------------------------------------------------------------- */
/* Artwork detail                                                                */
/* ----------------------------------------------------------------------------- */
.work {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(1.5rem, 5vw, 3rem);
}
@media (max-width: 820px) { .work { grid-template-columns: 1fr; } }

.work__image {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.work__image img { width: 100%; }
@media (min-width: 821px) {
  .work__image { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.work__meta h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: .3rem;
}
.work__meta .year {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 1.4rem;
}
.spec-list {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.spec-list div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.spec-list dt { color: var(--ink-faint); }
.spec-list dd { margin: 0; }
.status-available { color: var(--accent); }

.work__desc-label {
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  margin: 0 0 .8rem;
}
.work__desc p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 52ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
}

.btn {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: var(--bg);
  padding: .8rem 1.4rem;
  border-radius: var(--radius);
  font-size: .84rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: transform .2s, opacity .2s;
}
.btn:hover { opacity: .88; }
.btn--ghost {
  background: none;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.work__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.work__nav a { text-decoration: none; color: var(--ink-soft); }
.work__nav a:hover { color: var(--accent); }
.work__nav a[hidden] { visibility: hidden; }

/* ----------------------------------------------------------------------------- */
/* About                                                                         */
/* ----------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(1.5rem, 6vw, 4rem);
  align-items: start;
}
@media (max-width: 780px) { .about { grid-template-columns: 1fr; } }
.about__portrait {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}
.about__portrait img { width: 100%; }
.about__bio p { color: var(--ink-soft); max-width: 58ch; }
.about__bio p:first-child {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
}

.cv { margin-top: clamp(2.5rem, 7vw, 4.5rem); }
.cv h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: .6rem;
  margin-bottom: .4rem;
}
.cv dl { margin: 0 0 2.2rem; }
.cv .row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.cv .row dt { color: var(--accent); font-variant-numeric: tabular-nums; }
.cv .row dd { margin: 0; color: var(--ink-soft); }

/* ----------------------------------------------------------------------------- */
/* Contact                                                                       */
/* ----------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 6vw, 4rem);
}
@media (max-width: 780px) { .contact { grid-template-columns: 1fr; } }
.contact .big-email {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  word-break: break-word;
}
.contact ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.contact ul li { padding: .3rem 0; }
.contact ul a { color: var(--ink-soft); text-decoration: none; }
.contact ul a:hover { color: var(--accent); }

.form label {
  display: block;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 1rem 0 .35rem;
}
.form input, .form textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem .8rem;
}
.form textarea { min-height: 8rem; resize: vertical; }
.form button { margin-top: 1.2rem; cursor: pointer; border: 0; }

/* ----------------------------------------------------------------------------- */
/* Footer                                                                        */
/* ----------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 9vw, 6rem);
  padding-block: 2.5rem;
  font-size: .85rem;
  color: var(--ink-faint);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ----------------------------------------------------------------------------- */
/* Lightbox                                                                      */
/* ----------------------------------------------------------------------------- */
dialog.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  inset: 0;
  color: #f5f2ec;
  overflow: hidden;
}
dialog.lightbox::backdrop {
  background: rgba(11, 10, 8, .95);
}
.lb__stage {
  position: absolute;
  inset: 0;
}
/* The picture gets the ENTIRE stage — the caption overlays its bottom edge
   rather than sharing the layout, so the image is always shown as large as
   the screen allows (never cropped, never larger than the viewport, never
   upscaled past the file's own resolution). */
.lb__imgwrap {
  position: absolute;
  inset: 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(.5rem, 2.5vh, 1.75rem) clamp(3.25rem, 8vw, 6rem);
}
.lb__imgwrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.lb__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62%;
  overflow-y: auto;
  text-align: center;
  padding: 3rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  font-size: .85rem;
  line-height: 1.45;
  color: #d9d4c9;
  background: linear-gradient(to top, rgba(9,8,6,.92) 0%, rgba(9,8,6,.75) 45%, rgba(9,8,6,.25) 80%, transparent);
}
.lb__caption .title {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  color: #f5f2ec;
  font-size: 1.1rem;
  margin-bottom: .25rem;
}
.lb__meta {
  display: block;
  font-size: .78rem;
  letter-spacing: .02em;
  color: #b7b0a3;
  margin-bottom: .9rem;
}
.lb__statement {
  max-width: 46ch;
  margin: 0 auto 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .95rem;
  line-height: 1.6;
  color: #e4e0d6;
}
.lb__statement-label {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #948d7d;
  margin-bottom: .45rem;
}
.lb__more {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f5f2ec;
  text-decoration: none;
  border-bottom: 1px solid rgba(245,242,236,.4);
  padding-bottom: 2px;
}
.lb__more:hover { border-color: #f5f2ec; }

.lb__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
}
.lb__btn:hover { background: rgba(255,255,255,.18); }
.lb__prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lb__next { right: clamp(.5rem, 2vw, 1.5rem); }
.lb__close {
  position: absolute;
  top: clamp(.5rem, 2vw, 1.25rem);
  right: clamp(.5rem, 2vw, 1.25rem);
  transform: none;
  width: 42px; height: 42px;
}
.lb__btn[disabled] { opacity: .25; cursor: default; }

/* ----------------------------------------------------------------------------- */
/* Motion / print                                                                */
/* ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .site-header, .site-footer, .filters, .work__nav, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
  .gallery { column-count: 2; }
}
