/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

/**
 * atom-dark theme for `prism.js`
 * Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
 * @author Joe Gibson (@gibsjose)
 */
code[class*=language-],
pre[class*=language-] {
  color: #c5c8c6;
  text-shadow: 0 1px rgba(0, 0, 0, 0.3);
  font-family: Inconsolata, Monaco, Consolas, "Courier New", Courier, monospace;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*=language-] {
  padding: 1em;
  margin: 0.5em 0;
  overflow: auto;
  border-radius: 0.3em;
}

:not(pre) > code[class*=language-],
pre[class*=language-] {
  background: #1d1f21;
}

/* Inline code */
:not(pre) > code[class*=language-] {
  padding: 0.1em;
  border-radius: 0.3em;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #7C7C7C;
}

.token.punctuation {
  color: #c5c8c6;
}

.namespace {
  opacity: 0.7;
}

.token.property,
.token.keyword,
.token.tag {
  color: #96CBFE;
}

.token.class-name {
  color: #FFFFB6;
  text-decoration: underline;
}

.token.boolean,
.token.constant {
  color: #99CC99;
}

.token.symbol,
.token.deleted {
  color: #f92672;
}

.token.number {
  color: #FF73FD;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #A8FF60;
}

.token.variable {
  color: #C6C5FE;
}

.token.operator {
  color: #EDEDED;
}

.token.entity {
  color: #FFFFB6;
  cursor: help;
}

.token.url {
  color: #96CBFE;
}

.language-css .token.string,
.style .token.string {
  color: #87C38A;
}

.token.atrule,
.token.attr-value {
  color: #F9EE98;
}

.token.function {
  color: #DAD085;
}

.token.regex {
  color: #E9C062;
}

.token.important {
  color: #fd971f;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

:root {
  --font-sans: Inter, Roboto, system-ui, -apple-system, Segoe UI, Helvetica Neue, Arial;
  --font-mono: Fira Code, JetBrains Mono, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-strong: 700;
  --lh-tight: 1.25;
  --lh-default: 1.6;
  --lh-relaxed: 1.8;
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --content-max-width: 68ch;
  --container-padding: 24px;
  --bg: #ffffff;
  --surface: #fbfbfb;
  --text: #111214;
  --muted: #6b7280;
  --heading: #0f1724;
  --link: #1e6fff;
  --link-hover: #1547c8;
  --accent: #0ea5e9;
  --success: #16a34a;
  --danger: #ef4444;
  --code-bg: #f3f4f6;
  --code-border: #e6edf3;
  --hr: #e6e9ee;
  --dm-bg: #0b1220;
  --dm-surface: #071026;
  --dm-text: #e6eef6;
  --dm-muted: #9aa6b2;
  --dm-heading: #ffffff;
  --dm-link: #7cc3ff;
  --dm-code-bg: #071125;
  --dm-code-border: #102434;
  --dm-hr: #11202b;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, 0.08);
  --focus-ring: 3px;
}

:root[data-theme=dark],
body.dark {
  --bg: var(--dm-bg);
  --surface: var(--dm-surface);
  --text: var(--dm-text);
  --muted: var(--dm-muted);
  --heading: var(--dm-heading);
  --link: var(--dm-link);
  --code-bg: var(--dm-code-bg);
  --code-border: var(--dm-code-border);
  --hr: var(--dm-hr);
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
}

body {
  line-height: var(--lh-default);
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

.site-container {
  max-width: calc(var(--content-max-width) + 2 * var(--container-padding));
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.article {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-lg) 0;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-md) 0;
  color: var(--heading);
  line-height: 1.2;
  font-weight: var(--fw-strong);
}

h1 {
  font-size: var(--fs-2xl);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-base);
}

p {
  margin: 0 0 var(--space-md) 0;
  font-size: var(--fs-lg);
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 120ms ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
  outline: none;
}

ul, ol {
  margin: 0 0 var(--space-md) 0;
  padding-left: calc(var(--space-lg) + 8px);
}

li {
  margin-bottom: var(--space-xs);
}

hr {
  border: none;
  height: 1px;
  background: var(--hr);
  margin: var(--space-2xl) 0;
}

blockquote {
  margin: 0 0 var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.04), transparent);
  border-left: 4px solid rgba(14, 165, 233, 0.12);
  color: var(--muted);
  border-radius: var(--radius-sm);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-lg) 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  padding: 0.08em 0.36em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  color: inherit;
  white-space: nowrap;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.5;
  padding: var(--space-md);
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow: auto;
  box-shadow: var(--shadow-1);
  margin: 0 0 var(--space-lg) 0;
}
pre code {
  background: transparent;
  padding: 0;
  border: none;
  white-space: pre;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--link);
  color: white;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.btn:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--link);
  border: 1px solid rgba(30, 111, 255, 0.12);
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: var(--fs-xs);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--link);
  border: 1px solid rgba(14, 165, 233, 0.12);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(16, 24, 40, 0.03);
}

.kicker {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--hr);
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-logo {
  font-size: var(--fs-xl);
  font-weight: var(--fw-strong);
  color: var(--heading);
  text-decoration: none;
  transition: color 120ms ease;
}
.site-logo:hover {
  color: var(--link);
}

.site-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--hr);
  text-align: center;
}

.footer-text {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}

.site-description {
  font-size: var(--fs-lg);
  color: var(--muted);
  margin-bottom: var(--space-xl);
  font-style: italic;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-list .post-item {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--hr);
}
.post-list .post-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.post-list .post-link {
  font-size: var(--fs-xl);
  font-weight: var(--fw-strong);
  color: var(--heading);
  text-decoration: none;
}
.post-list .post-link:hover {
  color: var(--link);
}
.post-list .post-meta {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--space-xs);
}

.post {
  margin-bottom: var(--space-2xl);
}

.post-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--hr);
}

.post-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-strong);
  color: var(--heading);
  margin: 0 0 var(--space-md) 0;
  line-height: 1.2;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.post-date {
  display: inline-block;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-tag {
  margin: 0;
  padding: 0;
}

:focus {
  outline: none;
  box-shadow: 0 0 0 var(--focus-ring) rgba(30, 111, 255, 0.14);
  border-radius: 6px;
}