/* Official Inter 4.1 WOFF2 files, served from this blog. */
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-v4.1-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-v4.1-variable-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f8f5ee;
  --surface: #fdfbf7;
  --text: #000000;
  --muted: #5e5750;
  --reading-size: 1.1rem;
  --line: #ded6cb;
  --link: #70432c;
  --link-hover: #4f2e1e;
  --shadow: 0 10px 28px rgba(37, 26, 16, 0.08);
  --sans: "Inter", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141210;
    --surface: #1b1815;
    --text: #ede5da;
    --muted: #c1b5a7;
    --line: #322b25;
    --link: #e2b28b;
    --link-hover: #f3ceaf;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: var(--reading-size);
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body, var(--sans));
  background: linear-gradient(180deg, var(--surface) 0, var(--bg) 420px);
  line-height: 1.5;
  font-size: var(--reading-size);
}

button, input, select, textarea, pre, code, kbd, samp {
  font-family: var(--sans);
}

.wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 1.1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.site-title {
  margin: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 0.95rem;
  font-family: var(--sans);
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.page {
  margin-top: 2.1rem;
  animation: fadeUp 380ms ease both;
}

.hero,
.page-header {
  margin: 0 0 2rem;
}

.hero h1,
.page-header h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.08;
  font-weight: 620;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: var(--reading-size);
}

.hero-contact {
  margin: 0.75rem 0 0;
}

.hero-contact a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-contact-icon {
  width: 1.45rem;
  height: 1.45rem;
}

.hero-contact a:hover,
.hero-contact a:focus-visible {
  color: var(--text);
}

.post-list {
  display: grid;
  gap: 1.8rem;
}

.post-card,
.post {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.post-card {
  padding: 0;
  width: 100%;
}

.post-card h2,
.post h1 {
  margin: 0 0 0.3rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 620;
}

.post-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--link);
}

.summary {
  margin: 0.7rem 0 0;
  color: var(--text);
  font-size: var(--reading-size);
  font-weight: 420;
  line-height: 1.5;
}

.meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.meta-sep {
  color: var(--line);
}

.tag-row {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  padding: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
}

.tag:hover {
  color: var(--text);
  border-color: var(--muted);
}

.post {
  padding: 0;
  width: 100%;
}

.post-header {
  margin-bottom: 1.1rem;
}

.post-toc {
  margin: 0 0 1.15rem;
}

.post-toc h2 {
  margin: 0;
  font-size: var(--reading-size);
}

.post-toc ul {
  margin-top: 0;
  list-style: none;
  padding-left: 1.45rem;
}

.post-toc > nav > ul {
  padding-left: 0;
}

.post-toc a {
  color: var(--link);
}

.post-toc a:hover {
  color: var(--link-hover);
}

.content {
  font-size: var(--reading-size);
  font-weight: 420;
  line-height: 1.5;
}

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

.content a {
  color: var(--link);
}

.content a:hover {
  color: var(--link-hover);
}

.content p,
.content ul,
.content ol,
.content blockquote,
.content pre {
  margin: 0 0 1.15rem;
}

.content ul,
.content ol {
  padding-left: 1.45rem;
}

.content h2,
.content h3,
.content h4 {
  margin: 2rem 0 0.7rem;
  line-height: 1.22;
  font-weight: 620;
}

.content blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--line);
  color: var(--text);
  font-style: italic;
}

.content pre {
  overflow-x: auto;
  padding: 0.95rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: rgba(135, 124, 113, 0.1);
}

.content code {
  font-family: var(--sans);
  font-size: 0.87em;
}

.content img {
  max-width: 100%;
  height: auto;
  margin: 0.7rem 0 1.1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
}

.content .image-figure {
  width: 100%;
  margin: 0 0 1.1rem;
}

.content .image-figure > a {
  display: block;
}

.content .image-figure img {
  display: block;
  width: 100%;
  margin: 0;
}

.content .image-caption {
  display: inline-block;
  margin-top: 0.45rem;
}

.content .image-figure {
  text-align: center;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.15rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  html {
    font-size: var(--reading-size);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .site-nav {
    letter-spacing: 0.08em;
  }
}
