:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #0b0d10;
  color: #e7eaee;
  line-height: 1.7;
  font-size: 17px;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 80px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 28px; margin-bottom: 28px;
  border-bottom: 1px solid #1f2630;
}
header.site a.brand { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 10px; }
header.site .logo {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, #25F4EE, #7A5CFF, #FE2C55);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
}
header.site .name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
header.site nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
header.site nav a { color: #9aa3ad; text-decoration: none; }
header.site nav a:hover { color: #e7eaee; }

.lang {
  display: flex; gap: 4px; background: #12161b; border: 1px solid #1f2630;
  border-radius: 999px; padding: 3px;
}
.lang button {
  background: transparent; border: 0; color: #9aa3ad;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600;
}
.lang button.active { background: #2b6cff; color: #fff; }

h1 { font-size: 36px; margin: 0 0 16px; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -0.01em; line-height: 1.2; }
h3 { font-size: 18px; margin: 32px 0 8px; }
p { margin: 14px 0; color: #c9d0d8; }
a { color: #7cc4ff; }
a:hover { color: #9ad1ff; }
strong, b { color: #e7eaee; }
code {
  background: #171c22; padding: 2px 7px; border-radius: 5px;
  font-size: 14px; color: #e2e8f0;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
pre {
  background: #0e1216; border: 1px solid #1f2630;
  padding: 16px; border-radius: 10px; overflow-x: auto;
  font-size: 13px; line-height: 1.5;
}
pre code { background: transparent; padding: 0; }
blockquote {
  border-left: 3px solid #2b6cff; padding: 8px 20px; margin: 20px 0;
  color: #b9c1cb; background: #10141a; border-radius: 0 10px 10px 0;
}
ul, ol { padding-left: 22px; }
li { margin: 6px 0; color: #c9d0d8; }

table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 14px; background: #0e1216;
  border: 1px solid #1f2630; border-radius: 10px; overflow: hidden;
}
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #1f2630; }
th { background: #12161b; color: #9aa3ad; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: 0; }
td strong { color: #e7eaee; }

.meta { color: #6b7380; font-size: 13px; margin: 0 0 28px; }
.tag {
  display: inline-block; background: #12161b; border: 1px solid #1f2630;
  color: #9aa3ad; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; margin-right: 6px; text-transform: lowercase;
}

/* Post listing */
.posts { display: flex; flex-direction: column; gap: 2px; }
.post-card {
  display: block; text-decoration: none; color: inherit;
  background: #12161b; border: 1px solid #1f2630;
  border-radius: 14px; padding: 22px 24px;
  transition: border-color .15s, transform .15s;
}
.post-card:hover { border-color: #2a3441; transform: translateY(-1px); }
.post-card .date { color: #6b7380; font-size: 12px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.post-card h2 { font-size: 20px; margin: 0 0 8px; color: #e7eaee; }
.post-card p { margin: 0; color: #9aa3ad; font-size: 14px; line-height: 1.55; }
.posts-grid { display: flex; flex-direction: column; gap: 14px; }

.hero {
  padding: 20px 0 8px;
}
.hero-tagline { color: #9aa3ad; font-size: 17px; max-width: 620px; margin: 8px 0 0; }

.back {
  display: inline-block; color: #7cc4ff; text-decoration: none;
  font-size: 14px; margin-bottom: 20px;
}
.back:hover { color: #9ad1ff; }

footer.site {
  margin-top: 80px; padding-top: 28px; border-top: 1px solid #1f2630;
  color: #6b7380; font-size: 13px; text-align: center;
}

/* i18n visibility */
[data-lang] [data-uk], [data-lang] [data-en] { display: none; }
[data-lang="uk"] [data-uk] { display: revert; }
[data-lang="en"] [data-en] { display: revert; }
