/*
Theme Name: Branden Cook
Theme URI: https://brandencook.com
Author: Branden Cook
Description: Personal site for Branden Cook. Black, white, and royal blue. Tagline: Keeping an eye on the horizon.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: brandencook
*/

:root {
  --paper: #ffffff;
  --paper-sunken: #eeeeee;
  --ink: #0a0a0a;
  --ink-soft: #1c1c1c;
  --muted: #5c5c5c;
  --line: #e4e4e4;
  --accent: #4e7499;
  --accent-hover: #3d6282;
  --paper-fg: #ffffff;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; font-family: var(--display); font-weight: 400; letter-spacing: -0.03em; margin: 0; }
p { text-wrap: pretty; }

button,
.btn { cursor: pointer; }

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  transform: translateY(-150%);
}
.skip:focus { transform: none; z-index: 80; }

.wrap { width: min(72rem, calc(100% - 2.5rem)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--display); font-size: 1.25rem; }
.mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1.25px solid var(--ink);
  border-radius: 0.25rem;
  font-family: Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: -0.04em;
}
.nav { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav li { list-style: none; }
.nav a { font-size: 0.875rem; color: var(--muted); padding: 0.5rem 0; }
.nav a:hover,
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--ink); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: calc(100dvh - 4rem);
  display: flex;
  align-items: flex-end;
  color: var(--paper-fg);
  background: var(--ink);
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.12), rgba(10,10,10,.4) 42%, rgba(10,10,10,.84));
}
.hero-copy { position: relative; padding: 6rem 0 3.5rem; }
.kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero .kicker { color: rgba(255,255,255,.8); }
.display {
  margin-top: 1rem;
  font-size: clamp(4.25rem, 3rem + 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.tagline {
  margin-top: 1.25rem;
  max-width: 36rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.2;
}
.lede { margin-top: 1.25rem; max-width: 34rem; font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.45rem); line-height: 1.55; }
.hero .lede { color: rgba(255,255,255,.85); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 0.5rem;
  border: 0;
  font: 500 0.875rem/1 var(--sans);
  letter-spacing: 0.02em;
  transition: background-color 150ms ease, transform 150ms ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(10,10,10,.08); }
.btn-secondary:hover { background: #f5f5f5; }

.band { border-top: 1px solid var(--line); }
.band-ink { background: var(--ink); color: #fff; border-top: 0; }
.section { padding: 4rem 0; }
.section h2, .page-title { font-size: clamp(2.25rem, 1.4rem + 2.4vw, 3.5rem); }
.intro { max-width: 40rem; color: var(--ink-soft); margin-top: 1.25rem; }
.grid-3 { display: grid; gap: 2rem; margin-top: 2.5rem; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0.875rem; }
.card h3 { margin-top: 1rem; font-size: 1.75rem; }
.card h3:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: 0.875rem; }
.card p { color: var(--muted); font-size: 0.875rem; }

.split { display: grid; gap: 2.5rem; align-items: center; }
.split img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0.875rem; }
.prose { color: var(--ink-soft); }
.prose p { margin: 0 0 1rem; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }

.chapters { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 3rem; }
.chapter { display: grid; gap: 1.5rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 0.875rem; }
.chapter h2 { font-size: clamp(2rem, 1.2rem + 2vw, 2.75rem); }
.chapter h2:hover { color: var(--accent); }

.note { display: block; padding: 2rem 0; border-top: 1px solid var(--line); }
.note:hover h2 { color: var(--accent); }
.notes { border-bottom: 1px solid var(--line); }

.article { width: min(42rem, calc(100% - 2.5rem)); margin: 3rem auto 5rem; }
.article .hero-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 0.875rem; margin: 2rem 0; }
.pager { display: grid; gap: 1rem; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; }
.pager a:hover { color: var(--accent); }

.form { display: grid; gap: 1.1rem; margin-top: 2rem; }
.fields { display: grid; gap: 1.1rem; }
label { display: grid; gap: 0.4rem; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
input, textarea {
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
  background: #f5f5f5;
  box-shadow: 0 0 0 1px rgba(10,10,10,.08);
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0.9rem;
}
textarea { min-height: 9rem; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice { background: var(--paper-sunken); border-radius: 0.875rem; padding: 1.5rem; margin-top: 2rem; }

.values { display: grid; gap: 2rem; margin-top: 2.5rem; }
.value { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.value h3 { font-size: 1.75rem; }
.value p { color: var(--muted); font-size: 0.875rem; }

.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 0; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-name { font-family: var(--display); font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1; }
.footer-grid a:hover { color: var(--accent); }
.footer-links { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.legal {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

@media (min-width: 800px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .chapter { grid-template-columns: 5fr 7fr; align-items: center; }
  .fields { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .next { text-align: right; }
  .hero-scrim {
    background: linear-gradient(90deg, rgba(10,10,10,.78) 0%, rgba(10,10,10,.42) 48%, rgba(10,10,10,.08) 100%);
  }
}

@media (max-width: 799px) {
  .nav-button { display: flex; }
  .nav {
    display: none;
    position: fixed;
    inset: 4rem 0 0;
    background: var(--paper);
    flex-direction: column;
    padding: 2.5rem 1.25rem;
    gap: 0.5rem;
  }
  .nav a { font-family: var(--display); font-size: 3rem; color: var(--ink); line-height: 1.1; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
