:root {
  color-scheme: light dark;
  --bg: #05070f;
  --bg-accent: #10142a;
  --gradient: radial-gradient(circle at top left, rgba(111, 165, 255, 0.25), transparent 55%),
              radial-gradient(circle at 20% 80%, rgba(94, 248, 255, 0.2), transparent 50%),
              linear-gradient(135deg, rgba(8, 16, 35, 0.9), rgba(5, 8, 20, 0.95));
  --text-primary: rgba(244, 247, 255, 0.96);
  --text-muted: rgba(221, 232, 255, 0.82);
  --accent: #6ff7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--gradient);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

body.page {
  align-items: flex-start;
}

.shell {
  max-width: 760px;
  width: 100%;
  background: rgba(9, 15, 32, 0.7);
  border: 1px solid rgba(111, 247, 255, 0.12);
  border-radius: 18px;
  padding: 56px clamp(24px, 6vw, 64px);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}

body.page .shell {
  max-width: 1200px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: 44px;
  color: var(--text-muted);
  text-decoration: none;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent), rgba(111, 247, 255, 0.15));
  box-shadow: 0 0 22px rgba(111, 247, 255, 0.7);
}

h1 {
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  line-height: 1.05;
  margin: 0 0 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 28px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.65;
  color: var(--text-muted);
}

.links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  margin-top: 48px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.links a:hover,
.links a:focus-visible {
  color: rgba(244, 247, 255, 0.9);
  outline: none;
}

.links-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.links-label {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.icon-link {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b1020;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: #0b1020;
  transition: transform 0.2s ease;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  color: #0b1020;
}

.icon-link:hover svg,
.icon-link:focus-visible svg {
  transform: scale(1.02);
}

.blog-hero h1 {
  margin-bottom: 16px;
}

.blog-hero p {
  max-width: 520px;
  color: rgba(244, 247, 255, 0.9);
}

.blog-list {
  display: grid;
  gap: 22px;
  margin-top: 40px;
}

.blog-card {
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid rgba(111, 247, 255, 0.12);
  background: rgba(8, 14, 30, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-card h2 {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.blog-card a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-card:hover,
.blog-card:focus-within {
  border-color: rgba(111, 247, 255, 0.45);
  transform: translateY(-1px);
}

.blog-card a:hover,
.blog-card a:focus-visible {
  text-decoration: underline;
}

.blog-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(244, 247, 255, 0.88);
}

.post {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: start;
}

.post {
  width: 100%;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
  align-items: start;
}

.post {
  width: 100%;
}

.post h1 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.post .post-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0;
}

.post header {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(111, 247, 255, 0.18);
}


.post-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-content > :first-child {
  margin-top: 0;
}

.post-reading-time {
  margin: 6px 0 20px;
}

.post-toc {
  position: sticky;
  top: 32px;
  padding-left: 24px;
  border-left: 1px solid rgba(111, 247, 255, 0.12);
}

.post-toc__title {
  margin: 0 0 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.post-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-toc__item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
}

.post-toc__item a:hover,
.post-toc__item a:focus-visible {
  color: var(--text-primary);
}

.post h2,
.post h3,
.post h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.post h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
}

.post h3 {
  font-size: clamp(1.35rem, 2.1vw, 1.8rem);
}

.post h4 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
}

.post p,
.post li {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.post p {
  margin: 0 0 20px;
}

.post header + p {
  margin-top: 20px;
}

.post ul,
.post ol {
  margin: 0 0 24px 20px;
  padding: 0;
}

.post blockquote {
  margin: 24px 0;
  padding: 12px 20px;
  border-left: 2px solid rgba(111, 247, 255, 0.4);
  background: rgba(8, 16, 35, 0.5);
  color: var(--text-primary);
}

.post hr {
  border: none;
  height: 1px;
  background: rgba(111, 247, 255, 0.2);
  margin: 16px 0;
}

.post a {
  color: var(--accent);
  text-decoration: none;
}

.post a:hover,
.post a:focus-visible {
  text-decoration: underline;
}

.post code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
  color: rgba(244, 247, 255, 0.9);
}

.post pre {
  padding: 16px 18px;
  background: rgba(8, 16, 35, 0.8);
  border-radius: 12px;
  overflow-x: auto;
}

@media (max-width: 600px) {
  body {
    padding: 48px 18px;
  }

  .shell {
    padding: 48px 24px;
  }

  body.page .shell {
    padding: 40px 20px;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post {
    max-width: 100%;
  }

  .post-toc {
    position: static;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(111, 247, 255, 0.12);
    padding-top: 24px;
  }

  .links {
    flex-direction: column;
    align-items: stretch;
  }

  .links a {
    justify-content: flex-start;
  }
}
