/* ============================================
   AllDiscord.com — Dark Theme Stylesheet
   ============================================ */

/* --- Reset & Base --- */

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

:root {
  --bg-primary: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --bg-header: rgba(15, 15, 26, 0.85);
  --accent: #5865F2;
  --accent-hover: #4752c4;
  --text-heading: #ffffff;
  --text-body: #a0a0b8;
  --text-muted: #6e6e85;
  --border: #2a2a40;
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  line-height: 1.3;
}

main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo a {
  color: var(--text-heading);
}

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

.logo .accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 32px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 26, 0.95) 0%, rgba(15, 15, 26, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 48px;
  width: 100%;
}

.hero-content .badge {
  margin-bottom: 16px;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  max-width: 700px;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-body);
  max-width: 600px;
  margin-bottom: 16px;
}

.hero-content .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-content .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s;
}

.hero-content .read-more:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(88, 101, 242, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Section --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 48px 0 24px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- Category Filter --- */
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-filters a {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-body);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.category-filters a:hover,
.category-filters a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Article Grid --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(88, 101, 242, 0.1);
}

.card a {
  color: inherit;
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body .badge {
  margin-bottom: 12px;
}

.card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s;
}

.card:hover .card-body h3 {
  color: var(--accent);
}

.card-body .summary {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Article Page --- */
.article-page {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 20px;
}

.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.article-page .back-link:hover {
  color: var(--accent);
}

.article-page .badge {
  margin-bottom: 16px;
}

.article-page h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.25;
}

.article-page .meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-page .hero-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto 32px;
}

.article-page .article-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-page .article-body p {
  margin-bottom: 1.5em;
}

.article-page .article-body h2 {
  font-size: 1.5rem;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.article-page .article-body h3 {
  font-size: 1.25rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.article-page .article-body ul,
.article-page .article-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.article-page .article-body li {
  margin-bottom: 0.5em;
}

.article-page .article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5em;
  font-style: italic;
  color: var(--text-body);
}

.article-page .article-body .video-embed {
  margin-bottom: 2em;
}

.article-page .article-body .video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.article-page .article-body a {
  color: var(--accent);
  text-decoration: underline;
}

.article-page .article-body strong {
  color: var(--text-heading);
}

/* --- Author Bio --- */
.author-bio {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 24px 28px;
  margin-top: 48px;
}

.author-bio h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.author-bio p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0;
}

.author-bio a {
  color: var(--accent);
  text-decoration: underline;
}

/* --- 404 --- */
.not-found {
  text-align: center;
  padding: 120px 20px;
}

.not-found h1 {
  font-size: 4rem;
  margin-bottom: 16px;
}

.not-found p {
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.not-found a {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.not-found a:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* --- Static Pages (About, Contact) --- */
.page-content {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 20px;
}

.page-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.page-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.page-content p {
  margin-bottom: 1.2em;
  font-size: 1.05rem;
  line-height: 1.8;
}

.page-content ul {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.page-content li {
  margin-bottom: 0.5em;
}

/* --- Contact Cards --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: border-color 0.2s;
}

.contact-card:hover {
  border-color: var(--accent);
}

.contact-card .icon {
  font-size: 2rem;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 0;
}

.contact-card a {
  color: var(--accent);
  font-weight: 500;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 48px 0 24px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text-heading);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Mobile Nav --- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 999;
  padding: 32px 20px;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav li {
  margin-bottom: 8px;
}

.mobile-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--text-body);
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--bg-card);
  color: var(--text-heading);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: 360px;
    margin-top: 20px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

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

  .article-page h1 {
    font-size: 1.75rem;
  }

  .page-content h1 {
    font-size: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

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

  .category-filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .category-filters a {
    padding: 5px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 300px;
    border-radius: 0;
    margin-top: 0;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .category-filters {
    gap: 6px;
  }

  .category-filters a {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}
