*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0e1a;
  --bg2: #111326;
  --bg3: #161830;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.11);
  --muted: #3e4270;
  --sub: #6b71a8;
  --body: #a0a6d6;
  --head: #e8eaff;
  --white: #fff;
  --acc: #5865f2;
  --acc2: #818cf8;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: rgba(12, 14, 26, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Unbounded", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--white);
  letter-spacing: -0.5px;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo-mark {
  width: 42px;
  height: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 0;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--sub);
  padding: 7px 14px;
  transition: color .15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--head);
}

.nav-dl {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--acc);
  border-radius: 8px;
  padding: 8px 20px;
  margin-left: 12px;
  transition: background .15s;
  font-family: "Inter", sans-serif;
}

.nav-dl:hover { background: #4752c4; }

.post-hero {
  padding-top: 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(88, 101, 242, .1) 0%, transparent 65%),
    var(--bg);
}

.post-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px 40px 0;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 36px;
  transition: color .15s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.post-back:hover { color: var(--sub); }
.post-back svg { width: 14px; height: 14px; flex-shrink: 0; }

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.post-tag {
  font-family: "Unbounded", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--acc2);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.post-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

.post-date,
.post-readtime {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.post-title {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 900;
  line-height: .97;
  letter-spacing: -2.5px;
  color: var(--white);
  margin-bottom: 24px;
}

.post-lede {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--sub);
  max-width: 640px;
  margin-bottom: 40px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.author-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Unbounded", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--head);
}

.author-role {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.post-cover {
  margin-top: 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.post-cover img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
  filter: brightness(.85) saturate(.9);
}

.post-cover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.cover-placeholder {
  height: 400px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
}

.cover-placeholder-inner { text-align: center; }

.cover-placeholder-inner p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.post-body-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 40px 100px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

article { min-width: 0; }

article h2 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--head);
  line-height: 1.15;
  margin: 44px 0 16px;
}

article h3 {
  font-family: "Unbounded", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--head);
  margin: 32px 0 12px;
}

article p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--body);
  margin-bottom: 22px;
}

article strong { color: var(--head); font-weight: 600; }

article a {
  color: var(--acc2);
  border-bottom: 1px solid rgba(129, 140, 248, .25);
  transition: border-color .15s, color .15s;
}

article a:hover {
  color: var(--white);
  border-color: var(--acc2);
}

article pre {
  background: var(--bg2);
  border: 1px solid var(--line2);
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}

article pre code {
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #a5b4fc;
  line-height: 1.7;
  background: none;
  padding: 0;
}

article code {
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  color: #a5b4fc;
  background: rgba(129, 140, 248, .08);
  padding: 2px 7px;
}

article blockquote {
  border-left: 2px solid var(--acc2);
  padding: 4px 0 4px 24px;
  margin: 28px 0;
}

article blockquote p {
  font-size: 16px;
  font-style: italic;
  color: var(--sub);
  margin: 0;
}

article hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

article figure { margin: 32px 0; }

article figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
}

article figure figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

article ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
}

article li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--body);
}

article li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc2);
  opacity: .75;
}

.post-feature-list {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin: 30px 0 42px;
}

.post-feature-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .018);
}

.post-feature-item span {
  font-family: "Unbounded", sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--acc2);
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.post-feature-item p {
  margin: 0;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin: 36px 0 46px;
}

.screenshot-grid figure {
  margin: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
}

.screenshot-grid figure img {
  border: 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  filter: brightness(.82) saturate(.9);
}

.screenshot-grid figure figcaption {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--sub);
}

.sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-block {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.sb-label {
  font-family: "Unbounded", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.share-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--sub);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  font-family: "Inter", sans-serif;
  width: 100%;
  text-align: left;
}

.share-btn:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--head);
  border-color: rgba(255, 255, 255, .16);
}

.share-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stack-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc2);
  flex-shrink: 0;
  opacity: .7;
}

.stack-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
}

.stack-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.related-card {
  display: block;
  border: 1px solid var(--line);
  padding: 20px;
  transition: border-color .15s, background .15s;
  background: var(--bg2);
}

.related-card:hover {
  border-color: var(--line2);
  background: var(--bg3);
}

.related-tag {
  font-family: "Unbounded", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--acc2);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.related-title {
  font-family: "Unbounded", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--head);
  line-height: 1.25;
  margin-bottom: 8px;
}

.related-meta {
  font-size: 11px;
  color: var(--muted);
}

.related-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Unbounded", sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: var(--acc2);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 16px;
}

.related-arrow svg {
  width: 12px;
  height: 12px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.foot-logo {
  font-family: "Unbounded", sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--sub);
  display: flex;
  align-items: center;
  gap: 9px;
}

.foot-logo img {
  width: 42px;
  height: auto;
  display: block;
}

.foot-links {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.foot-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 12px;
  transition: color .15s;
}

.foot-links a:hover { color: var(--body); }

.foot-copy {
  font-size: 12px;
  color: var(--muted);
}

.r {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.r.on {
  opacity: 1;
  transform: none;
}

.link-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 100px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--head);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}

.link-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.post-tail-note {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 900px) {
  nav { padding: 0 16px; }
  .nav-links { display: none; }
  .post-hero-inner { padding: 56px 20px 0; }
  .post-title { letter-spacing: -1.5px; }
  .post-body-wrap {
    grid-template-columns: 1fr;
    padding: 40px 20px 60px;
    gap: 48px;
  }
  .screenshot-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  footer { padding: 24px 20px; }
}
