/* ==========================================================================
   georgeryan.com
   The original Elegant Themes "Flexible" design, rebuilt: same cream page and
   white content card, same Raleway-light uppercase headings over Kreon, same
   warm grey ink. Modernised in the plumbing rather than the look — fluid
   widths, a real mobile nav, responsive images, larger body type.
   ========================================================================== */

:root {
  /* taken from the live site */
  --paper:      #f5f5ec;   /* page background */
  --card:       #ffffff;   /* content area */
  --ink:        #676761;   /* body copy, nav, breadcrumbs */
  --ink-strong: #3c3c38;   /* headings and photo titles */
  --ink-soft:   #908f86;   /* captions, meta, disabled */
  --rule:       #f0f0e5;   /* the theme's hairline */
  --rule-2:     #e3e3d6;   /* a slightly firmer edge */
  --accent:     #8a7f63;   /* warm tone for links on hover */
  --frame:      #ffffff;   /* photo mat */

  --serif: Kreon, Georgia, "Times New Roman", serif;
  --display: Raleway, "Helvetica Neue", Arial, sans-serif;

  --content-w: 960px;                               /* the original's column */
  --card-w: calc(var(--content-w) + 2 * var(--gut));
  --gut: clamp(1.1rem, 3.5vw, 2.6rem);
  --head-h: 67px;
  --head-pad: clamp(1rem, 2vw, 1.4rem);  /* space above the wordmark and menu */

  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  display: flex; flex-direction: column; min-height: 100dvh;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.18; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--rule-2); margin: 1.8rem 0; }

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

.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;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--ink-strong); color: var(--paper);
  padding: .6rem 1rem; text-decoration: none; transition: top .2s;
}
.skip:focus { top: 1rem; }

/* Headings keep the theme's thin uppercase Raleway. */
.display {
  font-family: var(--display);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--ink-strong);
}

/* --- frame ---------------------------------------------------------------- */

.wrap { width: 100%; max-width: var(--card-w); margin-inline: auto; padding-inline: var(--gut); }

.card {
  width: 100%; max-width: var(--card-w); margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
}
@media (max-width: 760px) {
  .card { border-left: 0; border-right: 0; border-radius: 0; }
}
.card-pad { padding: 0 var(--gut) clamp(2rem, 5vw, 3.4rem); }

/* --- header --------------------------------------------------------------- */

/* The original sat the wordmark flush with the top-left of the content column
   and the menu flush right, both hard against the top of the page rather than
   centred in a bar. */
.site-head { padding: var(--head-pad) 0 0; }
.head-inner {
  max-width: var(--card-w); margin-inline: auto; padding: 0;
  min-height: var(--head-h);
  display: flex; align-items: flex-start; gap: 1.5rem;
}
/* once the card no longer reaches the viewport edges, flush is safe */
@media (max-width: 1100px) { .head-inner { padding-inline: var(--gut); } }

.wordmark { display: block; margin-right: auto; flex: none; padding-bottom: 5px; }
.wordmark img { width: 200px; height: 36px; }
@media (max-width: 420px) { .wordmark img { width: 160px; height: 29px; } }

/* nav — Kreon, uppercase, the theme's own treatment */
.site-nav { font-family: var(--serif); font-size: .9rem; }
.nav-list { display: flex; align-items: center; gap: .1rem; }
.nav-top {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .45rem .6rem; border: 0; background: none; cursor: pointer;
  text-decoration: none; color: var(--ink);
  text-transform: uppercase; font-weight: 500; letter-spacing: .01em;
  white-space: nowrap;
  transition: color .15s;
}
.nav-top:hover, .nav-group[data-open] > .nav-top { color: var(--ink-strong); }
.nav-top[aria-current="page"] { color: var(--ink-strong); }
.nav-top .raquo { opacity: .55; font-size: .95em; }

.nav-group { position: relative; }
.nav-menu {
  position: absolute; top: calc(100% + 2px); left: 0; min-width: 240px;
  background: var(--card); border: 1px solid var(--rule-2);
  padding: .3rem; box-shadow: 0 10px 30px -14px rgba(60, 60, 56, .4);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s, transform .14s var(--ease), visibility .14s;
  z-index: 50;
}
.nav-group[data-open] > .nav-menu { opacity: 1; visibility: visible; transform: none; }
.nav-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .45rem .6rem; text-decoration: none; color: var(--ink);
  font-size: .88rem; text-transform: none;
}
.nav-menu a:hover { background: var(--paper); color: var(--ink-strong); }
.nav-menu a[aria-current="page"] { color: var(--ink-strong); }
.nav-menu .nav-sub { padding-left: .9rem; }
.nav-menu .nav-sub-head {
  padding: .55rem .6rem .2rem; font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.ext { opacity: .45; font-size: .8em; }

.head-tools { display: flex; align-items: flex-start; gap: .1rem; flex: none; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; color: var(--ink);
  transition: color .15s;
}
.icon-btn:hover { color: var(--ink-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn .bar { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .2s var(--ease); }
.menu-btn[aria-expanded="true"] .bar:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bar:last-child { transform: translateY(-2.75px) rotate(-45deg); }

@media (max-width: 1100px) {
  .menu-btn { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
    background: var(--card); border-block: 1px solid var(--rule-2);
    padding: .5rem var(--gut) 1.25rem;
    max-height: calc(100dvh - var(--head-h) - var(--head-pad)); overflow: auto;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s, transform .16s var(--ease), visibility .16s;
    box-shadow: 0 16px 40px -20px rgba(60, 60, 56, .45);
  }
  .site-head { position: relative; }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li + li { border-top: 1px solid var(--rule); }
  .nav-top { width: 100%; justify-content: space-between; padding: .75rem .2rem; font-size: 1rem; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0 0 .6rem .2rem; display: none; min-width: 0;
  }
  .nav-group[data-open] > .nav-menu { display: block; }
  .nav-menu a { padding: .5rem .4rem; font-size: .95rem; }
}

/* --- homepage ------------------------------------------------------------- */

.slider {
  position: relative; overflow: hidden;
  background: var(--paper);
  /* One frame for every slide, so the panel never jumps. All four of the
     chosen photographs are 3:2, so at this ratio none of them is cropped at
     all. Recompute if the slides change: the right frame is the geometric
     mean of their aspect ratios, which crops them all equally. */
  aspect-ratio: 3 / 2;
}
.slide {
  position: absolute; inset: 0; display: block;
  opacity: 0; transition: opacity .9s var(--ease);
  background-size: cover; background-position: center;
  /* The slides are stacked, so a hidden one must not take the click. Without
     this the last slide in the markup sits on top of all the others and every
     click followed ITS link, whichever picture was actually showing. */
  pointer-events: none;
}
.slide.is-on { opacity: 1; pointer-events: auto; }
/* The <picture> has to be told to fill the frame. Without a height it sizes
   to its own image, the img's height:100% resolves against that, and the blur
   placeholder behind it shows as a band along the bottom. */
.slide > picture { display: block; width: 100%; height: 100%; }
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, center);   /* per-slide nudge, if one ever needs it */
}
/* The arrows and dots stay out of the picture until it is pointed at. They
   come back for keyboard focus, and on touch, where there is no hover and the
   controls would otherwise be unreachable. */
.slider-nav, .slider-dots {
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.slider:hover .slider-nav,
.slider:hover .slider-dots,
.slider:focus-within .slider-nav,
.slider:focus-within .slider-dots { opacity: 1; }
@media (hover: none) {
  .slider-nav, .slider-dots { opacity: 1; }
}

.slider-nav {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .8); color: var(--ink-strong);
  display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
  transition: background .18s;
}
.slider-nav:hover { background: #fff; }
.slider-prev { left: 0; }
.slider-next { right: 0; }
.slider-dots {
  position: absolute; z-index: 3; right: .7rem; bottom: .7rem;
  display: flex; gap: .35rem;
}
.slider-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .55);
  transition: background .2s;
}
.slider-dots button[aria-selected="true"] { background: #fff; }

.quote {
  text-align: center;
  padding: clamp(2.2rem, 5vw, 3.4rem) var(--gut);
}
.quote h2 {
  font-family: var(--display); font-weight: 200;
  /* One line. The size is tied to the viewport so a 45-character quote fits
     across the range rather than being capped at a width that wraps it. */
  font-size: min(2.1rem, 3.6vw);
  white-space: nowrap;
  color: var(--ink); line-height: 1.35;
  margin-inline: auto;
}
/* Too narrow for one line at a readable size, so let it wrap again. */
@media (max-width: 700px) {
  .quote h2 {
    font-size: clamp(1.25rem, 4.4vw, 1.6rem);
    white-space: normal;
    max-width: 26ch;
  }
}
.quote p {
  margin: .9rem 0 0; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
}

/* the homepage's gapless 4-up strip */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
@media (max-width: 760px) { .strip { grid-template-columns: repeat(2, 1fr); } }
.strip a { display: block; position: relative; aspect-ratio: 1; overflow: hidden; }
/* The <picture> needs the height too. Without it the img's height:100%
   resolves against an auto-height parent and the tile is left part empty. */
.strip a > picture { display: block; width: 100%; height: 100%; }
.strip img { width: 100%; height: 100%; object-fit: cover; }

/* --- breadcrumbs, page head ----------------------------------------------- */

.crumbs {
  border-bottom: 1px solid var(--rule);
  padding: .85rem 0;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.crumbs li + li::before { content: "»"; margin-right: .4rem; opacity: .6; }
.crumbs a { text-decoration: none; color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink-strong); }
.crumbs li[aria-current] { color: var(--ink); }

.page-head { padding: clamp(1.3rem, 3vw, 1.9rem) 0 0; }
.page-head h1 {
  font-family: var(--display); font-weight: 200; text-transform: uppercase;
  letter-spacing: .015em; color: var(--ink-strong);
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
}
.page-sub {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--ink); margin: 1.1rem 0 0; line-height: 1.5;
}
.page-note { margin: .9rem 0 0; font-size: .95rem; color: var(--ink); max-width: 72ch; }
.page-count {
  margin: .9rem 0 0; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft);
}
.head-rule { border: 0; border-top: 1px solid var(--rule-2); margin: clamp(1.3rem, 3vw, 1.9rem) 0 0; }

/* the page's own lead photograph, as the theme showed it */
/* The original never cropped a page's banner: it ran the full width of the
   content column at the photograph's own aspect ratio. */
.page-photo {
  margin: clamp(1.2rem, 3vw, 1.7rem) 0 0;
  background-size: cover; background-position: center;
}
.page-photo > picture { display: block; }
.page-photo img { width: 100%; height: auto; }

/* --- photo grids ---------------------------------------------------------- */

/* Portfolio layout: the title sits above its photograph, as on the old site. */
/* Two columns inside the 960px column. The cell is 442px so that, once the
   mat's 5px border and 1px hairline are taken off, the photograph itself is
   430x283, exactly as the original rendered it. */
.portfolio {
  display: grid; gap: clamp(1.4rem, 3.2vw, 2.4rem) 36px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  padding-inline: 20px;
  margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
}
.pf { text-decoration: none; display: block; }
.pf-title {
  display: block; font-family: var(--display); font-weight: 300;
  font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-strong);
  margin-bottom: .6rem; line-height: 1.3;
}
.pf:hover .pf-title { color: var(--accent); }
.pf-note { display: block; margin-top: .55rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }

/* The theme matted every thumbnail in white with a hairline and soft shadow. */
.mat {
  display: block; position: relative; overflow: hidden;
  background: var(--frame) center / cover;
  padding: 5px; border: 1px solid var(--rule-2);
  box-shadow: 0 1px 3px rgba(60, 60, 56, .09);
  transition: box-shadow .22s, border-color .22s;
}
.pf:hover .mat, .thumb:hover .mat { box-shadow: 0 4px 14px rgba(60, 60, 56, .17); border-color: #d6d6c6; }
.mat > picture { display: block; }
.mat img { width: 100%; display: block; }
.mat.fixed img { aspect-ratio: 430 / 283; height: auto; object-fit: cover; }

/* Gallery layout: small matted thumbnails, four across, no titles. */
/* Four columns, sized so the photograph inside the mat is 213x142. */
.thumbs {
  display: grid; gap: 24px 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr));
  padding-inline: 15px;
  margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
}
.thumb { display: block; text-decoration: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; width: 100%; }
.thumb .mat img { aspect-ratio: 213 / 142; height: auto; object-fit: cover; }
.thumb-cap {
  display: block; margin-top: .5rem; font-size: .82rem;
  color: var(--ink-soft); line-height: 1.45;
}

/* Collections: a bigger card with the set name and count. */
.sets {
  display: grid; gap: clamp(1.4rem, 3vw, 2.2rem) 36px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  padding-inline: 20px;
  margin-top: clamp(1.6rem, 3.5vw, 2.4rem);
}
.set { text-decoration: none; display: block; }
.set .mat img { aspect-ratio: 430 / 283; height: auto; object-fit: cover; }
.set-title {
  display: block; font-family: var(--display); font-weight: 300;
  font-size: 1.2rem; color: var(--ink-strong); margin-top: .65rem; line-height: 1.3;
}
.set:hover .set-title { color: var(--accent); }
.set-meta {
  display: block; margin-top: .2rem; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
}

/* --- entry ---------------------------------------------------------------- */

.entry { padding-top: clamp(1.2rem, 3vw, 1.8rem); }
.entry-photo { margin: 0 0 clamp(1.2rem, 3vw, 1.8rem); background-size: cover; background-position: center; }
.entry-photo button {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; position: relative;
}
.entry-photo img { width: 100%; height: auto; }
.entry-photo figcaption, .prose figcaption {
  margin-top: .7rem; font-size: .9rem; color: var(--ink-soft);
}
.zoom-hint {
  position: absolute; right: .7rem; bottom: .7rem;
  background: rgba(255, 255, 255, .9); color: var(--ink-strong);
  font-size: .66rem; text-transform: uppercase; letter-spacing: .1em;
  padding: .35rem .7rem; opacity: 0; transition: opacity .22s;
}
.entry-photo button:hover .zoom-hint, .entry-photo button:focus-visible .zoom-hint { opacity: 1; }

.entry-meta {
  margin: 0 0 1.2rem; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft);
}
.entry-meta a { color: var(--ink-soft); }
.entry-meta a:hover { color: var(--accent); }

.prose { font-size: 1.04rem; line-height: 1.75; max-width: 70ch; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font-family: var(--display); font-weight: 300; font-size: 1.5rem; color: var(--ink-strong); margin: 1.7em 0 .5em; }
.prose h3 { font-family: var(--display); font-weight: 300; font-size: 1.25rem; color: var(--ink-strong); margin: 1.5em 0 .4em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose em, .prose i { font-style: italic; }
.prose strong, .prose b { font-weight: 700; }
.prose blockquote {
  margin: 1.4em 0; padding-left: 1.1rem;
  border-left: 2px solid var(--rule-2); color: var(--ink);
}
.prose ul { list-style: disc; padding-left: 1.3em; margin: 0 0 1.05em; }
.prose ol { list-style: decimal; padding-left: 1.4em; margin: 0 0 1.05em; }
.prose li { margin-bottom: .35em; }
.prose iframe, .prose video { max-width: 100%; }

.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  border-top: 1px solid var(--rule-2);
  margin-top: clamp(2rem, 5vw, 3rem); padding-top: 1.3rem;
}
.pager-link { text-decoration: none; display: block; }
.pager-link.next { text-align: right; }
.pager-dir { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }
.pager-title { display: block; margin-top: .2rem; font-family: var(--display); font-weight: 300; font-size: 1.05rem; color: var(--ink-strong); }
.pager-link:hover .pager-title { color: var(--accent); }

/* --- blog: the original's timeline ----------------------------------------
   Two columns of 560px inside a 1120px canvas, entries alternating left and
   right down a centre axis, each card inset 28px and matted in white with a
   hairline. The photograph inside lands at 474px, as it does on the live site.
   -------------------------------------------------------------------------- */

/* --card-w is resolved where it is declared, so the blog has to restate it
   rather than just widening --content-w. */
body.is-blog {
  --content-w: 1120px;
  --card-w: calc(1120px + 2 * var(--gut));
}

.timeline { position: relative; margin-top: clamp(1.6rem, 3.5vw, 2.4rem); }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; margin-left: -1px; background: #e5e5e5;
}
.timeline::after { content: ""; display: block; clear: both; }

/* the card is inset 28px on both sides of its column, as the original was */
/* The original stacks these in one sequential stream: every card sits wholly
   below the one before it and only alternates which side of the axis it takes.
   Floating them into two independent columns packs them together and loses all
   the air, which is the whole look. */
.tl-item { position: relative; width: 50%; margin: 0 0 42px; padding-inline: 28px; }
.tl-item.is-right { margin-left: 50%; }
.tl-item[hidden] { display: none; }

/* the marker sitting on the axis */
.tl-item::after {
  content: ""; position: absolute; top: 20px;
  width: 15px; height: 15px; border-radius: 50%;
  background: #c3ccdf; border: 5px solid var(--card);
  box-sizing: content-box;
}
.tl-item.is-left::after  { right: -12px; }
.tl-item.is-right::after { left: -12px; }

.tl-card {
  position: relative;
  background: var(--card); border-radius: 3px;
  box-shadow: 0 1px 6px 2px rgba(0, 0, 0, .15);
  padding: 15px; text-align: center;
}
.tl-card a.tl-link { position: absolute; inset: 0; z-index: 1; }
.tl-card:hover { box-shadow: 0 2px 10px 3px rgba(0, 0, 0, .2); }

/* The card points at the axis: an 8px triangle in the line's grey, with a
   white one a pixel inside it so the card's own face carries through. */
.tl-card::before,
.tl-card::after {
  content: ""; position: absolute; top: 20px;
  width: 0; height: 0; border-style: solid;
}
.is-left .tl-card::before {
  right: -8px; border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent #e5e5e5;
}
.is-left .tl-card::after {
  right: -7px; border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent var(--card);
}
.is-right .tl-card::before {
  left: -8px; border-width: 8px 8px 8px 0;
  border-color: transparent #e5e5e5 transparent transparent;
}
.is-right .tl-card::after {
  left: -7px; border-width: 8px 8px 8px 0;
  border-color: transparent var(--card) transparent transparent;
}

/* the photograph carries its own thin frame, as it does on the live site */
.tl-photo { display: block; margin-bottom: 10px; position: relative; }
.tl-photo img {
  width: 100%; height: auto; display: block;
  background: var(--card); border: 1px solid #ddd; border-radius: 4px; padding: 4px;
}
.tl-badge {
  position: absolute; right: .5rem; top: .5rem; z-index: 2;
  background: rgba(255, 255, 255, .9); color: var(--ink-strong);
  font-size: .72rem; padding: .15rem .45rem;
}
.tl-card h2 {
  font-family: var(--display); font-weight: 300;
  font-size: 1.25rem; color: var(--ink-strong); margin-bottom: .4rem;
}
.tl-card .prose { font-size: 1rem; line-height: 1.45; max-width: none; text-align: center; }
.tl-card .prose p { margin: 0 0 .8em; }
.tl-card .prose > :last-child { margin-bottom: 0; }
.tl-date {
  margin: .8rem 0 0; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft);
}

@media (max-width: 820px) {
  .timeline::before { left: 10px; margin-left: 0; }
  .tl-item, .tl-item.is-left, .tl-item.is-right {
    width: 100%; margin-left: 0;
    padding-left: 34px; padding-right: 0;
  }
  .tl-item.is-left::after, .tl-item.is-right::after { left: -2px; right: auto; }
  .is-left .tl-card::before, .is-right .tl-card::before {
    left: -8px; right: auto; border-width: 8px 8px 8px 0;
    border-color: transparent #e5e5e5 transparent transparent;
  }
  .is-left .tl-card::after, .is-right .tl-card::after {
    left: -7px; right: auto; border-width: 8px 8px 8px 0;
    border-color: transparent var(--card) transparent transparent;
  }
}

.tl-more-wrap { clear: both; text-align: center; padding: 1rem 0 2.5rem; }
.tl-more {
  border: 1px solid var(--rule-2); background: var(--card); cursor: pointer;
  color: var(--ink); padding: .7rem 1.8rem;
  font-family: var(--serif); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .09em;
  transition: background .18s, color .18s, border-color .18s;
}
.tl-more:hover { background: var(--ink-strong); border-color: var(--ink-strong); color: var(--paper); }
.tl-more[hidden] { display: none; }

.paginate {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--rule-2); margin-top: clamp(1.8rem, 4vw, 2.6rem); padding-top: 1.2rem;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .05em;
  clear: both;
}
.pg { text-decoration: none; color: var(--ink); }
.pg:hover { color: var(--accent); }
.pg.is-off { color: var(--ink-soft); opacity: .5; }
.pg-count { font-size: .74rem; color: var(--ink-soft); }

.plainlist { margin-top: 1.6rem; border-top: 1px solid var(--rule); }
.plainlist li { border-bottom: 1px solid var(--rule); }
.plainlist a { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; padding: .8rem .2rem; text-decoration: none; }
.plainlist a:hover { background: var(--paper); }
.plainlist time { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); white-space: nowrap; }

/* --- contact, unbranded, compare ------------------------------------------ */

.contact-form { display: grid; gap: 1rem; max-width: 32rem; margin-top: 1.8rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); }
.field input, .field textarea {
  font: inherit; color: var(--ink-strong); background: #fcfcf7;
  border: 1px solid var(--rule-2); padding: .65rem .8rem; width: 100%;
  transition: border-color .16s, background .16s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field textarea { resize: vertical; min-height: 9rem; }
.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--ink-strong); cursor: pointer;
  background: var(--ink-strong); color: var(--paper);
  padding: .65rem 1.5rem; font-family: var(--display); font-weight: 400;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  transition: background .16s, color .16s;
}
.btn:hover { background: transparent; color: var(--ink-strong); }
.form-note { margin: 0; font-size: .88rem; }
.form-note.is-error { color: #a4452f; }
.form-note.is-ok { color: var(--accent); }
.contact-alt { margin-top: 2.4rem; }
.contact-alt h2 { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: .8rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.inline-links a { text-decoration: none; border-bottom: 1px solid var(--rule-2); padding-bottom: 2px; }
.inline-links a:hover { color: var(--accent); border-color: var(--accent); }

.unbranded { text-align: center; padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem); }
.unbranded img.ub-logo { margin: 0 auto 1.6rem; width: 240px; max-width: 70%; height: auto; }
.unbranded p { font-family: var(--display); font-weight: 300; font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--ink); max-width: 30ch; margin-inline: auto; }
.hosts { display: flex; justify-content: center; gap: clamp(1.2rem, 4vw, 3rem); margin-top: clamp(2rem, 5vw, 3rem); flex-wrap: wrap; }
.host { margin: 0; display: grid; gap: .7rem; justify-items: center; }
.host img { width: clamp(96px, 20vw, 140px); height: clamp(96px, 20vw, 140px); object-fit: cover; border-radius: 50%; filter: grayscale(1); transition: filter .35s; }
.host:hover img { filter: none; }
.host figcaption { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }

.compare {
  position: relative; aspect-ratio: 1 / var(--ar, .63);
  overflow: hidden; margin-top: 1.8rem; user-select: none;
  container-type: size; background: var(--paper);
  border: 1px solid var(--rule-2);
}
.cmp-img { position: absolute; inset: 0; }
.cmp-img > picture, .cmp-img img { width: 100%; height: 100%; object-fit: cover; }
.cmp-before { width: var(--split, 50%); overflow: hidden; z-index: 2; }
.cmp-before > picture, .cmp-before img { width: 100cqw; height: 100cqh; }
.cmp-tag {
  position: absolute; bottom: .7rem; z-index: 3;
  font-size: .64rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-strong); background: rgba(255, 255, 255, .9); padding: .28rem .6rem;
}
.cmp-before .cmp-tag { left: .7rem; }
.cmp-after .cmp-tag { right: .7rem; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; z-index: 4; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: #fff; pointer-events: none; z-index: 3; box-shadow: 0 0 0 1px rgba(60,60,56,.2); }
.cmp-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(60,60,56,.3);
}
@supports not (width: 1cqw) {
  .compare { aspect-ratio: auto; }
  .cmp-img { position: static; width: auto; }
  .cmp-img > picture, .cmp-img img { width: 100%; height: auto; }
  .cmp-range, .cmp-handle { display: none; }
  .cmp-tag { position: static; display: inline-block; margin: .4rem 0; }
}

/* --- 404 ------------------------------------------------------------------ */

.notfound { padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3rem); }

/* --- lightbox ------------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(32, 32, 29, .96);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .2s;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: min(94vw, 1800px); display: grid; gap: .85rem; }
.lb-figure img {
  max-width: min(94vw, 1800px); max-height: 80vh;
  width: auto; height: auto; margin-inline: auto; object-fit: contain;
}
.lb-figure figcaption {
  color: rgba(255, 255, 255, .78); font-size: .88rem;
  text-align: center; max-width: 70ch; margin-inline: auto;
}
.lb-figure figcaption:empty { display: none; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1; transition: background .16s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .24); }
.lb-close { top: 1rem; right: 1rem; font-size: 1.8rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .55); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .1em; margin: 0;
}
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next, .lightbox.is-single .lb-count { display: none; }
@media (max-width: 640px) {
  .lb-prev { left: .3rem; } .lb-next { right: .3rem; } .lb-close { top: .4rem; right: .4rem; }
}

/* --- search --------------------------------------------------------------- */

.search-overlay {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(245, 245, 236, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: clamp(1rem, 7vh, 5rem) var(--gut) 2rem; overflow: auto;
  opacity: 0; transition: opacity .16s;
}
.search-overlay.is-open { opacity: 1; }
.search-overlay[hidden] { display: none; }
.search-panel {
  max-width: 680px; margin-inline: auto; background: var(--card);
  border: 1px solid var(--rule-2); box-shadow: 0 20px 50px -24px rgba(60,60,56,.5);
}
.search-bar { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-bottom: 1px solid var(--rule); }
.search-bar svg { width: 17px; height: 17px; color: var(--ink-soft); flex: none; }
.search-bar input { flex: 1; font: inherit; font-size: 1.02rem; border: 0; background: none; color: var(--ink-strong); min-width: 0; }
.search-bar input:focus { outline: none; }
.search-close { border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink-soft); font-size: .68rem; padding: .25rem .5rem; cursor: pointer; }
.search-results { max-height: min(60vh, 520px); overflow: auto; }
.sr-item { display: flex; gap: .85rem; align-items: center; width: 100%; padding: .6rem 1rem; text-decoration: none; border-bottom: 1px solid var(--rule); }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover, .sr-item.is-active { background: var(--paper); }
.sr-thumb { width: 48px; height: 48px; flex: none; object-fit: cover; background: var(--paper); border: 1px solid var(--rule-2); }
.sr-thumb.is-blank { display: grid; place-items: center; color: var(--ink-soft); font-family: var(--display); }
.sr-body { min-width: 0; display: grid; gap: 1px; }
.sr-title { font-size: .95rem; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { font-size: .76rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-empty, .sr-hint { padding: 1.5rem 1rem; text-align: center; color: var(--ink-soft); font-size: .9rem; }
.sr-group {
  position: sticky; top: 0; background: var(--card);
  padding: .55rem 1rem .2rem; font-size: .66rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft);
}

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

main { flex: 1; }

.site-foot {
  max-width: var(--card-w); margin: clamp(1.5rem, 3vw, 2.2rem) auto 0;
  padding: 0 var(--gut) 2.5rem; width: 100%;
}
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between;
  border-top: 1px solid var(--rule-2); padding-top: 1.1rem;
  font-size: .78rem; color: var(--ink-soft);
}
.foot-bottom p { margin: 0; }
.foot-bottom a { color: inherit; }
.foot-bottom a:hover { color: var(--ink-strong); }

/* --- preferences ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .site-head, .site-foot, .lightbox, .search-overlay, .pager, .paginate, .slider-nav, .slider-dots { display: none !important; }
  body { background: #fff; }
  .card { border: 0; }
}

/* The theme ran the rule under a page's description across the full content
   width, not just the measure of the text above it. */
.prose > hr { width: 100%; max-width: none; }
.prose > h2:first-child { margin-top: 0; }

/* --- the blog as its own site ---------------------------------------------
   Stairway of Skin stands alone on georgeryan.com: white rather than cream,
   its own header carrying a back-link and its own mark, no main menu and no
   site footer. Measured off the live page.
   -------------------------------------------------------------------------- */

body.is-blog {
  background: #fff;
  --blog-head-h: 116px;   /* the live bar's exact height */
}
body.is-blog .card { background: #fff; border: 0; border-radius: 0; }
/* the bar is out of flow, so the page has to make room for it */
body.is-blog main { padding-top: var(--blog-head-h); }

.blog-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  box-shadow: 0 0 40px rgba(0, 0, 0, .16);
  padding: 25px 35px;
  height: var(--blog-head-h);
}
.blog-back {
  position: absolute; left: 35px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 400; font-size: 16px;
  color: #7a7a7a; text-decoration: none;
  transition: color .16s;
}
.blog-back:hover { color: var(--ink-strong); }
/* The live site's mark is a 350x43 screenshot, so it softens on any screen
   denser than 1x. Set in Crimson Text at 37.12px with 0.0291em of tracking it
   reproduces the original's 24px cap height and 334px ink width exactly, and
   stays sharp at any size. Crimson Text was identified by rendering thirteen
   candidates at a matched aspect ratio and scoring each against the original
   bitmap; it won by a clear margin. */
.blog-mark {
  display: block;
  font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 37.12px;
  line-height: 1;
  letter-spacing: 0.0291em;
  margin-right: -0.0291em;   /* trailing track, so it centres true */
  text-transform: uppercase;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
}
.blog-mark:hover { color: #000; }

@media (max-width: 760px) {
  body.is-blog { --blog-head-h: 104px; }
  .blog-head { flex-direction: column; justify-content: center; gap: .55rem; padding: 14px var(--gut); align-items: flex-start; }
  .blog-back { position: static; transform: none; font-size: .9rem; }
  .blog-mark { align-self: flex-start; font-size: 25.5px; }
}

/* Provenance for pictures that came from a public archive rather than from
   George's own collection. */
.entry-credit {
  margin: 1.1rem 0 0;
  font-size: .86rem; color: var(--ink-soft);
}
.entry-credit a { color: var(--accent); text-underline-offset: 3px; }

/* ==========================================================================
   Night mode
   The page turns to a dark surround while the card stays white, so each page
   reads as a print on a wall rather than a sheet of paper. Off by default.
   The header toggle sets data-theme="dark" on <html> and stores the choice;
   an inline script in the head applies it before first paint, so there is no
   flash of the light page. Stairway of Skin is left out on purpose: it was
   built to look like a separate site and keeps its own white treatment.
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --surround:           #26261f;  /* the wall */
  --on-surround:        #b6b4a7;  /* nav, footer */
  --on-surround-strong: #f1f0e7;  /* hover, current page */
  --on-surround-soft:   #87867c;  /* footer meta */
  --surround-rule:      #3d3d34;
}

:root[data-theme="dark"] body { background: var(--surround); }
:root[data-theme="dark"] body.is-blog { background: var(--paper); }

:root[data-theme="dark"] .card {
  border-color: #1b1b16;
  box-shadow: 0 6px 46px -8px rgba(0, 0, 0, .55);
}

/* The wordmark is a flat PNG on an opaque white ground, so it cannot simply
   sit on the dark. Inverted it reads light-on-black, and screen then drops
   that black back into the surround. */
:root[data-theme="dark"] .wordmark img { filter: invert(1); mix-blend-mode: screen; }

/* Only above the breakpoint is the nav sitting on the wall. Below it the nav
   collapses into a white panel, where the ink colours still apply. */
@media (min-width: 1101px) {
  :root[data-theme="dark"] .nav-top,
  :root[data-theme="dark"] .icon-btn { color: var(--on-surround); }
  :root[data-theme="dark"] .nav-top:hover,
  :root[data-theme="dark"] .nav-group[data-open] > .nav-top,
  :root[data-theme="dark"] .nav-top[aria-current="page"],
  :root[data-theme="dark"] .icon-btn:hover { color: var(--on-surround-strong); }
}

:root[data-theme="dark"] .foot-bottom {
  color: var(--on-surround-soft);
  border-top-color: var(--surround-rule);
}
:root[data-theme="dark"] .foot-bottom a:hover { color: var(--on-surround-strong); }
:root[data-theme="dark"] .skip { background: var(--on-surround-strong); color: var(--surround); }

/* the search wash has to darken with the page, or it flashes white */
:root[data-theme="dark"] .search-overlay { background: rgba(26, 26, 21, .82); }

/* The toggle shows the state you can switch to, not the one you are in. With
   JavaScript off it would do nothing, so it is only revealed once the script
   has claimed it. */
.theme-btn { display: none; }
.theme-btn.is-ready { display: grid; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
