@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;1,9..144,300;1,9..144,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,700;1,8..60,400&display=swap');

:root {
  --bg: #F4F2EE;
  --text: #201E1A;
  --muted: #8A9A8C;
  --rule: #D8D5CE;
  --max: 640px;
  --pad: 48px 32px;
  --serif: 'Source Serif 4', serif;
  --display: 'Fraunces', serif;
  --accent: #5C7A60;
  --mono: 'IBM Plex Mono', monospace;
}

@media (min-width: 640px) {
  :root {
    --pad: 80px 40px;
  }
}

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

html {
  overflow-y: scroll;
}


body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

@media (min-width: 640px) {
  body {
    border-width: 20px;
  }
}

@media (min-width: 1024px) {
  body {
    border-width: 28px;
  }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad);
}

/* Header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-wordmark {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s;
}

.site-wordmark:hover {
  opacity: 0.6;
}

.nav-b {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-b-link {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
}

.nav-b-link:hover {
  color: var(--accent);
}

.nav-b-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* Homepage hero */

.home-hero {
  margin-top: 40px;
}

.home-hero-img-link {
  display: block;
  width: 100%;
}

.home-hero-img-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s;
  border-radius: 0;
}

.home-hero-img-link:hover img {
  opacity: 0.88;
}

.home-hero-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 20px;
  margin-bottom: 10px;
}

.home-hero-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.home-hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  transition: opacity 0.2s;
}

.home-hero-title-link:hover .home-hero-title {
  opacity: 0.65;
}

.home-hero-excerpt {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  opacity: 0.6;
  max-width: 52ch;
  margin-bottom: 18px;
}

.home-hero-read {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.45;
  text-decoration: none;
}

.home-hero-read:hover {
  opacity: 1;
}

/* Homepage index */

.home-index {
  margin-top: 44px;
  border-top: 1px solid var(--rule);
}

.home-index-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #ECEAE4;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.home-index-row:hover {
  opacity: 0.6;
}

.home-index-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  flex: 1;
  line-height: 1.2;
  color: var(--text);
}

.home-index-date {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text);
  opacity: 0.28;
  flex-shrink: 0;
  letter-spacing: 0.1em;
}

/* Rules */

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* Content */

.content {
  margin-top: 48px;
}

p {
  max-width: 62ch;
  margin-bottom: 22px;
}

p:last-child {
  margin-bottom: 0;
}

/* Footer */

.footer {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.footer-top {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-copy {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Section label — matches about page style */

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
  max-width: 100%;
}

/* Featured post (homepage) */

.featured-post {
  margin-top: 32px;
  margin-bottom: 80px;
}



/* Preview posts */

.preview-list {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
}

.preview-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}

.preview-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.preview-title {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-top: 16px;
  margin-bottom: 12px;
}

.preview-title-link {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s;
}

.preview-title-link:hover {
  opacity: 0.5;
}

.preview-excerpt {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.6;
  max-width: 62ch;
  margin-bottom: 16px;
}

.preview-read-more {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
}

.preview-read-more:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Compact list */

.compact-list {
  margin-top: 32px;
}

.compact-item {
  border-bottom: 1px solid var(--rule);
}

.compact-item:last-child {
  border-bottom: none;
}


/* Tag filters */

.tag-filters {
  margin-top: 32px;
  margin-bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.tag-filter {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 3px;
  cursor: pointer;
}

.tag-filter:hover {
  color: var(--text);
  border-bottom-color: var(--rule);
}

.tag-filter.active {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* Post */

.post-meta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  line-height: 1.2;
}

.post-meta-tag {
  color: var(--accent);
  text-decoration: none;
}

.post-meta-tag:hover {
  text-decoration: underline;
}

.post-title {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 24px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .post-title {
    font-size: 52px;
  }
}

.post-body h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 16px;
  color: var(--text);
}

@media (min-width: 640px) {
  .post-body h2 { font-size: 36px; }
}

.post-body h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .post-body h3 { font-size: 28px; }
}

.post-body h4 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .post-body h4 { font-size: 22px; }
}

.post-body h5,
.post-body h6 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
  margin-top: 24px;
  margin-bottom: 8px;
}

.post-body p {
  margin-bottom: 22px;
}

/* Global image treatment */

img {
  filter: none;
  border-radius: 0;
}

figure {
  position: relative;
}

figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Hero image */

.post-hero {
  margin: 32px 0 40px;
}

.post-hero img {
  width: 100%;
  display: block;
}

.post-hero figcaption {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 10px;
  opacity: 0.5;
}



/* Inline links in body */
.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s;
}

.post-body a:hover {
  text-decoration-color: var(--accent);
}

/* Blockquote */
.post-body blockquote {
  border-left: 2px solid var(--accent);
  background: #faf8f5;
  border-radius: 0 6px 6px 0;
  margin: 40px 0;
  padding: 20px 24px;
}

.post-body blockquote p {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0;
}

/* Lists */
.post-body ul,
.post-body ol {
  margin: 24px 0;
  padding-left: 24px;
}

.post-body ul {
  list-style: none;
  padding-left: 0;
}

.post-body ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.7;
}

.post-body ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

.post-body ol {
  list-style: none;
  counter-reset: ol-counter;
  padding-left: 0;
}

.post-body ol li {
  counter-increment: ol-counter;
  padding-left: 32px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.7;
}

.post-body ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  top: 5px;
}

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
  font-family: var(--mono);
  font-size: 12px;
}

.post-body thead {
  border-bottom: 2px solid var(--rule);
}

.post-body th {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 400;
  padding: 0 16px 12px 0;
}

.post-body td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text);
  line-height: 1.5;
}

.post-body tr:last-child td {
  border-bottom: none;
}

/* Inline images */

.post-body img {
  width: 100%;
  display: block;
}

.post-body p:has(img) {
  margin: 40px 0;
  line-height: 0;
}


.post-body figure {
  margin: 40px 0;
}

.post-body figure img {
  width: 100%;
  display: block;
  margin: 0;
}

.post-body figcaption {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 10px;
  opacity: 0.5;
}

/* Pull quote */

.pullquote {
  margin: 48px 0;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.pullquote p {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.15;
  color: var(--text);
  text-align: center;
  max-width: 100%;
  margin-bottom: 0;
}

.pullquote p::before {
  content: '\201C';
  color: var(--accent);
  font-size: 1.2em;
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 4px;
}

.pullquote p::after {
  content: '\201D';
  color: var(--accent);
  font-size: 1.2em;
  line-height: 0;
  vertical-align: -0.3em;
  margin-left: 4px;
}


/* Archive list */

.archive-list {
  border-top: 1px solid var(--rule);
}

.archive-item {
  border-bottom: 1px solid var(--rule);
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-link--b {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 12px 0;
  text-decoration: none;
  color: var(--text);
}

.b-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.b-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.b-date {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

.archive-link--b:hover .b-title { opacity: 0.5; }

/* About page */

.about {
  padding-top: 48px;
}

.about-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  max-width: 100%;
}

.about-spec {
  display: flex;
  flex-direction: column;
}

.spec-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.spec-row:last-child {
  border-bottom: none;
}


.about-spec dt {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 2px;
}

.about-spec dd {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

@media (max-width: 480px) {
  .spec-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.about-mood {
  margin-bottom: 12px;
}

.about-mood img {
  width: 100%;
  display: block;
}

/* Related posts */

.related-posts {
  margin-top: 64px;
  padding-top: 32px;
}

.related-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 24px;
}

.related-list {
  border-top: 1px solid var(--rule);
}

.related-item {
  border-bottom: 1px solid var(--rule);
}

.related-item:last-child {
  border-bottom: none;
}

.related-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 10px 0;
  text-decoration: none;
  color: var(--text);
}

.related-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  transition: opacity 0.15s;
}

.related-link:hover .related-title {
  opacity: 0.5;
}

.related-date {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Centered em-dash for *** in markdown */
.post-body hr {
  border: none;
  text-align: center;
  margin: 48px 0;
}

.post-body hr::after {
  content: '—';
  color: var(--muted);
}
