/* michaelthecurate.com
   Palette: gesso off-white ground, ink text, one restrained slate accent.
   Type: Newsreader for words, IBM Plex Mono for measurements and labels. */

:root {
  --paper:      #F6F5F1;
  --paperDeep:  #EFEDE7;
  --ink:        #16181A;
  --muted:      #6E7276;
  --rule:       #DCD9D1;
  --accent:     #26384E;
  --stage:      #101215;

  --measure: 34rem;
  --wide: 68rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  font-weight: 300;
  line-height: 1.62;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.dim { color: var(--muted); }

.skiplink {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem;
}
.skiplink:focus { left: var(--gutter); top: 0.5rem; z-index: 50; }

/* ---------------------------------------------------------- masthead ---- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem) var(--gutter) 1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-size: clamp(1.35rem, 1.6vw + 1rem, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.wordmark em { font-style: italic; font-weight: 300; }

.nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.nav a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current] { border-bottom-color: var(--ink); }

/* -------------------------------------------------------------- hero ---- */

.hero { padding-top: clamp(2.5rem, 6vw, 5rem); }

.thesis {
  max-width: 24ch;
  margin: 0 var(--gutter) clamp(1.75rem, 4vw, 2.75rem);
  font-size: clamp(2rem, 5.2vw, 3.9rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.herocaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.5rem;
  margin: 1rem var(--gutter) 0;
}
.herocaption em { font-size: 1.15rem; }
.herocaption .mono { color: var(--muted); }
.herocaption a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.herocaption a:hover { border-bottom-color: var(--accent); }

/* ------------------------------------------------------------ viewer ---- */

.viewer { margin: 0; position: relative; }

.viewer-stage {
  width: 100%;
  height: 100%;
  background: var(--stage);
}

.viewer-tall { height: clamp(20rem, 64vh, 40rem); }

.viewer.empty {
  display: grid;
  place-items: center;
  background: var(--paperDeep);
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

.viewer-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem var(--gutter);
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
.viewer-bar .hint { opacity: 0.75; }

.viewpicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem var(--gutter) 0;
}
.viewpick {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.viewpick:hover { border-color: var(--accent); color: var(--ink); }
.viewpick[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }

/* the OpenSeadragon control buttons, toned down */
.openseadragon-container .navigator { border-color: rgba(255,255,255,0.25) !important; }

/* ------------------------------------------------------------- bands ---- */

.band {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.75rem, 7vw, 5.5rem) var(--gutter) 0;
}
.band:last-child { padding-bottom: clamp(3rem, 8vw, 6rem); }
.bandtop { padding-top: clamp(2rem, 5vw, 3.5rem); }
.narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.lede {
  max-width: 46ch;
  margin: 0 0 2.5rem;
  font-size: clamp(1.15rem, 1vw + 1rem, 1.4rem);
  line-height: 1.5;
}

.pagehead {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pagehead em { font-style: italic; }

.sectionhead {
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-weight: 500;
}

.statement { max-width: var(--measure); }
.statement p { margin: 0 0 1.15em; }

/* ------------------------------------------------------------- cards ---- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border: 1px solid var(--rule);
}
.cards a {
  display: block;
  background: var(--paper);
  padding: 1.5rem 1.4rem 1.75rem;
  height: 100%;
  text-decoration: none;
  transition: background 160ms ease;
}
.cards a:hover { background: var(--paperDeep); }
.cardtitle { display: block; font-size: 1.35rem; }
.cardcount { display: block; color: var(--muted); margin: 0.35rem 0 0.8rem; }
.cardblurb { display: block; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------------- work list --- */

.worklist { list-style: none; margin: 0; padding: 0; }

.workrow { border-top: 1px solid var(--rule); }
.workrow:last-child { border-bottom: 1px solid var(--rule); }

.workrow a {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 0.5rem;
  text-decoration: none;
  transition: background 160ms ease;
}
.workrow a:hover { background: var(--paperDeep); }

.workrow-thumb { overflow: hidden; background: var(--paperDeep); }
.workrow-thumb img {
  width: 5rem; height: 5rem; object-fit: cover;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.workrow a:hover .workrow-thumb img { transform: scale(1.06); }

.worktitle { display: block; font-size: 1.25rem; font-style: italic; }
.workmeta { display: block; color: var(--muted); margin-top: 0.3rem; }
.workyear { color: var(--muted); }

.breadcrumb { color: var(--muted); margin: 0 0 1rem; }
.breadcrumb a { text-decoration: none; border-bottom: 1px solid var(--rule); }

/* Sold. A small tilted stamp in oxide red — the angle gives it the stamped
   quality without a graphic. Raise --stampInk toward #C1272D for something
   louder, or drop the rotate() for something flatter. */
.sold {
  --stampInk: #A3382F;
  display: inline-block;
  margin-left: 0.85rem;
  padding: 0.22em 0.6em 0.18em;
  transform: rotate(-6deg);
  border: 1.5px solid var(--stampInk);
  color: var(--stampInk);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  vertical-align: middle;
  opacity: 0.85;
}

.soldsmall {
  margin-left: 0.6rem;
  font-size: 0.55rem;
  padding: 0.18em 0.45em 0.14em;
}

.credit {
  margin-top: 1.75rem;
  color: var(--muted);
}
.credit a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
.credit a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.availability {
  max-width: var(--measure);
  margin: 2.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.enquire { margin-top: 1.1rem; }
.enquire a {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.7rem 1.4rem;
  text-decoration: none;
}
.enquire a:hover { background: var(--ink); color: var(--paper); }

.enquireaddress {
  margin: 0.7rem 0 0;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.04em;
  user-select: all;
}
.enquireaddress a { color: inherit; border-bottom: 1px solid var(--rule); text-decoration: none; }
.enquireaddress a:hover { color: var(--accent); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--ink); }

.contact { font-size: 1.3rem; margin: 0 0 0.4rem; }

/* ------------------------------------------------------------ footer ---- */

.footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
}
.footer p { margin: 0 0 0.4rem; }
.footer .mono { color: var(--muted); }

/* ------------------------------------------------------------ mobile ---- */

@media (max-width: 34rem) {
  .workrow a { grid-template-columns: 4rem 1fr; row-gap: 0.25rem; }
  .workrow-thumb img { width: 4rem; height: 4rem; }
  .workyear { grid-column: 2; }
  .viewer-bar .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
