:root {
  color-scheme: dark;
  font: 16px/1.6 Arial, Helvetica, sans-serif;
  color: #fafafa;
  background: #0a0a0a;
  --muted: #ababab;
  --border: #262626;
  --accent: #2990ff;
  --surface: #171717;
  --radius: .5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  z-index: 1;
  top: 0;
  min-height: 4rem;
  box-sizing: border-box;
  padding: .45rem clamp(1rem, 3vw, 1.5rem);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgb(0 0 0 / 85%);
  backdrop-filter: blur(8px);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .875rem;
}

.site-nav a { color: var(--muted); }

.wordmark {
  display: inline-flex;
  gap: .3rem;
  align-items: center;
  color: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}

.wordmark:hover { text-decoration: none; }

.language-switcher {
  display: flex;
  align-items: center;
  gap: .125rem;
  margin-inline-start: auto;
  padding: .125rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #101010;
  white-space: nowrap;
  font-size: .75rem;
  font-weight: 500;
}

.language-switcher > * {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 999px;
}

.language-switcher [aria-current] {
  background: #262626;
  color: #ededed;
  font-weight: 600;
  text-decoration: none;
}

.language-switcher a {
  color: var(--muted);
  text-decoration: none;
}

.language-switcher a:hover,
.language-switcher a:focus-visible {
  background: var(--surface);
  color: #fafafa;
  text-decoration: none;
}

.wordmark-symbol {
  font-family: system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 25rem) {
  .site-header { gap: .375rem .75rem; }
  .wordmark-symbol { font-size: 1.75rem; }
  .wordmark { font-size: 1rem; }
}

.site-footer {
  margin-top: auto;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
}

main {
  width: min(100% - 2 * clamp(1rem, 5vw, 2rem), 80ch);
  padding-block: clamp(2rem, 6vw, 4rem) 4rem;
  margin-inline: auto;
  overflow-wrap: anywhere;
}

h1, h2, h3 { line-height: 1.18; text-wrap: balance; }

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 2.5rem);
  letter-spacing: -.025em;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
a { color: var(--accent); text-decoration: none; }
a:hover, .site-nav a:hover { color: #fff; text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
time { color: var(--muted); }
img, video { max-width: 100%; height: auto; }
figure { margin-inline: 0; }
article > header { margin-bottom: 2rem; }
.article-content { color: #d4d4d4; }
.article-content :is(h2, h3, h4, strong) { color: #fafafa; }
.article-content h2 { margin-top: 2rem; }
.article-content a { text-decoration: underline; text-underline-offset: .18em; }
.article-content > p > svg {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
  margin-inline: auto;
  filter: invert(99%) hue-rotate(180deg);
}

blockquote {
  margin-inline: 0;
  padding-inline-start: 1rem;
  border-inline-start: .25rem solid var(--border);
}

table { border-collapse: collapse; }
th, td { padding: .35rem .65rem; border: 1px solid var(--border); }

code { font: .875em/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
:not(pre) > code {
  padding: .1rem .25rem;
  border: 1px solid var(--border);
  border-radius: .25rem;
  background: var(--surface);
}

.article-content pre {
  overflow-x: auto;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #1a1b26;
  overflow-wrap: normal;
  tab-size: 2;
}

.posts { padding: 0; margin: 0; list-style: none; }
.posts li { padding-block: 1.8rem 1.25rem; border-bottom: 1px solid var(--border); }
.posts li:last-child { border-bottom: 0; }

.posts h2 {
  margin: 0 0 .85rem;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  letter-spacing: -.02em;
}

.posts h2 a { color: inherit; }
.posts p { margin: .75rem 0; color: #ededed; font-size: 1.125rem; }
.read-more span { padding-inline-start: .125rem; }

.post-navigation { display: grid; gap: .75rem; margin-top: 2rem; }
.post-navigation a {
  display: grid;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
}
.post-navigation a:hover { border-color: var(--muted); }
.post-navigation span { color: var(--muted); font-size: .875rem; }

.contact-form {
  display: grid;
  gap: 1.25rem;
  max-width: 34rem;
  margin-block-start: 1.75rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #101010;
}

.contact-field { display: grid; gap: .45rem; min-width: 0; }
.contact-field label { color: #ededed; font-size: .875rem; font-weight: 600; }

.contact-field :is(input, textarea) {
  box-sizing: border-box;
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #3b3b3b;
  border-radius: var(--radius);
  color: #fafafa;
  background: #0a0a0a;
  font: inherit;
}

.contact-field textarea { min-height: 9rem; resize: vertical; }

.contact-form button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 1rem;
  border: 1px solid #e8e8e8;
  border-radius: var(--radius);
  background: #ededed;
  color: #111;
  font: 600 .9rem/1.6 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.contact-form button:hover { background: #fff; }
.contact-form :is(input, textarea, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form button:disabled { opacity: .6; cursor: default; }
.contact-status { margin: 0; color: #d5ded8; font-size: .9rem; }
.contact-status:empty { display: none; }
