/* ==========================================================================
   sive.rs-inspired Minimalist Stylesheet
   - Pure HTML/CSS, zero dependencies
   - Fast loading (< 5KB), accessible, responsive
   ========================================================================== */


@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Italic-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --text-muted: #555555;
  --link-color: #0044cc;
  --link-hover: #002277;
  --border-color: #e5e5e5;
  --code-bg: #f5f5f5;
  --highlight-bg: #fbfbfb;
  --font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #e6e6e6;
    --text-muted: #999999;
    --link-color: #66aaff;
    --link-hover: #99ccff;
    --border-color: #2a2a2a;
    --code-bg: #1c1c1c;
    --highlight-bg: #181818;
  }
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  padding: 2.5rem 1.25rem 4rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 1.125rem;
  line-height: 1.6;
  text-align: start;
  overflow-wrap: break-word;
}

/* Container Constraint */
.container {
  max-width: 42rem;
  margin: 0 auto;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

a:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

/* Header & Navigation */
header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.site-title:hover {
  text-decoration: underline;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 1.1875rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

nav a:hover,
nav a.active {
  color: var(--link-color);
  text-decoration: underline;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-color);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
  margin-top: 1rem;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2.25rem;
}

h3 {
  font-size: 1.25rem;
}

/* Body Copy */
p,
li,
blockquote {
  text-wrap: pretty;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 1.25rem;
  border-left: 3px solid var(--border-color);
  color: var(--text-muted);
  font-style: italic;
}

/* Code & Pre */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background-color: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.45;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Article Lists */
.post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.post-item {
  margin-bottom: 1.5rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 0.2rem;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  color: var(--link-color);
}

.post-title:hover {
  text-decoration: underline;
}

.post-summary {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* Article Header & Footer (Sivers style) */
.article-header {
  margin-bottom: 2rem;
}

.article-header .date {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

.feedback-box {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 1rem;
}

.feedback-box p {
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Site Footer */
footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Print Styles */
@media print {
  body {
    background: #fff;
    color: #000;
    padding: 0;
    font-size: 12pt;
  }

  header,
  nav,
  footer.site-footer,
  .feedback-box,
  .back-link {
    display: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}