/* cameroncarrick.com — one stylesheet.
   Colours come from the portrait shoot: galvanized wall, coffee-black jacket, moss in the tweed. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("/fonts/work-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("/fonts/work-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ground: #edeeea;
  --surface: #f6f6f3;
  --ink: #1e1d1a;
  --ink-2: #3a3934;
  --muted: #55534d;
  --rule: #c9c9c2;
  --accent: #4b5733;
  --accent-hover: #3b4528;
  --on-accent: #ffffff;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --wrap: 1200px;
  --measure: 700px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; border: 0; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: 16px; top: -100px;
  background: var(--ink); color: var(--ground);
  padding: 10px 14px; border-radius: var(--radius); z-index: 10;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- buttons */

.button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: var(--radius);
  font: 500 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button-outline { background: transparent; color: var(--ink); border-color: var(--ink); min-height: 44px; padding: 0 18px; }
.button-outline:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ----------------------------------------------------------------- header */

.header-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 32px; padding-block: 16px;
}
.wordmark {
  font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; padding-block: 10px;
}
.wordmark:hover { color: var(--ink); }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 15px;
}
.nav-list a:not(.button) {
  display: inline-block; padding-block: 12px; color: var(--ink); text-decoration: none;
}
.nav-list a:not(.button):hover,
.nav-list a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

/* ------------------------------------------------------------------ prose */

.prose {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose figure, .prose table { margin-block: 0 1.1em; }
.prose h1, .note > h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.25rem, 4.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
.prose h2 { font-weight: 400; font-size: 1.85rem; line-height: 1.15; letter-spacing: -0.01em; margin: 1.8em 0 0.5em; }
.prose h3 { font-weight: 500; font-size: 1.35rem; line-height: 1.25; margin: 1.6em 0 0.4em; }
.prose h4, .prose h5, .prose h6 { font-family: var(--sans); font-weight: 500; font-size: 1rem; margin: 1.6em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.3em; }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose img { border-radius: var(--radius); display: block; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--surface); padding: 0.1em 0.3em; border-radius: 3px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-family: var(--sans); font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 500; }

.prose blockquote {
  margin-inline: 0; padding-left: 1.2em;
  border-left: 2px solid var(--rule); color: var(--ink-2);
}

/* Obsidian callouts */
.prose blockquote.callout {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 20px 24px; color: var(--ink);
  font-family: var(--sans); font-size: 1.05rem;
}
.prose .callout > :last-child { margin-bottom: 0; }
.callout-title { display: block; font-family: var(--sans); font-weight: 500; margin-bottom: 0.4em; }
.callout-title:empty { display: none; }
.prose blockquote.callout-button,
.prose blockquote.callout-link { background: none; border: 0; padding: 0; }
.callout-button .callout-title a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius); text-decoration: none;
}
.callout-button .callout-title a:hover { background: var(--accent-hover); }
.callout-link .callout-title { font-size: 1.1rem; }

.footnotes { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-2); }
.footnotes-sep { border: 0; border-top: 1px solid var(--rule); margin: 3em 0 1.5em; }

/* ------------------------------------------------------------ note pages */

.note { max-width: calc(var(--measure) + 48px); padding-block: 48px 96px; }

/* ------------------------------------------------------------------- home */

.hero {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 48px 72px; padding-block: 40px 96px;
}
.hero-text { flex: 1 1 480px; min-width: 0; }
.hero-text h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); line-height: 1.05; margin-bottom: 0.5em; }
.hero-text p { color: var(--ink-2); max-width: 36em; }
.hero-actions { margin-top: 1.6em; }
.hero-photo { flex: 1 1 340px; max-width: 480px; min-width: 0; }
.hero-photo img {
  display: block; width: 100%; aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 30%; border-radius: var(--radius);
}

.band { padding-block: 56px 88px; }
.section-heading {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.015em;
  margin: 0 0 40px;
}
.section-heading a { color: var(--ink); text-decoration: none; }
.section-heading a:hover { text-decoration: underline; }

.cards { display: flex; flex-wrap: wrap; gap: 40px; }
.card {
  flex: 1 1 280px; min-width: 0;
  border-top: 2px solid var(--ink); padding-top: 20px;
}
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.85rem; line-height: 1.12; margin: 0 0 12px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- writing */

.writing-page { padding-block: 48px 96px; }
.writing-page > h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 48px;
}
.shelves {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px 64px; margin-bottom: 88px;
}
.shelves-compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 40px; }
.shelf { border-top: 2px solid var(--ink); padding-top: 16px; scroll-margin-top: 24px; }
.shelf-label {
  font-family: var(--mono); font-weight: 400; font-size: 13px; line-height: 1.4;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}
.shelf-label a { color: var(--muted); text-decoration: none; }
.shelf-label a:hover { color: var(--ink); text-decoration: underline; }
.shelf-list { list-style: none; margin: 0; padding: 0; }
.shelf-list li { border-bottom: 1px solid var(--rule); }
.shelf-list a {
  display: block; padding-block: 12px;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.3;
  color: var(--ink); text-decoration: none;
}
.shelf-list a:hover { color: var(--accent); }
.shelf-desc { display: block; margin: -6px 0 12px; font-size: 15px; color: var(--muted); }
.shelves-compact { margin-bottom: 0; }
.shelves-compact .shelf-list a { font-size: 1.125rem; }

/* ------------------------------------------------------------- newsletter */

.newsletter {
  display: flex; flex-wrap: wrap; gap: 32px 72px;
  border-top: 2px solid var(--ink); padding-top: 40px;
}
.newsletter-text { flex: 1 1 320px; min-width: 0; }
.newsletter-text h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 12px;
}
.newsletter-text p { margin: 0; color: var(--ink-2); max-width: 30em; }
.newsletter-form { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.field-label, .newsletter-tags legend { font-weight: 500; font-size: 15px; }
.field-label { margin-bottom: -8px; }
.field-input {
  width: 100%; min-height: 48px; padding: 0 14px;
  font: 400 16px/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--ink); border-radius: var(--radius);
}
.newsletter-tags { border: 0; margin: 0; padding: 0; }
.newsletter-tags legend { padding: 0; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.newsletter-form .button { align-self: flex-start; }
.fine-print { margin: 0; font-size: 14px; color: var(--muted); }

/* ----------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--rule); }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  padding-block: 28px 40px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.footer-row p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
