/*
Theme Name: Richard Darch
Theme URI: https://midguard.org.uk/
Author: Richard Darch
Description: A clean, accessible theme for the personal writing and project site of Richard Darch.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: richard-darch
*/
:root {
  --rd-blue: #164873;
  --rd-blue-dark: #103452;
  --rd-blue-light: #d9efff;
  --rd-paper: #fff;
  --rd-ink: #17191c;
  --rd-muted: #505a64;
  --rd-rule: #d8e0e7;
  --rd-content: 72rem;
  --rd-reading: 48rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--rd-paper); color: var(--rd-ink); font: 1.125rem/1.7 Georgia, "Times New Roman", serif; }
a { color: #174f7c; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #092f50; }
a:focus-visible, button:focus-visible { outline: 3px solid #8a4b00; outline-offset: 4px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 20; padding: .7rem 1rem; background: #fff; color: #000; }
.skip-link:focus { top: 1rem; }
.site-header { background: var(--rd-blue); color: #fff; }
.header-inner { max-width: var(--rd-content); min-height: 9rem; margin: auto; padding: 1.4rem 1.5rem 1.1rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.site-brand { color: #fff; display: inline-block; width: fit-content; white-space: nowrap; font: 500 clamp(2.2rem, 4.8vw, 3.2rem)/1.05 "Segoe Script", "Brush Script MT", cursive; letter-spacing: -.04em; text-decoration: none; }
.site-brand:hover, .site-brand:focus { color: #fff; }
.primary-nav ul { display: flex; flex-wrap: wrap; gap: .25rem .4rem; list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: .48rem .85rem; border-radius: .25rem; color: #fff; font: 700 1rem/1.3 Arial, sans-serif; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current-menu-ancestor > a { background: var(--rd-blue-light); color: #102b40; }
.primary-nav .sub-menu { display: none; position: absolute; z-index: 10; left: 0; top: 100%; min-width: 14rem; padding: .4rem; background: var(--rd-blue-dark); border: 1px solid rgba(255,255,255,.65); box-shadow: 0 .4rem 1rem rgba(0,0,0,.2); }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { border-radius: 0; }
.site-main { min-height: 60vh; }
.content-wrap { width: min(100% - 2.5rem, var(--rd-content)); margin: 0 auto; padding: 3rem 0 4rem; }
.reading-width { max-width: var(--rd-reading); }
.home-content { padding-top: 3.6rem; }
.home-intro { max-width: 58rem; padding: 0 0 3rem; }
.eyebrow { margin: 0 0 .45rem; color: #3d5e77; font: 700 .88rem/1.4 Arial, sans-serif; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, h4 { color: #20252a; font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
h1 { margin: 0 0 1.2rem; font-size: clamp(2.35rem, 5vw, 4.3rem); max-width: 18ch; }
h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.45rem); }
h3 { margin: 0 0 .55rem; font-size: 1.5rem; }
p { margin: 0 0 1.25rem; }
.home-lede { max-width: 48rem; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.65; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 1.8rem; }
.button-link { display: inline-block; padding: .72rem 1.1rem; border: 2px solid var(--rd-blue); border-radius: .2rem; background: var(--rd-blue); color: #fff; font: 700 1rem/1.3 Arial, sans-serif; text-decoration: none; }
.button-link:hover, .button-link:focus-visible { background: var(--rd-blue-dark); color: #fff; }
.text-link { font: 700 1rem/1.5 Arial, sans-serif; }
.home-section { padding: 2.2rem 0 2.8rem; border-top: 1px solid var(--rd-rule); }
.section-heading { margin-bottom: 1.25rem; }
.section-heading .eyebrow { margin-bottom: .35rem; }
.section-heading-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; }
.section-heading-row > .text-link { margin-bottom: .35rem; }
img { max-width: 100%; height: auto; }
.entry-meta, .archive-description, .site-footer { color: var(--rd-muted); }
.entry-meta { margin: 0 0 .45rem; font: .95rem/1.5 Arial, sans-serif; }
.post-card, .project-card { padding: 1.4rem 0; border-bottom: 1px solid var(--rd-rule); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; margin-top: 1.4rem; }
.project-card { padding: 1.5rem; border: 1px solid var(--rd-rule); border-top: .35rem solid var(--rd-blue); }
.project-card h3 a, .post-card h3 a { color: var(--rd-ink); }
.project-card h3 a:hover, .post-card h3 a:hover { color: #174f7c; }
.project-card p:last-of-type, .post-card p:last-child { margin-bottom: .9rem; }
.card-link { font: 700 .95rem/1.5 Arial, sans-serif; }
.latest-list { border-top: 1px solid var(--rd-rule); }
.latest-list .post-card { padding: 1.25rem 0; }
.latest-list .post-card h3 { margin-bottom: .5rem; }
.post-excerpt p:last-child { margin-bottom: 0; }
.pagination { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.pagination a, .pagination span { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--rd-rule); }
.site-footer { border-top: 1px solid var(--rd-rule); font: .95rem/1.6 Arial, sans-serif; }
.footer-inner { width: min(100% - 2.5rem, var(--rd-content)); margin: auto; padding: 1.7rem 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: .5rem 1rem; list-style: none; margin: 0 0 .8rem; padding: 0; }
.footer-nav a { color: #174f7c; }
blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.25rem; border-left: .25rem solid #6e9ec2; }
@media (min-width: 52rem) {
  .header-inner { min-height: 9.5rem; flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-width: 38rem) {
  body { font-size: 1.05rem; }
  .header-inner { min-height: auto; padding: 1.25rem 1rem; gap: .8rem; }
  .site-brand { font-size: 2.7rem; }
  .primary-nav a { padding: .55rem .65rem; }
  .primary-nav .sub-menu { position: static; box-shadow: none; }
  .primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
  .content-wrap, .footer-inner { width: min(100% - 2rem, var(--rd-content)); }
  .home-content { padding-top: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
