/* Open Sans, hosted on this site (no Google tracking). Licence: assets/fonts/OFL-LICENSE.txt */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url("fonts/open-sans-latin-wght-normal.woff2") format("woff2-variations"), url("fonts/open-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-display: swap;
  font-weight: 300 800;
  src: url("fonts/open-sans-latin-wght-italic.woff2") format("woff2-variations"), url("fonts/open-sans-latin-wght-italic.woff2") format("woff2");
}

/* ---------- Theme: change these to restyle the site ---------- */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --line: #e7e5e1;
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --radius: 12px;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans); /* headings and article text also use Open Sans */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416; --surface: #1c1c1f; --text: #ececee; --muted: #9a9aa2;
    --line: #2c2c31; --accent: #6ea8ff; --accent-soft: #1d2a40;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.wrap.narrow { max-width: 720px; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .85em; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { color: var(--text); display: flex; flex-direction: column; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.brand-tag { color: var(--muted); font-size: .9rem; }
.search input { width: 240px; max-width: 100%; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Category bar */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.cats a { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .9rem; background: var(--surface); }
.cats a:hover { text-decoration: none; color: var(--text); }
.cats a.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Article list */
.list { margin: 18px 0 40px; }
.card { display: grid; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.card.has-img { grid-template-columns: 1fr 220px; }
.card.has-img .card-img { order: 2; }
.card-img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); display: block; }
.card h2 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; margin: 6px 0 8px; letter-spacing: -.01em; }
.card h2 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: .85rem; color: var(--muted); }
.tag { background: var(--accent-soft); color: var(--accent); padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.domain { font-style: italic; }
.empty, .notice { color: var(--muted); margin: 30px 0 0; }
.notice { background: var(--accent-soft); color: var(--text); padding: 10px 16px; border-radius: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 0 0 60px; color: var(--muted); font-size: .95rem; }

/* Single article */
.post header { margin: 44px 0 26px; }
.post h1 { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; letter-spacing: -.02em; margin: 12px 0 14px; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0; }
.hero { margin: 0 0 30px; }
.hero img { width: 100%; border-radius: var(--radius); display: block; }
.source { display: block; padding: 16px 20px; margin: 0 0 30px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); }
.source:hover { text-decoration: none; border-color: var(--accent); }
.content { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; }
.content h2, .content h3, .content h4 { font-family: var(--sans); line-height: 1.3; margin: 2em 0 .6em; }
.content img { border-radius: 8px; display: block; margin: 1.5em auto; }
.content blockquote { margin: 1.5em 0; padding: 4px 22px; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }
.content pre { background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: 8px; overflow-x: auto; font-size: .85rem; }
.content code { font-size: .88em; background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.content pre code { padding: 0; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.share { display: flex; flex-wrap: wrap; gap: 14px; margin: 50px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.back { margin: 20px 0 60px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .card.has-img { grid-template-columns: 1fr; }
  .card.has-img .card-img { order: 0; }
  .search, .search input { width: 100%; }
}

/* About me box */
.about { display: grid; gap: 26px; align-items: start; margin: 36px 0 10px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.about.has-photo { grid-template-columns: 120px 1fr; }
.about-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }
.about h1 { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 10px; letter-spacing: -.01em; }
.about-text p { margin: 0 0 .8em; }
.about-text p:last-child { margin-bottom: 0; }
.about-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
.about-links a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 600; }
.about-links a:hover { text-decoration: none; border-color: var(--accent); }
@media (max-width: 640px) {
  .about { padding: 20px; }
  .about.has-photo { grid-template-columns: 1fr; }
  .about-photo { width: 88px; height: 88px; }
}
