/* toddburroughs.com — charcoal ground, plain type, side-scrolling rows hung at one height */
:root {
  --ground: #18181a;
  --ink: #eceae4;
  --muted: #a8a59e;
  --line: #3a3a3e;
  --accent: #d2b57c;
  --edge: rgba(255, 255, 255, 0.14);
  --pad: clamp(20px, 5vw, 60px);
  --gutter: max(var(--pad), calc((100% - 1240px) / 2));
  --row-h: clamp(230px, 34vw, 360px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
figure { margin: 0; }
img { display: block; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); box-sizing: content-box; }

.skip { position: absolute; left: -9999px; top: 16px; padding: 10px 14px; background: var(--ink); color: var(--ground); z-index: 20; }
.skip:focus { left: 16px; color: var(--ground); }

/* Header */
.site-head { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.site-name { font-size: 15px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; padding: 12px 0; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 36px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.site-nav a { display: inline-block; padding: 12px 0; }

/* Captions */
.caption { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; font-size: 14px; }
.caption .t { font-weight: 600; }
.caption .m { color: var(--muted); }

/* Hero */
.hero { display: flex; justify-content: center; padding-top: 40px; padding-bottom: 110px; }
.hero figure { width: min(100%, 540px); }
.hero a { display: block; }
.hero img { width: 100%; height: auto; outline: 1px solid var(--edge); }
.hero .caption { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 18px; }

/* Sections */
.group { padding: 0 0 92px; scroll-margin-top: 24px; }
.group-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding-bottom: 14px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.group-head h2 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -0.01em; }
.group-head .count { flex: 1; font-size: 14px; color: var(--muted); padding-top: 8px; }

.row-nav { display: flex; gap: 8px; }
.row-nav[hidden] { display: none; }
.round { appearance: none; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; }
.round:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.round:disabled { opacity: 0.35; cursor: default; }
.round svg, .lb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* A row: scrolls sideways, every work at the same height */
.row { display: flex; gap: 28px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); padding: 4px 0 26px var(--gutter); scrollbar-width: thin; scrollbar-color: #4a4a4f transparent; }
.row::after { content: ""; flex: 0 0 max(1px, calc(var(--pad) - 28px)); }
.row:focus-visible { outline-offset: -2px; }
.work { flex: none; width: min-content; min-width: 0; scroll-snap-align: start; }
.work-link { display: block; }
.work-link img { height: var(--row-h); width: auto; max-width: none; outline: 1px solid var(--edge); outline-offset: -1px; transition: opacity 0.2s ease; }
.work-link:hover img { opacity: 0.85; }

@media (max-width: 620px) {
  .hero { padding-top: 16px; padding-bottom: 80px; }
  .group { padding-bottom: 72px; }
  .row { gap: 20px; }
  .group-head h2 { font-size: 26px; }
  .row-nav { display: none; } /* on a phone, swiping the row is the control */
}

/* About */
.about-body { max-width: 40em; }
.about-body h3 { margin: 0 0 22px; font-size: 22px; font-weight: 500; letter-spacing: -0.005em; }
.about-body p { margin: 0 0 18px; font-size: 17px; line-height: 1.65; color: #d9d6cf; }
.about-body p:last-child { margin-bottom: 0; }

/* Contact */
.contact p { margin: 0; max-width: 34em; font-size: 20px; line-height: 1.45; }
.contact a { border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* Footer */
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.site-foot .inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; width: 100%; padding: 22px 0 44px; border-top: 1px solid var(--line); }
.site-foot a { display: inline-block; padding: 12px 0; }

/* Enlarged view */
.lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #0f0f10; color: var(--ink); overflow: hidden; }
.lb::backdrop { background: #0f0f10; }
.lb[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: minmax(0, 1fr); align-items: center; }
.lb-fig { grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; height: 100%; min-height: 0; padding: 56px 0 28px; }
.lb-img { max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); width: auto; height: auto; min-height: 0; object-fit: contain; outline: 1px solid var(--edge); }
.lb-cap { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; align-items: baseline; font-size: 14px; text-align: center; }
.lb-cap .t { font-weight: 600; }
.lb-cap .m, .lb-cap .n { color: var(--muted); }
.lb button { appearance: none; border: 0; background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; }
.lb button:hover { color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.lb-close { position: absolute; top: 10px; right: 10px; z-index: 2; }
.lb-prev { grid-column: 1; grid-row: 1; justify-self: center; }
.lb-next { grid-column: 3; grid-row: 1; justify-self: center; }
.lb svg { width: 26px; height: 26px; }

@media (max-width: 620px) {
  .lb[open] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .lb-fig { grid-column: 1 / -1; grid-row: 1; padding: 64px 14px 8px; }
  .lb-img { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
  .lb-prev { grid-column: 1; grid-row: 2; justify-self: end; margin: 0 14px 14px 0; }
  .lb-next { grid-column: 2; grid-row: 2; justify-self: start; margin: 0 0 14px 14px; }
}
