/* Minimal dark theme focused on readability */
:root {
  --bg: #0b0f14;
  --bg-elev: #121822;
  --text: #e6e6e6;
  --muted: #a7b0be;
  --accent: #7aa2f7; /* accessible blue */
  --accent-visited: #b48ead; /* soft purple */
  --border: #243041;
  --maxw: 70ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.7;
  font-size: 18px; /* readable base */
}

.wrap { max-width: var(--maxw); padding: 2rem 1rem; margin: 0 auto; }

/* Accessibility: skip link */
.skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 6px; }

.site-header { border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; 
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  font-weight: 700;
}
.site-nav { margin-left: auto; display: flex; gap: .75rem; }
.nav-link { color: var(--muted); text-decoration: none; padding: .4rem .6rem; border-radius: 8px; }
.nav-link:hover, .nav-link:focus { background: var(--bg-elev); color: var(--text); }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); }
.site-footer a { color: var(--muted); }

h1, h2, h3 { line-height: 1.25; font-family: "Source Serif 4", ui-serif, Georgia, serif; }
h1 { font-size: clamp(1.9rem, 2.6vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 1.9vw, 1.6rem); margin-top: 2.2rem; }
h3 { font-size: 1.15rem; margin-top: 1.6rem; }

p { margin: 1rem 0; }
ul, ol { padding-left: 1.2rem; }

.post-header { margin: 1rem 0 2rem; }
.post-title { margin: 0 0 .3rem; }
.post-meta { color: var(--muted); font-size: 0.95rem; }

.post-content a { color: var(--accent); }
.post-content a:visited { color: var(--accent-visited); }
.post-content img, .post-content video { max-width: 100%; height: auto; border-radius: 12px; }

blockquote {
  margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--bg-elev);
  border-left: 3px solid var(--border); color: var(--muted); border-radius: 8px;
}

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.95em; }
code { background: var(--bg-elev); padding: .15rem .35rem; border-radius: 6px; }
pre { background: var(--bg-elev); padding: 1rem; border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
pre code { background: transparent; padding: 0; }

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

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { border: 1px solid var(--border); padding: .6rem .5rem; text-align: left; }
th { background: var(--bg-elev); }

/* Small screen niceties */
@media (max-width: 600px) {
  .site-nav { gap: .25rem; }
  .nav-link { padding: .35rem .5rem; }
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
  border-radius: 12px;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}