@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500&family=IBM+Plex+Mono:wght@400&display=swap");

:root {
  color-scheme: dark;
  --page-bg: #07090f;
  --page-grid: rgba(255, 255, 255, 0.045);
  --panel-bg: rgba(10, 13, 22, 0.94);
  --text: #f2f4f8;
  --muted: #9aa5bf;
  --accent: #9dd6ff;
  --accent-strong: #ffd29f;
  --code-bg: rgba(20, 25, 40, 0.95);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page-bg);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 32px,
    var(--page-grid) 32px,
    var(--page-grid) 34px
  );
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  display: flex;
  justify-content: center;
  padding: 3.5rem 1.5rem 4rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

body > * {
  width: 100%;
}

main,
article,
.markdown-body {
  width: min(840px, 100%);
  margin: 0 auto;
  background: var(--panel-bg);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 18px;
}

h1,
h2,
h3,
h4 {
  color: var(--accent-strong);
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-top: 2.3rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  color: var(--accent);
  border-bottom: 2px solid rgba(157, 214, 255, 0.4);
  padding-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
}

p,
ul,
ol,
blockquote {
  margin-top: 1.2rem;
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  padding-bottom: 1px;
  transition: color 150ms ease;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
  transition: opacity 120ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-strong);
}

a:hover::after,
a:focus-visible::after {
  opacity: 1;
}

blockquote {
  border-left: 3px solid rgba(157, 214, 255, 0.6);
  padding-left: 1.25rem;
  color: var(--muted);
  font-style: italic;
}

hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

code {
  display: inline-block;
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.95em;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    Menlo, monospace;
}

pre code {
  width: 100%;
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-embed {
  margin: 2rem 0;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
