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

:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background-color: #f5f7fb;
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.7);
  --card-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --border: rgba(148, 163, 184, 0.3);
  --text-muted: #65728b;
  --brand: #00c58e;
  --brand-dark: #00a06c;
  --accent: #2dd4bf;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #e8f8f3, transparent 45%),
    radial-gradient(circle at top right, #e6f0ff, transparent 40%), var(--bg);
  color: #0f172a;
  line-height: 1.6;
  position: relative;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320"%3E%3Crect width="320" height="320" fill="rgba(255,255,255,0)"/%3E%3Cpath d="M0 0h320v320H0z" fill="rgba(255,255,255,0.03)"/%3E%3C/svg%3E');
  mix-blend-mode: soft-light;
  opacity: 0.6;
}

.page {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 40px 0 60px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.logo__symbol {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #01dca4);
  color: white;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 24px;
  font-weight: 500;
}

.nav__item {
  text-decoration: none;
  color: #111827;
  transition: color 0.2s;
}

.nav__item:hover,
.nav__item--active {
  color: var(--brand);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 12px 20px rgba(0, 197, 142, 0.25);
}

.btn.secondary {
  background: rgba(0, 197, 142, 0.1);
  color: var(--brand-dark);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: #111827;
}

.btn:hover {
  transform: translateY(-2px);
}

.layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 40px;
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
}

.hero__eyebrow {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

.hero__subtitle {
  color: var(--text-muted);
  margin: 18px 0;
}

.hero__search {
  display: flex;
  gap: 12px;
  margin: 24px 0;
}

.hero__search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

.hero__tags {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.chip {
  border: none;
  background: rgba(0, 197, 142, 0.12);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
}

.hero__card {
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(160deg, #111827, #0b1f32);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.hero__card::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  gap: 12px;
}

.stat__number {
  font-size: 28px;
  font-weight: 700;
}

.stat__label {
  color: #94a3b8;
  font-size: 14px;
}

.hero__pulse {
  background: rgba(15, 23, 42, 0.6);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.pulse__graph {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin: 12px 0;
}

.pulse__graph span {
  flex: 1;
  display: block;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(180deg, #34d399, #10b981);
  animation: pulse 2s ease-in-out infinite;
}

.pulse__graph span:nth-child(2) {
  animation-delay: 0.2s;
  height: 55px;
}
.pulse__graph span:nth-child(3) {
  animation-delay: 0.4s;
  height: 70px;
}
.pulse__graph span:nth-child(4) {
  animation-delay: 0.6s;
  height: 50px;
}
.pulse__graph span:nth-child(5) {
  animation-delay: 0.8s;
  height: 60px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleY(0.9);
    opacity: 0.6;
  }
  50% {
    transform: scaleY(1.1);
    opacity: 1;
  }
}

.content-grid {
  display: grid;
  grid-template-columns: 3fr 1.1fr;
  gap: 28px;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}

.featured-stream {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: center;
}

.featured-stream__visual {
  background: radial-gradient(circle at top, #34d399, #059669);
  border-radius: 20px;
  color: #f8fafc;
  padding: 24px;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured-stream__visual .signal {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 12px;
}

.stream-meta {
  display: flex;
  flex-direction: column;
  color: var(--text-muted);
  gap: 4px;
  margin: 16px 0;
}

.tabs {
  display: flex;
  gap: 16px;
  margin: 28px 0 12px;
}

.tab {
  border: none;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.tab--active {
  background: rgba(0, 197, 142, 0.15);
  color: var(--brand-dark);
}

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

.feed__item {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s, border-color 0.2s;
}

.feed__item:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 197, 142, 0.4);
}

.feed__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.feed__title a {
  color: #0f172a;
  text-decoration: none;
}

.feed__title a:hover {
  color: var(--brand-dark);
}

.badge {
  background: rgba(0, 197, 142, 0.15);
  color: var(--brand-dark);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.meta__dot {
  color: rgba(15, 23, 42, 0.2);
}

.feed__excerpt {
  color: var(--text-muted);
  margin: 12px 0 18px;
}

.feed__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c084fc, #a855f7);
  display: inline-block;
}

.stats {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--text-muted);
}

.icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.highlight {
  background: linear-gradient(145deg, rgba(0, 197, 142, 0.9), #059669);
  color: #f8fafc;
}

.highlight .btn.primary {
  background: white;
  color: #0f172a;
  box-shadow: none;
}

.rank-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
  padding-bottom: 10px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-cloud button {
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #111827;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.milestones {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.milestones li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.site-footer {
  margin-top: 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

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

.article-page .site-header {
  margin-bottom: 28px;
}

.article-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 20px;
}

.article-main {
  background: #fff;
  border-radius: 32px;
  padding: 36px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.article-hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  margin-bottom: 16px;
}

.article-meta .author {
  gap: 14px;
}

.article-stats {
  display: flex;
  gap: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.article-tags span {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}

.article-body {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #1e293b;
  font-size: 17px;
}

.article-body h2 {
  font-size: 24px;
  margin-top: 18px;
  color: #0f172a;
}

.article-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 16px;
  font-size: 15px;
  overflow-x: auto;
}

.article-body code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-body blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 18px;
  color: #475569;
  font-style: italic;
  background: rgba(0, 197, 142, 0.06);
  border-radius: 0 16px 16px 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

.article-body ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-body li {
  line-height: 1.7;
}

.article-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc li {
  color: #0f172a;
  font-weight: 500;
  cursor: pointer;
}

.sticky-card {
  position: sticky;
  top: 30px;
}

.article-highlight {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), #1d4ed8);
  color: #e2e8f0;
}

.article-highlight .btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.article-recommendations {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-recommendations a {
  color: #0f172a;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
}

.article-recommendations a span:last-child {
  color: var(--text-muted);
}

.article-divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin: 20px 0;
}

.writer-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 20px;
}

.writer-card {
  padding: 36px;
}

.writer-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 18px;
}

.writer-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: #0f172a;
}

.writer-form input,
.writer-form textarea {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  resize: vertical;
}

.writer-form textarea {
  min-height: 140px;
}

.writer-tips {
  list-style: disc;
  padding-left: 20px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #0f172a;
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 100;
}

.toast[data-type='error'] {
  background: #b91c1c;
}

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

.skeleton {
  min-height: 140px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 400% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 24px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1024px) {
  .site-header {
    flex-direction: column;
    gap: 18px;
    border-radius: 24px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .featured-stream {
    grid-template-columns: 1fr;
  }

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

  .article-main {
    padding: 28px;
  }

  .article-stats {
    flex-wrap: wrap;
  }

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

@media (max-width: 640px) {
  .page {
    width: 94vw;
  }

  .site-header,
  .glass,
  .hero {
    padding: 20px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__search {
    flex-direction: column;
  }

  .feed__footer {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-actions {
    flex-direction: column;
  }

  .writer-card {
    padding: 20px;
  }
}

