/* IBM Plex via bunny.net — GDPR-friendly, no US CDN */
@import url('https://fonts.bunny.net/css?family=ibm-plex-sans:400,400i,600|ibm-plex-mono:400&display=swap');

/* ------------------------------------------------------------------ */
/* Design tokens                                                        */
/* ------------------------------------------------------------------ */

:root {
  --font-body:  'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:  'IBM Plex Mono', 'Courier New', monospace;

  /* IBM Carbon palette, muted for reading comfort */
  --color-bg:          #ffffff;
  --color-text:        #161616;   /* IBM Gray 100         */
  --color-text-muted:  #525252;   /* IBM Gray 60          */
  --color-accent:      #0043ce;   /* IBM Blue 70          */
  --color-border:      #e0e0e0;   /* IBM Gray 20          */
  --color-code-bg:     #f4f4f4;   /* IBM Gray 10          */
  --color-header-bg:   #f4f4f4;

  --width-content: 720px;
}

/* ------------------------------------------------------------------ */
/* Reset                                                                */
/* ------------------------------------------------------------------ */

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

/* ------------------------------------------------------------------ */
/* Base                                                                 */
/* ------------------------------------------------------------------ */

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

/* ------------------------------------------------------------------ */
/* Header                                                               */
/* ------------------------------------------------------------------ */

.site-header {
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 1.5rem;
}

.site-header-inner {
  max-width: var(--width-content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
  font-family: var(--font-mono);
}

.site-title:hover {
  color: var(--color-accent);
}

.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  margin-left: 1.75rem;
  font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-accent);
}

/* ------------------------------------------------------------------ */
/* Main content                                                         */
/* ------------------------------------------------------------------ */

main {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ------------------------------------------------------------------ */
/* Typography                                                           */
/* ------------------------------------------------------------------ */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: currentColor;
}

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

li {
  margin-bottom: 0.375rem;
}

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

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* ------------------------------------------------------------------ */
/* Code                                                                 */
/* ------------------------------------------------------------------ */

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}

pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ */
/* Tags                                                                 */
/* ------------------------------------------------------------------ */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 0.1em 0.5em;
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.tag:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Post list                                                            */
/* ------------------------------------------------------------------ */

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

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list > .post-item:first-child {
  border-top: 1px solid var(--color-border);
}

.post-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.post-title a {
  color: var(--color-text);
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.post-summary {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Single post                                                          */
/* ------------------------------------------------------------------ */

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-header h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Landing page                                                         */
/* ------------------------------------------------------------------ */

.landing {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  line-height: 1.6;
}

.recent-posts h2 {
  margin-top: 0;
  margin-bottom: 0;
}

.all-posts {
  margin-top: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Footer                                                               */
/* ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem;
  margin-top: 4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
  .site-header { padding: 0.75rem 1rem; }
  main { padding: 1.75rem 1rem; }
  h1  { font-size: 1.5rem; }
}
