/* solomonadufah.com — match Kohshin Finley aesthetic.
   Left vertical sidebar nav. Pure white. Montserrat with serif italic for titles. No accent.
   The artwork is the entire interface. */

:root {
  --bg: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #777777;
  --ink-3: #b5b5b5;
  --hover: #555555;
  --line: #ececec;
  --sb-w: 220px;
  --pad: clamp(24px, 4vw, 56px);
  --t: 0.25s ease;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--hover); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 300;
}
.skip-link:focus { left: 12px; color: #fff; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sb-w);
  padding: 48px 36px 36px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--line);
  z-index: 50;
}

.site-title {
  font-family: 'Archivo Black', 'Helvetica Neue', 'Arial Black', sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 48px;
  display: block;
}
.site-title:hover { color: var(--ink); }

/* Uploaded logo replaces the wordmark when present. */
.site-title.has-logo {
  font-size: 0;
  letter-spacing: normal;
  text-transform: none;
}
.site-title.has-logo img {
  max-width: 160px;
  max-height: 80px;
  width: auto;
  height: auto;
  display: block;
}

.site-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link, .nav-sublink {
  display: block;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 6px 0;
}
.nav-link { color: var(--ink); font-weight: 500; }
.nav-link.active, .nav-sublink.active { color: var(--ink); font-weight: 500; }
.nav-link:hover, .nav-sublink:hover { color: var(--hover); }

.nav-group {
  margin: 2px 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-sublink {
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 4px 0;
}

.sidebar-foot {
  margin-top: 24px;
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.8;
}
.sidebar-foot .social-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.sidebar-foot .social-link svg {
  width: 24px;
  height: 24px;
  display: block;
}
.sidebar-foot .social-link:hover { color: var(--ink); }

/* ── Content area ────────────────────────────────────────────────── */
.content {
  margin-left: var(--sb-w);
  min-height: 100vh;
  padding: var(--pad);
}

/* ── Homepage: hero artwork slideshow fills the space ────────────── */
.home-stage {
  margin: calc(var(--pad) * -1);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.home-empty {
  padding: 80px;
  text-align: center;
  color: var(--ink-2);
  font-size: 14px;
}
.home-empty a { color: var(--ink); text-decoration: underline; }

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 80px);
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide a {
  display: block;
  max-width: 100%;
  max-height: 100%;
}
.slide img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.slide-caption {
  position: absolute;
  bottom: clamp(20px, 3vw, 36px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-2);
  text-align: center;
  letter-spacing: 0.01em;
}
.slide-caption em { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }

/* Slideshow controls */
.stage-nav {
  position: absolute;
  bottom: clamp(20px, 3vw, 36px);
  right: clamp(20px, 3vw, 36px);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-2);
  z-index: 5;
}
.stage-nav button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-2);
  padding: 4px 6px;
  font: inherit;
  font-size: 13px;
  transition: color var(--t);
}
.stage-nav button:hover { color: var(--ink); }
.stage-nav .counter {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.stage-nav.is-hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Gallery (collection / shop) ─────────────────────────────────── */
.gallery-head {
  margin-bottom: clamp(32px, 4vw, 56px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.gallery-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.gallery-meta {
  font-size: 12px;
  color: var(--ink-2);
}

.gallery-list {
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 10vw, 140px);
  max-width: 1100px;
}
.gallery-item {
  display: block;
}
.gallery-item img {
  width: 100%;
  height: auto;
  margin-bottom: 18px;
}
.gallery-item .gi-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 2px;
}
.gallery-item .gi-meta {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0;
}
.gallery-item .gi-title em,
.gallery-item .gi-meta em {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

.gi-frame {
  width: 100%;
  background: #f6f6f6;
  margin-bottom: 18px;
  overflow: hidden;
}
.gi-frame img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}
.gallery-item img { margin-bottom: 0; }
.gallery-item .gi-price {
  font-size: 12px;
  color: var(--ink);
  margin-top: 6px;
}
.gi-sold {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.empty {
  padding: 120px 0;
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
}

/* ── Artwork detail ──────────────────────────────────────────────── */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(40px, 5vw, 72px);
  max-width: 1300px;
  align-items: start;
}
.detail-image {
  width: 100%;
  height: auto;
}
.detail-side {
  position: sticky;
  top: var(--pad);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}
.detail-side .d-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}
.detail-side .d-title em {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}
.detail-side .d-sub {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0 0 24px;
}
.detail-side dl {
  margin: 0 0 28px;
  padding: 0;
}
.detail-side dt {
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 14px;
}
.detail-side dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
}
.detail-side .d-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.75;
  margin: 0 0 28px;
  white-space: pre-line;
}
.detail-side .d-price {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 18px;
}
.detail-side .d-sold {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background var(--t), color var(--t);
}
.btn:hover { background: var(--hover); color: #fff; }
.btn.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ── About ───────────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  max-width: 1100px;
  align-items: start;
}
.about-portrait {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f6f6f6;
  overflow: hidden;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-name {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.about-tagline {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0 0 28px;
}
.about-body {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink);
  max-width: 60ch;
  margin: 0 0 36px;
  white-space: pre-line;
}
.cv-head {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.cv-list { list-style: none; padding: 0; margin: 0; max-width: 60ch; }
.cv-list li {
  padding: 10px 0;
  font-size: 13px;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.cv-list li:last-child { border-bottom: 1px solid var(--line); }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact {
  max-width: 480px;
}
.contact-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--ink);
}
.contact p {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink);
  margin: 0 0 16px;
}
.contact .email-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* ── Artwork prev/next ───────────────────────────────────────────── */
.artwork-nav {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
  max-width: 1300px;
}
.artwork-nav a {
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.artwork-nav a:hover { color: var(--ink); }
.artwork-nav .pn-spacer { flex: 1; }
.artwork-nav .pn-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.artwork-nav .pn-title em {
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

/* Nav backdrop (mobile only — hidden by default) */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 90;
}

/* ── Mobile toggle ───────────────────────────────────────────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 10px; right: 12px;
  z-index: 200;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 13px 10px;
  flex-direction: column;
  justify-content: space-between;
}
.mobile-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
  transition: transform var(--t), opacity var(--t);
}

/* ── Tablet (801–1100px): tighten sidebar so content breathes ────── */
@media (min-width: 801px) and (max-width: 1100px) {
  :root { --sb-w: 196px; }
  .sidebar { padding: 36px 26px 28px; }
  .site-title { font-size: 20px; margin-bottom: 36px; }
  .detail { grid-template-columns: minmax(0, 1fr) 220px; }
}

/* ── Mobile (≤800px) ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  :root { --pad: 20px; }
  body { font-size: 15px; }

  /* Sidebar becomes a fixed top bar; title is always visible. */
  .sidebar {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: auto;
    width: 100%;
    height: auto;
    padding: 0;
    background: #fff;
    border-right: none;
    border-bottom: 1px solid var(--line);
    z-index: 100;
    transform: none;
  }
  body.nav-open { overflow: hidden; }

  /* Tap-outside-to-close backdrop */
  .nav-backdrop { display: block; }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* Subtle shadow under the top bar once the page is scrolled */
  .sidebar.is-scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .site-title {
    margin: 0;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-right: 60px;
    padding-bottom: 12px;
    padding-left: max(20px, env(safe-area-inset-left));
    font-size: 18px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.01em;
  }
  .site-title br { display: none; }
  .site-title .st-1::after { content: " "; }

  .site-title.has-logo img {
    max-height: 36px;
    max-width: 180px;
  }

  /* Nav and footer collapse; expand when nav-open. */
  .site-nav,
  .sidebar-foot {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    margin: 0;
    flex: 0;
    border-top: 1px solid transparent;
    transition: max-height 0.32s ease, padding 0.32s ease, border-color 0.15s ease;
  }
  body.nav-open .site-nav {
    max-height: calc(100dvh - 60px);
    padding: 10px 20px 14px;
    overflow-y: auto;
    border-top-color: var(--line);
  }
  body.nav-open .sidebar-foot {
    max-height: 120px;
    padding: 14px 20px 18px;
    border-top-color: var(--line);
    display: block;
  }
  .nav-link, .nav-sublink { padding: 12px 0; font-size: 14px; }
  .nav-group { margin: 0 0 14px 12px; gap: 0; }
  .sidebar-foot .social-link { margin-bottom: 4px; }
  .sidebar-foot .social-link svg { width: 22px; height: 22px; }

  /* Burger toggle */
  .mobile-toggle {
    display: flex;
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
  body.nav-open .mobile-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .mobile-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .mobile-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Content sits below the top bar (~54px). */
  .content {
    margin-left: 0;
    padding: 72px var(--pad) 40px;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Home slideshow: slides cover the top, controls anchor at the bottom. */
  .home-stage {
    margin: -16px calc(var(--pad) * -1) calc(var(--pad) * -1);
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 18px;
    overflow: hidden;
  }
  .slide {
    inset: 0 0 86px 0;
    padding: 24px 18px;
  }
  .slide img {
    max-height: calc(100vh - 220px);
    max-height: calc(100dvh - 220px);
  }
  .slide-caption {
    position: static;
    transform: none;
    padding: 6px 20px 0;
    order: 2;
    text-align: center;
    font-size: 12px;
  }
  .stage-nav {
    position: static;
    justify-content: center;
    padding: 6px 0 0;
    order: 3;
    gap: 22px;
    font-size: 12px;
  }
  .stage-nav button { padding: 6px 8px; }

  /* Gallery / collection / shop */
  .gallery-head { margin-bottom: 28px; }
  .gallery-title { font-size: 18px; }
  .gallery-list { gap: clamp(56px, 12vw, 90px); }
  .gallery-item img { margin-bottom: 14px; }
  .gi-title, .gi-meta, .gi-price { font-size: 13px; }

  /* Artwork detail */
  .detail { grid-template-columns: 1fr; gap: 28px; max-width: 100%; }
  .detail-side { position: static; }
  .detail-side .d-title { font-size: 17px; }
  .detail-side .d-desc { font-size: 14px; }
  .detail-side .d-price { font-size: 15px; }
  .btn { padding: 14px 26px; width: auto; }
  .btn[type="submit"], form .btn { width: 100%; text-align: center; }

  /* Sticky purchase/inquire CTA at the bottom of the viewport */
  body.page-artwork .content { padding-bottom: 104px; }
  .detail-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .detail-cta .d-price,
  .detail-cta .d-sold {
    margin: 0;
    flex-shrink: 0;
    font-size: 15px;
  }
  .detail-cta .d-sold {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-3);
    flex-shrink: 1;
  }
  .detail-cta form { flex: 1; margin: 0; min-width: 0; }
  .detail-cta a.btn { flex: 1; text-align: center; min-width: 0; }
  .detail-cta .btn {
    width: 100%;
    padding: 14px 18px;
  }
  /* Sold state: center the "— Sold" + Inquire button cleanly */
  .detail-cta:not(:has(form)) {
    justify-content: space-between;
  }

  /* Artwork prev/next stacks */
  .artwork-nav {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    margin-top: 40px;
  }
  .artwork-nav .pn-spacer { display: none; }
  .artwork-nav a { padding: 4px 0; }
  .artwork-nav a[style*="right"] { text-align: left !important; }

  /* About */
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about-portrait { max-width: 260px; margin: 0 auto; }
  .about-name { font-size: 18px; }
  .about-body { font-size: 14px; line-height: 1.8; }
  .cv-list li { font-size: 14px; }

  /* Contact */
  .contact-title { font-size: 18px; }
  .contact p { font-size: 14px; }
  .contact .email-link { font-size: 15px; word-break: break-all; }
}

/* ── Small phones (≤420px): trim further ─────────────────────────── */
@media (max-width: 420px) {
  :root { --pad: 16px; }
  .site-title {
    font-size: 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: 56px;
    padding-bottom: 10px;
    padding-left: max(18px, env(safe-area-inset-left));
  }
  .gallery-title,
  .about-name,
  .detail-side .d-title,
  .contact-title { font-size: 17px; }
  .slide { inset: 0 0 78px 0; padding: 16px 12px; }
  .slide img {
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
  }
  .stage-nav { gap: 18px; }
}

@media print {
  .sidebar, .mobile-toggle, .stage-nav, .artwork-nav, .btn, .skip-link { display: none !important; }
  .content { margin-left: 0; padding: 0; }
  body { font-size: 11pt; }
  a { color: #000; text-decoration: none; }
}
