/* =========================================================================
   James Chapman - artist site
   Single stylesheet. Reconstructs the established look: oxblood masthead,
   text wordmark with a red full-stop accent, italic captions, grey footer.
   Responsive, accessible focus states, reduced-motion aware.
   ========================================================================= */

:root {
  /* Exact fill from images/logo.svg, so the bar matches the logo. */
  --header-red: #931206;

  --oxblood: #5a1220;   /* darker accent for headings/rules, not the header */
  --accent:  #c0392b;   /* focus ring / hover */
  --ink:     #1a1a1a;
  --muted:   #6c757d;
  --paper:   #ffffff;
  --rule:    #e6e6e6;
  --maxw:    820px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* --- Skip link --------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--oxblood);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Screen-reader-only ------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Masthead ---------------------------------------------------------- */
.masthead {
  background: var(--header-red);
  padding: 22px 24px;
  text-align: center;
}
.logo { display: inline-block; }
.logo img {
  display: block;
  height: 44px;
  width: auto;
}

/* --- Layout ------------------------------------------------------------ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* --- Hero -------------------------------------------------------------- */
.hero { margin: 0 0 32px; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
}
.hero figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* --- Statement --------------------------------------------------------- */
.statement p {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 0 0 40px;
}

/* --- Biography and other sections ------------------------------------- */
.bio h2, .connect h2 {
  font-size: 1.4rem;
  margin: 40px 0 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--oxblood);
}
.bio h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oxblood);
  margin: 28px 0 8px;
}
.born { font-style: italic; color: var(--muted); }
.affiliation { margin: 4px 0 0; }

ul.exhibitions, ul.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.exhibitions li, ul.plain li {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
ul.exhibitions li {
  /* Hanging indent: a line that wraps (e.g. Germinations 8) continues
     under the title rather than under the year, so it reads as one entry. */
  padding-left: 3.6em;
  text-indent: -3.6em;
}
ul.exhibitions li:last-child, ul.plain li:last-child { border-bottom: 0; }

.exhibitions .yr {
  display: inline-block;
  min-width: 3.4em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.exhibitions .show { font-weight: 600; }

a { color: var(--oxblood); }
a:hover { color: var(--accent); }

/* --- Endnote markers --------------------------------------------------- */
.fn { font-size: 0.7em; line-height: 0; }
.fn a {
  text-decoration: none;
  color: var(--muted);
  padding: 0 0.15em;
}
.fn a:hover, .fn a:focus-visible { color: var(--accent); }

/* --- References -------------------------------------------------------- */
.references h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--oxblood);
  border-bottom: 0;
  margin: 44px 0 8px;
}
ol.refs {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
ol.refs li { padding: 4px 0; }
ol.refs a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
ol.refs a:hover, ol.refs a:focus-visible { color: var(--accent); }
.backref { text-decoration: none; padding-left: 0.2em; }

/* --- Profiles line ----------------------------------------------------- */
.profiles {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 12px;
}

/* --- Footer ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
}

/* --- Focus states (visible for keyboard users) ------------------------- */
a:focus-visible, .logo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 480px) {
  body { font-size: 17px; }
  .statement p { font-size: 1.08rem; }
  .exhibitions .yr { display: block; min-width: 0; }
  ul.exhibitions li { padding-left: 0; text-indent: 0; }
}

/* --- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
