/*
Theme Name: Side C
Theme URI: https://reidchatham.com
Description: Halfway between the current reidchatham.com theme and Side B: the same one scrolling page, with Inter text and soft rounded cards, and Side B's mono labels, links and dark mode.
Author: Reid Chatham
Version: 1.1.1
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: side-c
*/

/* fonts ship with the theme (SIL Open Font License, see fonts/) */
@font-face { font-family: "Inter"; font-weight: 400 600; font-display: swap; src: url(fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400-latin.woff2) format("woff2"); }

:root {
  --paper: #f9f9f9; --ink: #111111; --mute: #6b6b6b; --rule: #e4e4e1; --card: #ffffff; --accent: #e2542b;
  --f-s: "Inter", system-ui, -apple-system, sans-serif;
  --f-m: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gut: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121211; --ink: #ebe6da; --mute: #8f8a7f; --rule: #2d2c29; --card: #191917; --accent: #f06a3d; color-scheme: dark; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--f-s); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 4px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* one centred column */
.app { max-width: 640px; margin: 0 auto; padding: 0 max(var(--gut), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left)); }

.top { display: flex; justify-content: space-between; align-items: baseline; padding-top: max(24px, env(safe-area-inset-top)); font-size: 15px; }
.top a { text-decoration: none; }
.top a:first-child { font-weight: 600; }
.top a:last-child { font: 13px var(--f-m); }

.wp-block-post-title { margin: 64px 0 28px; font-size: 40px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }

/* page content from the block editor */
.wp-block-post-content > * { margin: 0 0 14px; }
.wp-block-post-content h2 { margin: 52px 0 16px; padding-top: 12px; border-top: 1px solid var(--rule); font: 12px var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.wp-block-post-content h3 { margin-top: 0; margin-bottom: 4px; font-size: 18px; font-weight: 600; }
.wp-block-image { margin: 4px 0 22px; }
.wp-block-image img { display: block; width: 100%; height: auto; border-radius: 10px; }
.wp-block-rss { padding: 0; }
.wp-block-rss__item { padding: 6px 0; }
.wp-block-rss__item-publish-date { display: block; font: 13px var(--f-m); color: var(--mute); }

/* "Card" group style: a soft rounded box with an edge-to-edge image on top */
.is-style-card { margin-bottom: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); overflow: hidden; }
.is-style-card > * { margin: 0 20px 8px; }
.is-style-card > :last-child { margin-bottom: 18px; font: 13px var(--f-m); color: var(--mute); }
.is-style-card > .wp-block-image { margin: 0 0 16px; border-bottom: 1px solid var(--rule); }
.is-style-card > .wp-block-image img { border-radius: 0; }
.is-style-card p { font-size: 15px; }

.foot { margin-top: 56px; padding: 14px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); font-size: 14px; color: var(--mute); }

@media (max-width: 759px) {
  body { font-size: 15px; }
  .wp-block-post-title { margin: 36px 0 20px; font-size: 30px; }
}
