/* Public mirror of the Photorealism chapter summaries, /teaching/photoreal/.
   Dark, to match infernocreativestudio.com and the Redshift cheat sheet next door.
   Built by build_site.py; this file is copied into site/assets/. */

@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Regular.ttf"); font-display: swap; }
@font-face { font-family: "PoppinsExtraBold"; src: url("/fonts/Poppins-ExtraBold.ttf"); font-display: swap; }

:root {
  --bg: #111111;
  --panel: #1b1b1b;
  --line: #2c2c2c;
  --text: #dadada;
  --muted: #9a9a9a;
  --head: #ffffff;
  --accent: #7fb2e5;
  --red: #de2222;
  --red-dark: #8f110d;
  --sans: "Poppins", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--sans); }
a { color: var(--accent); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }

/* top bar */
.pr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 24px;
  background: #0b0b0b; border-bottom: 2px solid var(--red-dark); }
.pr-brand img { display: block; height: 44px; width: auto; }
.pr-crumbs { font-size: 14px; color: var(--muted); }
.pr-crumbs a { color: var(--muted); text-decoration: none; }
.pr-crumbs a:hover { color: #fff; }
.pr-crumbs span { margin: 0 6px; color: #555; }

/* title */
.pr-hero { max-width: 1240px; margin: 0 auto; padding: 36px 24px 12px; }
.pr-kicker { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }
.pr-hero h1 { margin: 6px 0 8px; font: 40px/1.12 "PoppinsExtraBold", var(--sans); color: var(--head); }
.pr-sub { margin: 0; max-width: 70ch; color: var(--muted); }

/* the notice at the top of every page */
.pr-notice { max-width: 1240px; margin: 18px auto 8px; padding: 14px 18px; border: 1px solid #4a3a1e;
  border-left: 3px solid #d9a441; border-radius: 8px; background: #1d1810; font-size: 14px; line-height: 1.55; }
.pr-notice p { margin: 0 0 6px; }
.pr-notice p:last-child { margin-bottom: 0; }
.pr-notice strong { color: #f1c878; }
@media (max-width: 1288px) { .pr-notice { margin-left: 24px; margin-right: 24px; } }

/* sidebar + text */
.pr-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px;
  max-width: 1240px; margin: 0 auto; padding: 20px 24px 40px; align-items: start; }
.pr-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto;
  padding: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.pr-toc p { margin: 0 14px 4px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pr-toc ol { margin: 0; padding: 0; list-style: none; }
.pr-toc a { display: block; padding: 7px 14px; font-size: 14px; line-height: 1.35; color: var(--text);
  text-decoration: none; border-top: 1px solid var(--line); }
.pr-toc a:hover { background: #262626; color: #fff; }
/* Part headings in the index's whole-book sidebar. */
.pr-toc .pr-toc-part { padding: 12px 14px 4px; border-top: 1px solid var(--line); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); }

.pr-content { min-width: 0; max-width: 78ch; }
.pr-content .dp-content-block { margin: 0 0 34px; }
.pr-content h3 { margin: 0 0 12px; font: 26px/1.25 "PoppinsExtraBold", var(--sans); color: var(--head);
  scroll-margin-top: 16px; }
.pr-content h4 { margin: 22px 0 6px; font-size: 17px; color: var(--head); }
.pr-content p { margin: 0 0 14px; }
.pr-content ul, .pr-content ol { margin: 0 0 14px; padding-left: 24px; }
.pr-content li { margin-bottom: 6px; }
.pr-content strong { color: #fff; }
.pr-content .pr-reading { font-size: 14px; color: var(--muted); }
.pr-img { display: block; margin: 18px 0 4px; border-radius: 6px; cursor: zoom-in; }
.pr-credit { font-size: 11px !important; color: #7a7a7a; text-align: right; }
.pr-note { margin: 16px 0 !important; padding: 10px 14px; border-left: 3px solid var(--red); border-radius: 6px;
  background: #231616; font-size: 15px; }
.pr-note strong { color: #ff8d97; }
.pr-top { margin: 8px 0 0 !important; text-align: right; font-size: 12px; }
.pr-top a { color: var(--muted); text-decoration: none; }

/* In Redshift callout */
.rs-callout { display: flex; gap: 14px; align-items: flex-start; margin: 20px 0 8px; padding: 14px 16px 14px 14px;
  background: #3a2024; border: 1px solid #6e2f36; border-left: 3px solid #e0424f; border-radius: 6px; }
.rs-callout img { flex: none; width: 104px; height: auto; margin: 1px 0 0; border-radius: 0; cursor: default; }
.rs-callout-body { flex: 1; min-width: 0; }
.rs-callout h4 { margin: 0 0 4px !important; font-size: 13px !important; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #ff8d97 !important; }
.rs-callout p { margin: 0 0 8px !important; font-size: 15px; }
.rs-links { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 !important; padding: 0 !important; list-style: none; }
.rs-links li { margin: 0 !important; }
.rs-links a { display: inline-block; padding: 3px 10px; border: 1px solid #8a3a43; border-radius: 999px;
  font-size: 13px; color: #ffc4ca; text-decoration: none; background: #2a1518; }
.rs-links a:hover { background: #e0424f; border-color: #e0424f; color: #fff; }
.rs-links a::after { content: " \2197"; font-size: 11px; }

/* prev / all / next */
.pr-pagenav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 0 0 28px; }
.pr-pagenav-bottom { margin: 36px 0 0; }
.pr-pagenav > :first-child { justify-self: start; }
.pr-pagenav > :last-child { justify-self: end; }
.pr-btn { display: inline-block; padding: 8px 16px; border-radius: 8px; background: var(--red); color: #fff;
  font-size: 14px; text-decoration: none; }
.pr-btn:hover { background: #ff3b3b; color: #fff; }
.pr-btn-outline { background: transparent; border: 1px solid #555; color: var(--text); }
.pr-btn-outline:hover { background: #262626; }

/* footer notices */
.pr-footer { max-width: 1240px; margin: 20px auto 0; padding: 22px 24px 48px; border-top: 1px solid var(--line);
  font-size: 13px; line-height: 1.6; color: #8a8a8a; }
.pr-footer h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: #bbb; }
.pr-footer p { margin: 0 0 10px; max-width: 110ch; }
.pr-footer strong { color: #c8c8c8; }

/* lightbox */
.pr-lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0, 0, 0, 0.9); cursor: zoom-out; }
.pr-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
/* display:flex above beats the UA's [hidden] rule, so hidden must be restated or the
   overlay covers the page from load. It did, on the first build. */
.pr-lightbox[hidden] { display: none; }

@media (max-width: 900px) {
  .pr-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pr-toc { position: static; max-height: none; }
  .pr-hero h1 { font-size: 30px; }
}
@media (max-width: 520px) {
  .pr-bar, .pr-hero, .pr-layout, .pr-footer { padding-left: 16px; padding-right: 16px; }
  .pr-notice { margin-left: 16px; margin-right: 16px; }
  .pr-pagenav { grid-template-columns: 1fr; }
  .pr-pagenav > * { justify-self: stretch !important; text-align: center; }
  .pr-pagenav > span { display: none; }
  .rs-callout { gap: 10px; padding: 12px; }
  .rs-callout img { width: 72px; }
}
