@font-face {
  font-family: 'Post Grotesk';
  src: url('/fonts/PostGrotesk-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Post Grotesk';
  src: url('/fonts/PostGrotesk-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Post Grotesk';
  src: url('/fonts/PostGrotesk-BookItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Post Grotesk';
  src: url('/fonts/PostGrotesk-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Post Grotesk';
  src: url('/fonts/PostGrotesk-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --bg-elevated: #111118;
  --text: #999;
  --text-bright: #f0f0f0;
  --text-dim: #7b7b7b;
  --accent: #c8ff00;
  --rule: #1a1a22;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Post Grotesk', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

/* nav */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.blog-nav-logo { color: var(--text-bright); font-weight: 500; }
.blog-nav-links { display: flex; gap: 32px; }
.blog-nav-link { color: var(--text); transition: color 0.3s; }
.blog-nav-link:hover { color: var(--text-bright); }

/* layout */
.blog-wrap {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 48px 120px;
}
.blog-post-wrap { padding-top: 64px; }

/* index header */
.blog-header { margin-bottom: 96px; }
.blog-eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}
.blog-h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 24px;
}
.blog-sub {
  font-size: 18px;
  color: var(--text);
  max-width: 540px;
}

/* index list */
.blog-list { list-style: none; }
.blog-list-item {
  border-top: 1px solid var(--rule);
}
.blog-list-item:last-child { border-bottom: 1px solid var(--rule); }
.blog-list-link {
  display: block;
  padding: 40px 0;
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-list-link:hover { padding-left: 16px; }
.blog-list-link:hover .blog-list-title { color: var(--accent); }
.blog-list-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.blog-list-meta time { text-transform: uppercase; }
.blog-tag {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text);
}
.blog-list-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text-bright);
  transition: color 0.3s;
}

/* back link */
.blog-back {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 64px;
  transition: color 0.3s;
}
.blog-back:hover { color: var(--accent); }

/* post */
.blog-post-header { margin-bottom: 64px; }
.blog-post-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-top: 16px;
}
.blog-post-body {
  font-size: 18px;
  line-height: 1.75;
  color: #b5b5b5;
}
.blog-post-body > * + * { margin-top: 1.4em; }
.blog-post-body h1,
.blog-post-body h2,
.blog-post-body h3 {
  color: var(--text-bright);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 2.2em;
  margin-bottom: 0.4em;
  line-height: 1.2;
}
.blog-post-body h1 { font-size: 32px; }
.blog-post-body h2 { font-size: 26px; }
.blog-post-body h3 { font-size: 22px; }
.blog-post-body p { color: #b5b5b5; }
.blog-post-body strong { color: var(--text-bright); font-weight: 500; }
.blog-post-body em { font-style: italic; }
.blog-post-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 255, 0, 0.3);
  transition: border-color 0.2s;
}
.blog-post-body a:hover { border-bottom-color: var(--accent); }
.blog-post-body ul,
.blog-post-body ol { padding-left: 1.4em; color: #b5b5b5; }
.blog-post-body li + li { margin-top: 0.4em; }
.blog-post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  color: var(--text);
  font-style: italic;
}
.blog-post-body blockquote p { color: var(--text); }

/* images */
.blog-post-body img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid var(--rule);
  margin: 0.6em 0;
  cursor: zoom-in;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-post-body img.expanded {
  max-height: 800px;
  object-fit: contain;
  cursor: zoom-out;
}
.blog-post-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* inline code */
.blog-post-body code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-bright);
}

/* code blocks */
.blog-post-body pre {
  background: #0d0d14;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.blog-post-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: #d4d4d4;
}

/* highlight.js — custom dark theme matching the site */
.hljs { color: #d4d4d4; background: transparent; }
.hljs-comment, .hljs-quote { color: #5a5a6a; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type { color: #c8ff00; }
.hljs-string, .hljs-attr, .hljs-attribute, .hljs-meta-string { color: #b5e87f; }
.hljs-number, .hljs-literal, .hljs-symbol { color: #e6c07b; }
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class { color: #f0f0f0; font-weight: 500; }
.hljs-variable, .hljs-template-variable, .hljs-params { color: #d4d4d4; }
.hljs-function .hljs-title { color: #f0f0f0; }
.hljs-meta, .hljs-tag { color: #888; }
.hljs-deletion { color: #ff6b6b; }
.hljs-addition { color: #b5e87f; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

.blog-post-footer { margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--rule); }

/* footer */
.blog-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-align: center;
}

/* mobile */
@media (max-width: 768px) {
  .blog-nav { padding: 20px 24px; }
  .blog-nav-links { gap: 20px; }
  .blog-wrap { padding: 64px 24px 80px; }
  .blog-post-wrap { padding-top: 40px; }
  .blog-header { margin-bottom: 64px; }
  .blog-back { margin-bottom: 40px; }
  .blog-post-header { margin-bottom: 40px; }
  .blog-list-link { padding: 32px 0; }
  .blog-list-link:hover { padding-left: 0; }
  .blog-post-body { font-size: 16px; }
  .blog-post-body pre { padding: 16px; font-size: 13px; }
  .blog-footer { padding: 24px; }
}
