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

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --success: #10b981;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;

  /* Design Tokens */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-surface: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-light: #94a3b8;
  --border-color: #334155;
  --primary-light: #1e3a8a;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-secondary);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

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

/* Layout Classes */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  position: sticky;
}

[data-theme="dark"] .site-header {
  background: rgba(30, 41, 59, 0.9);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration: underline;
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-main) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-main) 100%);
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(0,0,0,0) 70%);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  padding-top: 3rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-size: 2rem;
}

/* Grids & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(37,99,235,0.2);
}

.card-img-wrapper {
  width: 100%;
  height: 200px;
  background-color: #e2e8f0;
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .card-img-wrapper {
  background-color: #334155;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card:hover .card-title {
  color: var(--primary);
  text-decoration: none;
}

.card-excerpt {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  color: var(--text-secondary);
}

/* Footer & Newsletter */
.newsletter-section {
  background-color: var(--primary-light);
  padding: 4rem 0;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 4rem 0;
}

.newsletter-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.newsletter-content p {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.input-field {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: var(--text-secondary);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Badge */
.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Skeleton Loading */
.skeleton {
  background: #f1f5f9;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(110deg, #334155 8%, #475569 18%, #334155 33%);
  background-size: 200% 100%;
}

@keyframes shine {
  to {
    background-position-x: -200%;
  }
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 0; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    gap: 0.25rem;
    z-index: 49;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
  }

  .nav-links a:last-child { border-bottom: none; margin-top: 0.5rem; text-align: center; }

  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  .stat-item { min-width: 100px; }
  .stat-value { font-size: 1.5rem; }

  .grid-3 { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-section { padding: 2.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 1.5rem; align-items: center; }
}
