:root {
  color-scheme: dark;
  --royal-blue: #0b3d91;
  --deep-blue: #071d49;
  --blue-light: #2f69d9;
  --blue-soft: #8bb7ff;
  --silver: #d8dde8;
  --silver-soft: #f3f6fb;
  --silver-muted: #aeb8c8;
  --ink: #f8fbff;
  --panel: rgba(7, 17, 31, 0.62);
  --line: rgba(216, 221, 232, 0.22);
  --shadow: 0 1.5rem 4rem rgba(3, 10, 26, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(47, 105, 217, 0.38), transparent 24rem),
    radial-gradient(circle at 84% 12%, rgba(216, 221, 232, 0.16), transparent 20rem),
    linear-gradient(135deg, var(--deep-blue), var(--royal-blue) 56%, #06122c);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(243, 246, 251, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 246, 251, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 70%);
}

a {
  color: inherit;
}

.site-header,
footer {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--silver-soft);
  background: linear-gradient(135deg, var(--silver-soft), var(--blue-light));
  box-shadow: 0 0 1.6rem rgba(139, 183, 255, 0.5);
}

nav a {
  color: var(--silver);
  font-size: 0.92rem;
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 4rem;
}

.hero {
  max-width: 56rem;
  padding: clamp(2rem, 6vw, 4.5rem) 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--silver-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: var(--silver-soft);
  font-size: clamp(3rem, 8vw, 6.75rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p:last-child {
  max-width: 43rem;
  margin-top: 1.35rem;
  color: var(--silver);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.post-card {
  min-height: 14rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.post-card:hover,
.post-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(243, 246, 251, 0.54);
  background: rgba(9, 28, 70, 0.76);
  outline: none;
}

.post-card h3 {
  margin-top: 0.75rem;
  color: var(--silver-soft);
  font-size: 1.3rem;
  line-height: 1.2;
}

.post-card p {
  margin-top: 0.75rem;
  color: var(--silver);
  line-height: 1.55;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--silver-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(12rem, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.article {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.7);
  box-shadow: var(--shadow);
}

.article h1 {
  font-size: clamp(2.4rem, 6vw, 4.7rem);
}

.article .summary {
  margin-top: 1rem;
  color: var(--silver);
  font-size: 1.15rem;
  line-height: 1.65;
}

.article-content {
  margin-top: 2rem;
  color: var(--silver);
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-content h2 {
  margin: 2rem 0 0.75rem;
  color: var(--silver-soft);
  font-size: 1.55rem;
  line-height: 1.2;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin: 1rem 0 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
}

.article-content li + li {
  margin-top: 0.45rem;
}

.article-content blockquote {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--blue-soft);
  background: rgba(216, 221, 232, 0.08);
  color: var(--silver-soft);
}

.article-content code {
  padding: 0.1rem 0.28rem;
  border: 1px solid rgba(216, 221, 232, 0.18);
  border-radius: 4px;
  background: rgba(3, 10, 26, 0.5);
}

.side-note {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.52);
}

.side-note a {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--silver-soft);
  font-weight: 750;
  text-decoration-color: rgba(243, 246, 251, 0.35);
  text-underline-offset: 0.25rem;
}

footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  color: var(--silver-muted);
  font-size: 0.9rem;
}

@media (max-width: 48rem) {
  .site-header,
  footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-shell {
    grid-template-columns: 1fr;
  }

  .side-note {
    position: static;
  }
}
