@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(216 20% 22%);
}

:root {
  --bg: hsl(216, 28%, 12%);
  --fg: hsl(210, 40%, 92%);
  --card-bg: linear-gradient(135deg, hsl(216, 30%, 17%) 0%, hsl(216, 30%, 13%) 100%);
  --card-border: hsl(216, 20%, 24%);
  --primary: hsl(190, 60%, 50%);
  --primary-10: hsla(190, 60%, 50%, 0.1);
  --primary-80: hsla(190, 60%, 50%, 0.8);
  --primary-70: hsla(190, 60%, 50%, 0.7);
  --muted: hsl(215, 15%, 55%);
  --muted-40: hsla(215, 15%, 55%, 0.4);
  --border: hsl(216, 20%, 22%);
  --gradient-bg: radial-gradient(ellipse at 50% 50%, hsl(200, 30%, 18%) 0%, hsl(216, 28%, 12%) 50%, hsl(220, 30%, 8%) 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, hsla(190, 40%, 25%, 0.3) 0%, transparent 60%);
  --gradient-text: linear-gradient(135deg, hsl(190, 60%, 60%), hsl(210, 50%, 70%));
  --radius: 0.75rem;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--gradient-bg);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Glow overlay */
.glow-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60vh;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.container {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 48rem;
}

/* Header */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .header { padding: 1.5rem 3rem; }
  .container { padding: 0 3rem; }
}

@media (min-width: 1024px) {
  .header { padding: 1.5rem 5rem; }
  .container { padding: 0 5rem; }
}

.header-logo img {
  height: 7rem;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.header-logo:hover img {
  opacity: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s;
}

.header-nav a:hover {
  color: var(--fg);
}

/* Text gradient */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass card */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
}

/* Hover lift */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -10px hsla(190, 60%, 40%, 0.2);
}

/* Hero */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero { padding: 8rem 0 4rem; }
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 3.75rem; }
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .hero p { font-size: 1.25rem; }
}

/* Category grid */
.categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

@media (min-width: 768px) {
  .categories { grid-template-columns: repeat(3, 1fr); }
}

.category-card {
  padding: 1.5rem;
  text-align: center;
}

.category-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
  margin: 0 auto 1rem;
}

.category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Articles section */
.articles-section {
  padding-bottom: 4rem;
}

.articles-section > h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .articles-section > h2 { font-size: 1.875rem; }
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Article card */
.article-card {
  display: block;
}

.article-card .glass-card {
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .article-card .glass-card { padding: 2rem; }
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary-80);
  background: var(--primary-10);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.article-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

@media (min-width: 768px) {
  .article-card h3 { font-size: 1.5rem; }
}

.article-card:hover h3 {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-card .excerpt {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.article-meta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-40);
}

.read-more {
  font-size: 0.875rem;
  color: var(--primary-70);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s;
}

.article-card:hover .read-more {
  color: var(--primary);
}

/* Footer */
.footer {
  position: relative;
  z-index: 10;
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.footer p {
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-sep {
  color: var(--muted-40);
}

/* Article detail page */
.article-detail {
  padding: 3rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--fg);
}

.article-detail .article-tags {
  margin-bottom: 1.5rem;
}

.article-detail h1 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .article-detail h1 { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  .article-detail h1 { font-size: 3rem; }
}

.article-detail .meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  color: hsla(210, 30%, 80%, 0.8);
  line-height: 1.7;
  margin: 1rem 0;
}

.article-content strong {
  color: var(--fg);
  font-weight: 500;
}

.article-content ul,
.article-content ol {
  color: hsla(210, 30%, 80%, 0.8);
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.article-content li {
  margin: 0.5rem 0;
}

/* Legal page */
.legal-page {
  padding: 4rem 0 6rem;
}

@media (min-width: 768px) {
  .legal-page { padding: 6rem 0 8rem; }
}

.legal-page h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .legal-page h1 { font-size: 2.25rem; }
}

.legal-content {
  padding: 2rem;
}

.legal-content section {
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.7;
}

/* Main content z-index */
.main-content {
  flex: 1;
  position: relative;
  z-index: 10;
}

/* Fade in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }
