/*
Theme Name: _v1
Theme URI: https://renekirk.com
Author: René Kirk
Author URI: https://renekirk.com
Description: A clean text blog. Equal archive cards, and a dimmed featured image behind the headline.
Version: 2.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.3
Text Domain: v1
*/

:root {
  color-scheme: light;
  --ink: #1c1b19;
  --text: #3a3835;
  --muted: #7a746c;
  --line: #e6e2dc;
  --paper: #fff;
  --soft: #f4f1ec;
  --measure: 40rem;
  --wide: 64rem;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
}

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

html { font-size: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); }
a:hover { color: #000; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 2;
  padding: 0.4rem 0.7rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  text-decoration: none;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(var(--measure), calc(100% - 2rem));
  margin-inline: auto;
}

.wrap-wide { width: min(var(--wide), calc(100% - 2rem)); }

.site-header { padding: 1.4rem 0 1.1rem; }

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-name {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-name a,
.custom-logo-link { color: var(--ink); text-decoration: none; }

.custom-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a { color: var(--ink); }

.site-main { margin-top: 2rem; }

.intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
}

.intro p { margin: 0; }
.intro strong { color: var(--ink); font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card { display: flex; min-width: 0; }

.card a {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 1.4rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--soft);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.card.has-cover a {
  color: #fff;
  background-color: #1a1816;
  background-image: linear-gradient(rgba(18, 16, 14, 0.42), rgba(18, 16, 14, 0.5)), var(--cover);
  background-size: cover;
  background-position: center;
}

.card a:hover { filter: brightness(1.04); }

.card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.6vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.card time,
.post-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card time { color: var(--muted); }
.card.has-cover time { color: rgba(255, 255, 255, 0.82); }

.post-hero { margin: 0.4rem 0 2rem; }

.post-hero .post-title {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.post-hero .post-kicker { color: var(--muted); }

.post-hero.has-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  aspect-ratio: 16 / 8;
  padding: 2rem 1.5rem;
  border-radius: 1.25rem;
  text-align: center;
  color: #fff;
  background-color: #1a1816;
  background-image: linear-gradient(rgba(18, 16, 14, 0.42), rgba(18, 16, 14, 0.5)), var(--cover);
  background-size: cover;
  background-position: center;
}

.post-hero.has-cover .post-title,
.post-hero.has-cover .post-kicker { color: #fff; }
.post-hero.has-cover .post-kicker { color: rgba(255, 255, 255, 0.82); }

.page-title,
.error404 .post-title {
  margin: 0.4rem 0 1.2rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.entry { font-size: 1.125rem; line-height: 1.75; }
.entry > *:first-child { margin-top: 0; }

.entry p,
.entry ul,
.entry ol,
.entry blockquote,
.entry pre,
.entry figure { margin: 0 0 1.05em; }

.entry h2,
.entry h3 {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.entry h2 { font-size: 1.45rem; margin: 1.7em 0 0.4em; }
.entry h3 { font-size: 1.2rem; margin: 1.5em 0 0.35em; }
.entry ul,
.entry ol { padding-left: 1.2em; }

.entry a { text-underline-offset: 0.15em; }

.entry blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.entry img { display: block; margin: 1.2em auto; border-radius: 0.6rem; }

.entry code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--soft);
  padding: 0.1em 0.32em;
  border-radius: 0.25rem;
}

.entry pre {
  padding: 1rem 1.05rem;
  overflow: auto;
  background: var(--soft);
  border-radius: 0.7rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.entry pre code { background: none; padding: 0; }
.entry .alignleft { float: left; margin: 0.2em 1em 1em 0; }
.entry .alignright { float: right; margin: 0.2em 0 1em 1em; }
.entry .aligncenter { display: block; margin-inline: auto; }
.entry::after { content: ""; display: block; clear: both; }

.pager,
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.pager a,
.post-nav a { text-decoration: none; }
.pager a:hover,
.post-nav a:hover { text-decoration: underline; }
.post-nav-next { margin-left: auto; text-align: right; }

.comments { margin-top: 2.8rem; }

.comments-title {
  margin: 0 0 1rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.comment-list,
.comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.25rem; }

.comment-body {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  column-gap: 0.7rem;
  margin: 0 0 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.comment-meta,
.comment-text { grid-column: 2; }

.comment-author { font-weight: 600; color: var(--ink); }
.comment-author a { text-decoration: none; }

.comment-time,
.comment-reply a {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
}

.comment-text { margin-top: 0.2rem; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-body .avatar {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea,
.search-form input[type="search"] {
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.comment-respond textarea { min-height: 8rem; resize: vertical; }

.comment-respond input:focus,
.comment-respond textarea:focus,
.search-form input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: transparent;
}

.comment-respond input[type="submit"],
.search-form button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 0.55rem 1.05rem;
  cursor: pointer;
}

.comment-respond input[type="submit"]:hover,
.search-form button:hover { background: #000; }

.comment-form-cookies {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

.comment-form-cookies input { margin-right: 0.35rem; }

.site-footer { margin-top: 3.5rem; }

.site-footer .wrap {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2.5rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
}

.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .brand { align-items: flex-start; flex-direction: column; }
  .nav-menu { justify-content: flex-start; }
  .cards { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  .post-nav-next { margin-left: 0; text-align: left; }
}
