:root {
  --bg: #0b0d17;
  --bg-soft: #171a2d;
  --card: #1d2138;
  --text: #eef1ff;
  --muted: #a7afd7;
  --accent: #8a5cff;
  --accent-2: #00d0ff;
  --glow: #ff3ea5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, #1a1740 0%, transparent 45%),
    radial-gradient(circle at 90% 0%, #1c0d34 0%, transparent 40%),
    var(--bg);
  line-height: 1.5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6vw;
  background: rgba(11, 13, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.4px;
}

.menu {
  display: flex;
  gap: 18px;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.menu a:hover {
  color: var(--text);
}

main {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 52px 0 40px;
}

.hero img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.pill {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 208, 255, 0.15);
  color: #9df1ff;
  font-size: 0.9rem;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
}

.hero p {
  color: var(--muted);
  max-width: 58ch;
}

.cta {
  display: inline-block;
  margin-top: 12px;
  padding: 11px 18px;
  border-radius: 12px;
  background: linear-gradient(110deg, var(--accent), var(--glow));
  color: white;
  text-decoration: none;
  font-weight: 700;
}

.topics,
.posts,
.about {
  margin: 26px 0;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(29, 33, 56, 0.9), rgba(19, 22, 38, 0.9));
}

h2 {
  margin-top: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.topic-grid article {
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-soft);
}

.topic-grid p {
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.post-media {
  display: block;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #141a32;
}

.post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.post-body {
  padding: 16px;
}

.label {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.post-body p {
  color: var(--muted);
}

.about p {
  color: var(--muted);
}

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

.read-more {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.92rem;
}

.article-page {
  padding: 40px 0 30px;
}

.article-back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

.article-back:hover {
  color: var(--text);
}

.article-hero-img {
  width: 100%;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.article-header .label {
  margin-bottom: 10px;
}

.article-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 28px;
}

.article-content {
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(29, 33, 56, 0.9), rgba(19, 22, 38, 0.9));
}

.article-content h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p,
.article-content li {
  color: var(--muted);
}

.article-content ul {
  padding-left: 1.2rem;
}

.article-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(138, 92, 255, 0.2);
  color: #d9dcff;
  font-size: 0.9em;
}

.article-content pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 12px;
  background: #0e1020;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-content pre code {
  padding: 0;
  background: none;
  color: #c8d0ff;
}

footer {
  text-align: center;
  padding: 18px;
  color: #8c93bb;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

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