/*
Theme Name: Roger Craig
Theme URI: https://rogercraig.com/
Author: Roger Craig
Description: Minimalist two-tone personal homepage and /rc/ journal, with category galleries and likes.
Version: 1.8.2
Requires PHP: 7.4
Text Domain: roger-craig
*/
:root{--rc-dark:#626262;--rc-mid:#a0a0a0;--rc-text:#202124}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#fff;color:var(--rc-text)}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}a{color:inherit}img{max-width:100%;height:auto}.rc-logo{font-family:Montserrat,"Arial Black",Arial,sans-serif;font-weight:800;letter-spacing:-.095em;line-height:1;white-space:nowrap;text-decoration:none!important;display:inline-block}.rc-logo .rc-logo-dark{color:#626262}.rc-logo .rc-logo-light{color:#a0a0a0}.rc-landing{min-height:100svh;display:flex;flex-direction:column;align-items:center;padding:0 20px}.rc-landing-brand{margin-top:clamp(135px,27vh,270px);width:100%;text-align:center}.rc-landing-brand .rc-logo{font-size:clamp(33px,8.8vw,112px)}.rc-landing-caption{font-family:Montserrat,Arial,sans-serif;font-weight:300;font-size:clamp(17px,3vw,29px);color:#aaa;margin:clamp(95px,14vh,175px) 0 0;text-align:center}.rc-landing-nav{margin:28px 0 0;display:flex;gap:24px;color:#aaa;font-size:13px}.rc-landing-nav a{text-decoration:none}.rc-landing-nav a:hover{text-decoration:underline}.rc-shell{max-width:1440px;margin:auto;padding:28px clamp(22px,5vw,82px) 80px}.rc-shell-header{margin-bottom:64px;display:flex;align-items:end;justify-content:space-between;gap:20px}.rc-shell-header .rc-logo{font-size:65px}.rc-shell-header nav{display:flex;gap:22px;color:#858585;font-size:14px}.rc-shell-header nav a{text-decoration:none}.rc-shell-header nav a:hover{text-decoration:underline}.rc-content{max-width:100%;margin:auto}.rc-content>h1{font-size:38px;letter-spacing:-.04em;margin:0 0 35px}.rc-content .rpl-home{width:100%}.rc-footer{color:#a0a0a0;font-size:12px;padding-top:55px}.rc-prose{max-width:780px;font-size:18px;line-height:1.75}.rc-prose h1{line-height:1.1;letter-spacing:-.045em}.rc-prose img{border-radius:10px}@media(max-width:650px){.rc-shell-header{margin-bottom:45px;align-items:start;flex-direction:column;gap:18px}.rc-shell-header .rc-logo{font-size:54px}.rc-landing-brand{margin-top:clamp(135px,26vh,240px)}.rc-landing-caption{margin-top:110px}}

/* v1.1: edge-to-edge mobile layout, without changing the two-tone wordmark. */
@media (max-width: 700px) {
  html, body { width: 100%; max-width: 100%; overflow-x: clip; }
  .rc-shell { width: 100%; max-width: none; padding: 18px 0 56px; }
  .rc-shell-header { padding: 0 16px; margin-bottom: 28px; }
  .rc-content, .rc-content .rpl-home { width: 100%; max-width: none; padding: 0; margin: 0; }
  .rc-content .rpl-home .rpl-section { padding: 0 16px; }
  .rc-content .rpl-home .rpl-featured { padding: 0; }
  .rc-content .rpl-home .rpl-featured > * { max-width: 100%; }
  .rc-content .rpl-home .rpl-featured .rpd-image { border-radius: 0; }
  .rc-content .rpl-home .rpl-featured .rpd-card > :not(.rpd-image):not(a) { margin-left: 16px; margin-right: 16px; }
  .rc-footer { padding-left: 16px; padding-right: 16px; }
  .rc-landing { padding-left: 12px; padding-right: 12px; }
  .rc-landing-brand .rc-logo { font-size: clamp(24px, 7.3vw, 65px); letter-spacing: -.095em; white-space: nowrap; }
  .rc-landing-brand { width: 100%; max-width: 100%; }
  .rc-shell-header .rc-logo { font-size: 52px; }
}

/* v1.2 — consistent, readable mobile collections and homepage sections. */
@media (max-width: 700px) {
  .rc-content { padding: 0 16px; }
  .rc-content > h1 { margin: 0 0 24px; font-size: clamp(32px, 9vw, 40px); }
  .rc-content .rpd-grid { width: 100%; max-width: 100%; margin-top: 18px; }
  .rc-content .rpd-grid.rpd-books,
  .rc-content .rpl-home .rpl-section-books .rpd-grid {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 24px 14px;
  }
  .rc-content .rpd-grid.rpd-photos,
  .rc-content .rpd-grid.rpd-builds,
  .rc-content .rpd-grid.rpd-thoughts,
  .rc-content .rpl-home .rpl-section-photos .rpd-grid,
  .rc-content .rpl-home .rpl-section-builds .rpd-grid,
  .rc-content .rpl-home .rpl-section-thoughts .rpd-grid {
    display: grid; grid-template-columns: minmax(0,1fr) !important; gap: 24px;
  }
  .rc-content .rpd-grid .rpd-card { min-width: 0; }
  .rc-content .rpd-books .rpd-image,
  .rc-content .rpl-section-books .rpd-image { width: 100%; aspect-ratio: 2 / 3; }
  .rc-content .rpd-books .rpd-title,
  .rc-content .rpl-section-books .rpd-title { font-size: 16px !important; line-height: 1.3 !important; }
  .rc-content .rpd-books .rpd-meta,
  .rc-content .rpl-section-books .rpd-meta { font-size: 12px; }
  .rc-content .rpd-books .rpd-desc,
  .rc-content .rpl-section-books .rpd-desc { font-size: 13px; line-height: 1.45; }
  .rc-content .rpd-thoughts { max-width: 100%; }
  .rc-content .rpd-thoughts .rpd-card { padding: 16px 0; }
  .rc-content .rpd-thoughts .rpd-desc,
  .rc-content .rpl-section-thoughts .rpd-desc { font-size: 16px; line-height: 1.65; }
  .rc-content .rpl-home .rpl-section { padding: 0; }
  .rc-content .rpl-home .rpl-featured { padding: 0; }
  .rc-content .rpl-home .rpl-featured .rpd-card[data-type=books] .rpd-image {
    width: min(55%, 220px); max-width: 220px; aspect-ratio: 2 / 3;
  }
  .rc-content .rpl-home .rpl-section .rpd-grid { gap: 24px 14px; }
  .rc-content .rpl-home .rpl-section-photos .rpd-image,
  .rc-content .rpl-home .rpl-section-builds .rpd-image { width: 100%; }
}

/* v1.4: mobile navigation and editorial polish */
.rc-shell-header nav{min-width:0;max-width:100%;scrollbar-width:none}.rc-shell-header nav::-webkit-scrollbar{display:none}
@media(max-width:700px){.rc-shell-header{width:100%;min-width:0}.rc-shell-header nav{width:100%;overflow-x:auto;white-space:nowrap;flex-wrap:nowrap;gap:24px;padding:8px 0 12px;-webkit-overflow-scrolling:touch}.rc-shell-header nav a{flex:0 0 auto;font-size:15px}.rc-content .rpl-section-books .rpd-grid,.rc-content .rpd-books{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.rc-shell-header nav a[aria-current=page]{color:#222;font-weight:700}
.rc-book-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 22px}.rc-book-filters label{color:#666;font-size:14px}.rc-book-filters select{font:inherit;border:1px solid #dedee2;background:white;border-radius:8px;padding:10px 12px;max-width:100%}.rc-book-filters .rc-count{font-size:13px;color:#888}
.rc-lightbox{position:fixed;inset:0;z-index:999999;background:rgba(0,0,0,.95);display:none;align-items:center;justify-content:center;padding:48px 16px 55px}.rc-lightbox[aria-hidden=false]{display:flex}.rc-lightbox img{display:block;max-width:100%;max-height:calc(100dvh - 115px);object-fit:contain}.rc-lightbox button{position:absolute;background:rgba(255,255,255,.14);border:0;color:#fff;font-size:28px;cursor:pointer;border-radius:50%;width:44px;height:44px}.rc-lightbox .rc-lb-close{top:10px;right:12px}.rc-lightbox .rc-lb-prev{left:8px;top:50%}.rc-lightbox .rc-lb-next{right:8px;top:50%}.rc-lightbox .rc-lb-caption{position:absolute;bottom:15px;left:20px;right:20px;text-align:center;color:#eee;font-size:13px}
.rc-related{margin-top:52px;border-top:1px solid #e9e9ed;padding-top:24px}.rc-related h2{font-size:21px;letter-spacing:-.025em}.rc-related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.rc-related-card{text-decoration:none;color:inherit}.rc-related-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:9px}.rc-related-card strong{display:block;font-size:16px;margin-top:9px}.rc-related-card small{display:block;color:#777;margin-top:5px}


/* v1.5 — deliberate typography hierarchy. Preserve the original wordmark. */
:root { --rc-heading-font: Montserrat, "Arial Black", Arial, sans-serif; }
.rc-logo, .rc-logo * { font-weight: 900; }
/* Major headings: Montserrat Black; compact line-height and subtle tracking. */
.rc-content > h1,
.rc-prose h1,
.rc-prose h2,
.rpl-home .rpl-section-head h2,
.rc-related h2 {
  font-family: var(--rc-heading-font);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.rc-content > h1 { font-size: clamp(30px, 3.4vw, 43px); }
.rpl-home .rpl-section-head h2 { font-size: clamp(23px, 2.5vw, 31px); }
/* Titles: semibold to distinguish content from section labels. */
.rpd-title, .rpd-title a,
.rpl-home .rpl-featured .rpd-title,
.rc-related-card strong,
.rc-prose h3 {
  font-family: var(--rc-heading-font);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.3;
}
/* Featured story gets a little more emphasis, without competing with the logo. */
.rpl-home .rpl-featured .rpd-title { font-weight: 700; line-height: 1.18; }
/* Reviews, captions, dates, and navigation retain a quieter visual role. */
.rpd-desc, .rc-prose p, .rc-prose li {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.7;
}
.rpd-meta, .rpd-rating, .rpd-kind, .rc-related-card small {
  font-weight: 400;
  letter-spacing: .01em;
}
.rc-shell-header nav, .rpl-home .rpl-section-head a {
  font-family: var(--rc-heading-font);
  font-weight: 600;
}
.rc-prose { line-height: 1.75; }
.rc-prose p { margin: 0 0 1.25em; }
.rc-prose h2 { margin-top: 1.7em; }
@media (max-width: 700px) {
  .rpd-title, .rpd-title a { line-height: 1.32; }
  .rc-content .rpd-books .rpd-title,
  .rc-content .rpl-section-books .rpd-title { font-weight: 600; }
  .rc-prose { font-size: 17px; }
}


/* v1.8 Pocket Polish — editorial refinements only. Never change .rc-logo or .rc-landing. */
:root { --rc-hairline:#e9e9ed; --rc-muted:#777982; --rc-blue:#3478f6; }
/* Subtle rounded media without cropping book covers. */
.rc-content .rpd-image, .rc-content .rpd-image img,
.rc-content .rc-prose img, .rc-content .rc-related-card img {
  border-radius: 12px;
}
.rc-content .rpd-image img { max-width:100%; height:auto; }
/* More breathing room between content and quieter secondary text. */
.rc-content .rpd-meta, .rc-content .rpd-kind,
.rc-content .rc-related-card small { color:var(--rc-muted); }
.rc-content .rpd-card { min-width:0; }
.rc-content .rpd-title { margin-top: 12px; }
.rc-content .rpd-desc { margin-top: 8px; }
.rc-content .rpl-section { margin-bottom: clamp(44px,6vw,80px); }
.rc-content .rpl-section-head { margin-bottom: 22px; }
.rc-content .rpl-section-head a { color:#7a7d83; text-decoration:none; }
.rc-content .rpl-section-head a:hover { color:#202124; }
/* Keep the existing horizontal nav, add native-feeling focus and touch feedback. */
.rc-shell-header nav a { padding: 8px 0; border-bottom:2px solid transparent; transition:color .15s ease,border-color .15s ease; }
.rc-shell-header nav a:hover, .rc-shell-header nav a:focus-visible { color:#202124; border-bottom-color:#a0a0a0; }
.rc-shell-header nav a[aria-current=page] { border-bottom-color:#626262; }
.rc-shell-header nav a:focus-visible, .rc-content a:focus-visible,
.rc-content button:focus-visible, .rc-content select:focus-visible {
  outline: 2px solid var(--rc-blue); outline-offset:3px; border-radius:4px;
}
/* Controls share Pocket Studio's understated shape. */
.rc-book-filters select { border-radius:12px; border-color:#dedee2; min-height:44px; padding:10px 14px; }
.rc-book-filters select:focus { border-color:var(--rc-blue); }
/* Keep hearts neutral until interaction, then use a restrained accent. */
.rc-content .rpl-like-button:hover, .rc-content .rpl-like-button:focus-visible,
.rc-content .rpd-like-button:hover, .rc-content .rpd-like-button:focus-visible { color:var(--rc-blue); }
/* Narrow, comfortable long-form reading, without changing page templates. */
.rc-prose { max-width: 740px; line-height:1.78; }
.rc-prose p, .rc-prose li { line-height:1.78; }
.rc-related { border-top-color:var(--rc-hairline); padding-top:30px; }
@media(max-width:700px) {
  .rc-shell-header nav { gap:24px; padding-bottom:10px; }
  .rc-shell-header nav a { min-height:42px; display:inline-flex; align-items:center; }
  .rc-content .rpl-section { margin-bottom:48px; }
  .rc-content .rpl-section-head { margin-bottom:16px; }
  .rc-content .rpd-grid.rpd-books, .rc-content .rpl-home .rpl-section-books .rpd-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .rc-content .rpd-grid.rpd-photos, .rc-content .rpd-grid.rpd-builds,
  .rc-content .rpd-grid.rpd-thoughts { grid-template-columns:minmax(0,1fr) !important; }
  .rc-prose { font-size:17px; }
  .rc-content .rpd-image, .rc-content .rpd-image img { border-radius:12px; }
}
@media(prefers-reduced-motion:reduce) { .rc-shell-header nav a { transition:none; } }

/* v1.8.1 — focused mobile corrections. No changes to the logo or landing page. */
/* v1.8's global height:auto overrode the gallery's cover fill and exposed a gray lower panel. */
.rc-content .rpd-books .rpd-image img,
.rc-content .rpl-section-books .rpd-image img,
.rc-content .rpl-featured .rpd-card[data-type="books"] .rpd-image img {
  width:100%; height:100%; max-width:100%; object-fit:cover; display:block;
}
.rc-content .rpd-books .rpd-image,
.rc-content .rpl-section-books .rpd-image { aspect-ratio:2/3; background:transparent; }
/* A featured book is a full-width story, even though its cover remains portrait sized. */
.rc-content .rpl-home .rpl-featured .rpd-recent-group,
.rc-content .rpl-home .rpl-featured .rpd-recent-featured,
.rc-content .rpl-home .rpl-featured .rpd-card[data-type="books"] {
  width:100%; max-width:none; min-width:0;
}
.rc-content .rpl-home .rpl-featured .rpd-card[data-type="books"] .rpd-image {
  width:min(100%,320px); max-width:320px; margin-inline:auto; aspect-ratio:2/3;
  background:transparent;
}
@media(max-width:700px){
  .rc-shell-header { margin-bottom:24px; gap:10px; }
  .rc-shell-header nav { padding-top:2px; padding-bottom:6px; }
  .rc-content .rpl-home .rpl-featured .rpd-card[data-type="books"] .rpd-image {
    width:min(75%,300px); max-width:300px; margin-inline:auto; aspect-ratio:2/3;
  }
  .rc-content .rpl-home .rpl-featured .rpd-card[data-type="books"] {
    display:block; width:100%;
  }
  .rc-content .rpd-books .rpd-image img,
  .rc-content .rpl-section-books .rpd-image img { height:100%; }
}

/* v1.8.2 — book cards size to the actual cover, never a fixed placeholder. */
.rc-content .rpd-grid.rpd-books .rpd-card .rpd-image,
.rc-content .rpl-section-books .rpd-grid .rpd-card .rpd-image,
.rc-content .rpd-recent .rpd-card[data-type="books"] .rpd-image {
  aspect-ratio:auto !important;
  height:auto !important;
  min-height:0 !important;
  background:transparent !important;
  overflow:hidden;
}
.rc-content .rpd-grid.rpd-books .rpd-card .rpd-image img,
.rc-content .rpl-section-books .rpd-grid .rpd-card .rpd-image img,
.rc-content .rpd-recent .rpd-card[data-type="books"] .rpd-image img {
  display:block;
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
}
/* A missing cover may still use a deliberate placeholder. */
.rc-content .rpd-grid.rpd-books .rpd-image:has(.rpd-placeholder),
.rc-content .rpl-section-books .rpd-image:has(.rpd-placeholder) {
  aspect-ratio:2/3 !important;
  background:#f5f5f7 !important;
}
