:root {
  color-scheme: dark;
  --bg: #0e0f12;
  --panel: #16181d;
  --panel-2: #121419;
  --line: #2a2d33;
  --text: #f2f0ea;
  --muted: #9aa0a8;
  --orange: #ff6a00;
  --green: #30b168;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }

.blog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(42, 45, 51, .8);
  background: rgba(14, 15, 18, .94);
  backdrop-filter: blur(14px);
}
.blog-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  height: 70px;
  margin: auto;
  padding: 0 24px;
}
.blog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 14px/1 Inter, sans-serif;
  letter-spacing: .12em;
}
.blog-brand img { width: 30px; height: 30px; object-fit: contain; }
.blog-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font: 500 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.blog-header nav a:hover,
.blog-header nav a.active { color: var(--text); }
.blog-header nav .blog-register {
  border: 1px solid var(--orange);
  padding: 10px 14px;
  color: var(--text);
}

h1, h2, h3 {
  font-family: Unbounded, Inter, system-ui, sans-serif;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.blog-kicker,
.blog-meta,
.blog-back,
.blog-read,
.blog-filter {
  font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.blog-index { max-width: none; margin: 0; padding: 0 0 112px; }
.blog-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 350px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 70px max(24px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid var(--line);
}
.blog-intro::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: url('/blog-assets/blog-header-reference.webp') center 43% / cover no-repeat;
  content: '';
  filter: saturate(.72) contrast(1.04);
}
.blog-intro::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 15, 18, .98) 0%, rgba(14, 15, 18, .8) 48%, rgba(14, 15, 18, .46) 100%),
    linear-gradient(0deg, rgba(14, 15, 18, .9), rgba(14, 15, 18, .28));
  content: '';
}
.blog-kicker { margin: 0; color: var(--orange); }
.blog-intro h1 {
  max-width: 820px;
  margin: 20px 0 18px;
  font-size: clamp(42px, 5.5vw, 68px);
}
.blog-intro > p:not(.blog-kicker) {
  max-width: 680px;
  margin: 0;
  color: #c9ccd1;
  font-size: 18px;
}
.blog-tabs { display: none !important; }

.blog-filters {
  display: flex;
  max-width: 1080px;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px auto;
  padding: 0 24px;
}
.blog-filter {
  min-height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 15px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.blog-filter:hover { border-color: #565b65; color: var(--text); }
.blog-filter.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: #0e0f12;
}

.blog-list {
  display: grid;
  max-width: 1080px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0 auto;
  padding: 0 24px;
}
.blog-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(22, 24, 29, .98), rgba(17, 19, 23, .98));
  transition: border-color .2s ease, transform .2s ease;
}
.blog-card:hover { border-color: #4d515a; transform: translateY(-2px); }
.blog-card[hidden] { display: none !important; }
.blog-card.is-featured {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 340px;
}
.blog-card > .blog-hero {
  display: block;
  width: 100%;
  height: 230px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
}
.blog-card.is-featured > .blog-hero {
  height: 100%;
  min-height: 340px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}
.blog-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}
.blog-card.is-featured .blog-card-copy { justify-content: center; padding: 42px; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); }
.blog-meta span { color: var(--orange); }
.blog-card h2 { margin: 13px 0 12px; font-size: clamp(21px, 2.5vw, 31px); }
.blog-card.is-featured h2 { font-size: clamp(28px, 3.2vw, 40px); }
.blog-card h2 a:hover { color: var(--orange); }
.blog-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 20px;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.blog-read { margin-top: auto; color: var(--text); }
.blog-read:hover { color: var(--orange); }

.blog-article {
  max-width: 840px;
  margin: auto;
  padding: 74px 24px 112px;
}
.blog-back { display: inline-block; margin-bottom: 46px; color: var(--muted); }
.blog-back:hover { color: var(--orange); }
.blog-article h1 { margin: 18px 0 40px; font-size: clamp(38px, 6vw, 66px); }
.blog-content { color: #c9ccd1; font-size: 18px; }
.blog-content > .blog-hero {
  display: block;
  width: 100%;
  max-height: 540px;
  aspect-ratio: 16 / 9;
  margin: 0 0 46px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.blog-content h1 { font-size: 34px; }
.blog-content h2 { margin: 48px 0 16px; color: var(--text); font-size: 28px; }
.blog-content h3 { margin: 36px 0 14px; color: var(--text); font-size: 21px; }
.blog-content p,
.blog-content ul,
.blog-content ol { margin: 0 0 22px; }
.blog-content li { margin: 8px 0; }
.blog-content strong { color: var(--text); }
.blog-content a { border-bottom: 1px solid var(--orange); color: var(--text); }
.blog-content blockquote {
  margin: 38px 0;
  border-left: 3px solid var(--orange);
  background: var(--panel);
  padding: 18px 24px;
  color: var(--text);
}
.blog-content img { max-width: 100%; height: auto; }
.blog-content iframe { max-width: 100%; border: 0; }
.blog-cta {
  margin-top: 58px;
  border: 1px solid var(--orange);
  background: linear-gradient(135deg, rgba(255, 106, 0, .12), transparent);
  padding: 30px;
}
.blog-cta p { margin: 0 0 17px; color: #c9ccd1; }
.blog-cta a { color: var(--orange); font-family: ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.blog-back-bottom { margin: 40px 0 0; }
.blog-footer {
  display: flex;
  max-width: 1180px;
  justify-content: space-between;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 30px 24px;
  color: var(--muted);
  font: 500 11px/1.5 ui-monospace, monospace;
}

@media (max-width: 760px) {
  .blog-header-inner { height: 62px; padding: 0 16px; }
  .blog-header nav > a:not(.blog-register) { display: none; }
  .blog-header nav { gap: 0; }
  .blog-header nav .blog-register { padding: 9px 10px; }
  .blog-intro {
    min-height: 330px;
    padding: 58px 18px;
  }
  .blog-intro::after {
    background: linear-gradient(90deg, rgba(14, 15, 18, .96), rgba(14, 15, 18, .66)), linear-gradient(0deg, rgba(14, 15, 18, .92), rgba(14, 15, 18, .38));
  }
  .blog-intro h1 { font-size: 42px; }
  .blog-intro > p:not(.blog-kicker) { font-size: 16px; }
  .blog-filters { margin: 22px auto; padding: 0 18px; }
  .blog-list { grid-template-columns: 1fr; gap: 16px; padding: 0 18px; }
  .blog-card.is-featured { display: flex; grid-column: auto; min-height: 0; }
  .blog-card > .blog-hero,
  .blog-card.is-featured > .blog-hero {
    height: 220px;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .blog-card-copy,
  .blog-card.is-featured .blog-card-copy { padding: 24px; }
  .blog-card.is-featured h2 { font-size: 28px; }
  .blog-article { padding: 54px 18px 84px; }
  .blog-article h1 { font-size: 38px; }
  .blog-content { font-size: 17px; }
  .blog-content h2 { font-size: 24px; }
  .blog-footer { flex-direction: column; gap: 8px; padding: 25px 18px; }
}
