:root {
  --bg: #050608;
  --bg-alt: #0b1120;
  --bg-card: #111827;
  --text: #f9fafb;
  --muted: #9ca3af;
  --discord-blue: #5865F2;
  --plex-orange: #fbbf24;
  --border-soft: rgba(148, 163, 184, 0.35);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #050608 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

main {
  width: 100%;
}

.section {
  padding: 3.5rem 1.5rem;
}

.section-alt {
  background: rgba(15, 23, 42, 0.96);
}

/* tightened gap between blogs and community */
#blogs {
  padding-bottom: 3rem;
}

#community {
  padding-top: 2.25rem;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
}

/* Sticky nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(5, 6, 8, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-link:hover,
.nav-link-active {
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 68vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.disc-wrap {
  margin-bottom: 22px;
}

.disc-img {
  width: 160px;
  max-width: 55vw;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  filter: saturate(1.2);
  box-shadow:
    0 0 40px rgba(88, 101, 242, 0.4),
    0 0 80px rgba(251, 191, 36, 0.3),
    0 24px 64px rgba(0, 0, 0, 0.95);
}

/* Cards */
.card {
  display: block;
  padding: 22px 20px 24px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), var(--bg-card));
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  width: 100%;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.85);
  border-color: rgba(148, 163, 184, 0.65);
}

.hero-card {
  max-width: 480px;
  margin: 0 auto;
}

h1 {
  font-size: 1.45rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-header h1,
.section-header h2 {
  margin-bottom: 0.35rem;
}

.section-header p {
  color: var(--muted);
}

.tagline {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, background 0.12s ease;
  color: #fff;
  border: none;
  white-space: nowrap;
  min-width: 140px;
}

.btn-primary {
  background: var(--discord-blue);
  box-shadow: 0 14px 32px rgba(88, 101, 242, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 40px rgba(88, 101, 242, 0.55);
}

.btn-plex {
  background: var(--plex-orange);
  color: #111827;
  box-shadow: 0 14px 32px rgba(251, 191, 36, 0.4);
}

.btn-plex:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 40px rgba(251, 191, 36, 0.6);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.55);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.85);
}

/* Large CTA button */
.btn-lg {
  padding: 13px 24px;
  font-size: 0.95rem;
}

.section-cta-center {
  text-align: center;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Grids */
.section-header {
  margin-bottom: 1.75rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.section-cta {
  margin-top: 2rem;
}

/* Avatars */
.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  margin-bottom: 0.65rem;
}

/* Blog pages */
.blog-author-page .author-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.blog-author-page .author-header .avatar-img {
  margin-bottom: 0;
}

.blog-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.blog-card h2 {
  margin-bottom: 0.35rem;
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #020617;
  padding: 1.5rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* MOBILE FIXES */
@media (max-width: 640px) {
  .section {
    padding: 2.5rem 1.25rem;
  }

  #blogs {
    padding-bottom: 2.25rem;
  }

  #community {
    padding-top: 1.75rem;
  }

  .nav {
    padding-inline: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-left,
  .nav-right {
    width: 100%;
  }

  .nav-left {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .nav-right {
    margin-top: 0.35rem;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .btn {
    min-width: 0;
    padding-inline: 12px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-inner {
    padding-inline: 0.5rem;
  }

  .hero-card {
    padding-inline: 16px;
  }

  h1 {
    font-size: 1.25rem;
    letter-spacing: 0.16em;
  }

  .grid-3,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

/* ------------------------------------------------------ */
/* FIXED AVATAR SIZING FOR BLOGS – STRONG OVERRIDE */
/* ------------------------------------------------------ */

.author-card .avatar-img {
  width: 64px !important;
  height: 64px !important;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  margin-bottom: 0.75rem;
}
