/* Snowflake in the Carolinas — clean technical blog */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #5a6478;
  --border: #e2e6ee;
  --link: #0b5cab;
  --link-hover: #084a8a;
  --accent: #29b5e8; /* Snowflake-ish cyan */
  --code-bg: #0f1724;
  --code-text: #e6edf7;
  --pre-border: #1e293b;
  --max: 44rem;
  --wide: 52rem;
  --radius: 8px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.wrap {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  background: linear-gradient(180deg, #0b1b2b 0%, #12263a 100%);
  color: #e8eef6;
  padding: 1.25rem 0 1rem;
  border-bottom: 3px solid var(--accent);
  margin-bottom: 2rem;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-title:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}
.site-nav a {
  color: #c5d4e8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-tagline {
  margin: 0.6rem auto 0;
  color: #9db0c9;
  font-size: 0.92rem;
}

/* Main */
main.wrap {
  max-width: var(--max);
  padding-bottom: 3rem;
}

.home-intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--muted);
}
.home-intro p {
  margin: 0;
}

.section-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 600;
}

/* Post list */
.posts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 560px) {
  .post-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

.post-date {
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 0.2rem;
  white-space: nowrap;
}

.post-item-title {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.post-item-title:hover {
  color: var(--link);
}

.post-item-excerpt {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-item-cats {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}
.post-item-cats a,
.cat-link {
  color: var(--link);
  text-decoration: none;
}
.post-item-cats a:hover,
.cat-link:hover {
  text-decoration: underline;
}

.archive-list {
  line-height: 1.9;
}
.archive-list time {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
}

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

.post-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.meta-sep {
  margin: 0 0.35rem;
}

.post-nav {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.post-nav a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}
.post-nav a:hover {
  text-decoration: underline;
}

/* Prose */
.prose {
  font-size: 1.05rem;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose a {
  color: var(--link);
}
.prose a:hover {
  color: var(--link-hover);
}
.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.3;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  letter-spacing: -0.015em;
}
.prose h2 {
  font-size: 1.4rem;
}
.prose h3 {
  font-size: 1.2rem;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.1em;
}
.prose li {
  margin-bottom: 0.35em;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.prose figure {
  margin: 1.5em 0;
}
.prose figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.prose blockquote {
  margin: 1.25em 0;
  padding: 0.25em 0 0.25em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.25em 0;
}
.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.65rem;
  text-align: left;
}
.prose th {
  background: #eef2f7;
}

/* Code — critical for this blog */
.prose code,
.prose kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: #e8eef6;
  padding: 0.12em 0.35em;
  border-radius: 4px;
}
.prose pre,
.prose pre.wp-block-syntaxhighlighter-code,
.prose pre.brush\:sql,
.prose .wp-block-code {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--pre-border);
  margin: 1.25em 0;
  white-space: pre;
  tab-size: 2;
}
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  white-space: inherit;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p {
  margin: 0 0 0.5rem;
}
.site-footer a {
  color: var(--link);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-note {
  font-size: 0.85rem;
  opacity: 0.85;
}
