/* Awkward Engineer — site base (Merged Design Kit) */

@font-face {
  font-family: "Gnomon*";
  src: url("/fonts/Gnomon-400.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  /* optional = no late swap flicker; preload helps it win on first paint */
  font-display: optional;
}

@font-face {
  font-family: "Drafting Mono";
  src: url("/fonts/Drafting-Mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Drafting Mono";
  src: url("/fonts/Drafting-Mono-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: optional;
}

@font-face {
  font-family: "Drafting Mono";
  src: url("/fonts/Drafting-Mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

:root {
  --paper: #f8f4e8;
  --paper2: #f7f3e4;
  --ink: #23251d;
  --soft: #5b5c4e;
  --olive: #4b5320;
  --olive-dk: #3b4419;
  --olive-tint: #e9e7cf;
  --red: #a33327;
  --red-dk: #8c271e;
  --line: #c6bd9c;
  --khaki: #d8cfae;

  --gnomon: "Gnomon*", "Gnomon", sans-serif;
  --body: "Jost", Futura, "Century Gothic", sans-serif;
  --label: "Oswald", sans-serif;
  --mono: "Drafting Mono", ui-monospace, monospace;
  --script: "Allura", cursive;

  --column: 760px;
  --body-size: 20px;
  --leading: 1.65;
}

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

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--leading);
}

.site-wrap {
  width: 100%;
  max-width: var(--column);
  /* Left-biased: modest left inset, spare width falls to the right */
  margin: 0 auto 0 clamp(4rem, 22vw, 16rem);
  padding: 2rem 1.25rem 4rem;
}

@media (max-width: 820px) {
  .site-wrap {
    margin-left: 0;
    margin-right: auto;
  }
}

/* —— Header / nav (kit) —— */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  /* Kit blogpost top rule: 4px secondary */
  border-bottom: 4px solid var(--olive);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand img,
.site-brand .site-logo {
  display: block;
  height: 3rem;
  width: auto;
  max-width: min(14rem, 62vw);
  overflow: visible;
}

/* Temp header wordmark — iterate sizes/spacing here */
.site-logo__engineer {
  font-family: var(--gnomon);
  font-size: 50px;
  font-weight: 400;
  letter-spacing: 0.35em;
  fill: var(--ink);
}

.site-logo__awkward {
  font-family: var(--mono);
  font-size: 20px;
  /* 600 requested; only 400/700 faces ship → browser picks 700 */
  font-weight: 600;
  letter-spacing: 0.75em;
  fill: var(--red);
}

.site-logo__stamp-box {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-nav a {
  font-family: var(--label);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
}

.site-nav a:hover {
  color: var(--olive-dk);
  box-shadow: inset 0 -3px 0 var(--khaki);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--red);
}

/* —— Type ladder —— */
main > h1,
.page-title,
.post-title,
main h2.post-title {
  font-family: var(--gnomon);
  font-weight: 900;
  font-variation-settings: "TOTD" 500, "DIST" 1000;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  /* Kit .bp-title sits ~24px above the meta band */
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.page-title {
  margin-bottom: 1.75rem;
}

/* Page kicker used as H1 (Latest / Archive / About) */
h1.post-kicker {
  font-size: 13px;
  line-height: 1.3;
  margin: 0 0 1.25rem;
}

.archive-header {
  margin: 0 0 1.75rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}

.archive-header .post-kicker {
  margin-bottom: 0.65rem;
}

.archive-year-label {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.16;
  color: var(--olive-dk);
  margin: 0 0 0.85rem;
}

.archive-filters,
.archive-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0;
}

.archive-filters {
  margin: 0 0 2.5rem;
}

.archive-filters a,
.archive-years a {
  font-family: var(--label);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: none;
}

.archive-filters a:hover,
.archive-years a:hover {
  color: var(--olive-dk);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.archive-filters a[aria-current="page"],
.archive-years a[aria-current="page"] {
  color: var(--olive-dk);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--red);
}

.archive-pager {
  margin-top: 1rem;
}

/* Home: quiet site tagline under brand, above Latest */
.home-intro-block {
  margin: 0 0 3rem;
  padding-top: 1.75rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.home-intro {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft);
  margin: 0;
  text-align: left;
}

/* Home: featured newest post + list of the next few */
.feature-post {
  margin: 0 0 3rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.feature-title {
  font-family: var(--gnomon);
  font-weight: 900;
  font-variation-settings: "TOTD" 500, "DIST" 1000;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.feature-title a {
  color: inherit;
  text-decoration: none;
}

.feature-title a:hover {
  color: var(--olive-dk);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.feature-meta {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--soft);
  margin: 0 0 1rem;
}

.feature-meta time {
  color: var(--olive-dk);
  font-weight: 700;
}

.feature-excerpt {
  margin: 0 0 1.35rem;
  color: var(--ink);
}

.feature-more {
  margin: 0.5rem 0 0;
  text-align: right;
}

.feature-more-link {
  color: var(--olive-dk);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.feature-more-link:hover {
  text-decoration-thickness: 2px;
}

/* Scarce Stamp Red — just the directional cue */
.feature-more-arrow {
  color: var(--red);
  text-decoration: none;
}

.archive-quarter {
  margin: 0 0 2.5rem;
}

.archive-quarter-label {
  margin: 0 0 0.75rem;
}

.archive-quarter + .archive-quarter .archive-quarter-label {
  margin-top: 0.5rem;
}

.archive-quarter .post-list {
  margin-top: 0;
}

.about-post + .about-post {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.favorites-section {
  margin: 0 0 2.5rem;
}

/* Breathe between page kicker and first content (matches section rhythm) */
h1.post-kicker + .favorites-section,
h1.post-kicker + .archive-filters {
  margin-top: 3rem;
}

.favorites-section h4 {
  margin-top: 0;
}

.favorites-section + .favorites-section h4 {
  margin-top: calc(26px * 1.1);
}

.favorites-section .post-list {
  margin-top: 0;
}

.favorites-more {
  margin: 0.75rem 0 0;
  text-align: right;
}

main h2 {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: 0;
  color: var(--olive-dk);
  margin: calc(38px * 1.25) 0 calc(38px * 0.5);
}

main h3 {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1.25;
  color: var(--olive-dk);
  margin: calc(26px * 1.1) 0 calc(26px * 0.45);
}

main h4 {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-dk);
  margin: calc(26px * 1.1) 0 8px;
}

main h4 + h3 {
  margin-top: 0;
}

main p {
  margin: 0 0 1.55em;
}

main a {
  color: var(--olive-dk);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

main a:hover {
  text-decoration-thickness: 2px;
}

main strong {
  font-weight: 700;
}

main em {
  font-style: italic;
}

main code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--khaki);
  padding: 0.1em 0.35em;
}

main pre {
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--olive-tint);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0 0 1.55em;
}

main pre code {
  background: none;
  padding: 0;
}

main ul,
main ol {
  margin: 0 0 1.55em;
  padding-left: 1.25em;
}

main li {
  margin: 0.5em 0;
}

main li::marker {
  color: var(--olive);
  font-weight: 700;
}

main hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

main img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1.5px solid var(--ink);
}

main blockquote {
  margin: 2rem 0;
  padding: 0.4rem 0 0.4rem 1.5rem;
  border-left: 5px solid var(--olive);
  max-width: 42rem;
}

main blockquote p {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  margin: 0;
}

/* —— Lists on home / archive —— */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 2rem;
}

.post-list li {
  margin: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list li::marker {
  content: none;
}

.post-list a {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}

.post-list a:hover {
  color: var(--olive-dk);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-list time {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--soft);
}

/* Kit Stamp Red accent bar (always) + optional Oswald kicker label */
.post-accent {
  width: 44px;
  height: 4px;
  background: var(--red);
  margin: 1.25rem 0 16px;
}

.post-kicker {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-dk);
  margin: 0 0 0.85rem;
}

/* Kit .bp-meta: soft hairline above, olive-dark structure bar below */
.post-meta {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 1.15rem 0;
  border-top: 1px solid var(--soft);
  border-bottom: 2px solid var(--olive-dk);
  margin: 0 0 2.75rem;
}

.post-meta time {
  color: var(--olive-dk);
  font-weight: 700;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body img {
  margin: 0 0 1.55em;
}

.more-link {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Kit pager — Newer left, Older right */
.post-pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 2px solid var(--olive);
  padding-top: 12px;
  margin-top: 3rem;
}

.post-pager a {
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-dk);
  text-decoration: none;
  max-width: min(100%, 20rem);
}

.post-pager a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.post-pager-older {
  text-align: right;
  margin-left: auto;
}

.post-pager .pg-note {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--soft);
  margin-top: 3px;
  line-height: 1.4;
}

.post-pager-slot {
  flex: 1;
}
