:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #60a5fa;
  --bg: #f0f9ff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #bae6fd;
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow: 0 10px 15px -3px rgb(15 23 42 / 0.08), 0 4px 6px -4px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 20px 25px -5px rgb(15 23 42 / 0.1), 0 8px 10px -6px rgb(15 23 42 / 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-full: 9999px;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  font-size: 16px;
}

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

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

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

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.logo {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.025em;
}

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

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

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

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

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: 0.3s;
}

/* Hero Split Screen */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.06);
  transform: rotate(25deg);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: 3.25rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.hero-text p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 42ch;
}

.hero-visual {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.25);
  text-align: center;
}

.hero-visual .quote {
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.hero-visual .author {
  font-weight: 600;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.975rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: white;
}

.btn-dark {
  background-color: var(--primary);
  color: white;
}

.btn-dark:hover {
  background-color: var(--primary-dark);
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Intro long text */
.intro-text {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.075rem;
}

.intro-text p {
  margin-bottom: 1.35rem;
}

.intro-text p:last-child {
  margin-bottom: 0;
}

/* Asymmetric Grid for Articles */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles-grid .card:nth-child(3n+1) {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .articles-grid .card:nth-child(4n+1) {
    grid-column: span 2;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.3s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.35rem 1.5rem 1rem;
  background: linear-gradient(to right, #1e40af, #3b82f6);
  color: white;
}

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.25);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.35rem;
  line-height: 1.25;
  color: white;
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  gap: 1rem;
}

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

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.read-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.read-more:hover {
  gap: 0.55rem;
}

/* Sidebar / Categories */
.sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.sidebar h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.category-list {
  list-style: none;
}

.category-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  font-weight: 500;
}

.category-list .count {
  color: var(--text-muted);
  font-size: 0.85rem;
  background: #f1f5f9;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-full);
}

/* Form */
.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  padding: 1.75rem 2rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 10;
}

.modal-header h3 {
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.modal-body {
  padding: 2rem;
  font-size: 1.02rem;
  line-height: 1.75;
}

.modal-body p {
  margin-bottom: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  background: #f1f5f9;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--text);
}

/* Footer */
footer {
  background: var(--primary-dark);
  color: #e0f2fe;
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
}

footer a {
  color: #bae6fd;
}

footer a:hover {
  color: white;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.footer-disclaimer {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(224, 242, 254, 0.2);
  font-size: 0.85rem;
  opacity: 0.85;
  text-align: center;
}

/* Thank you page */
.thank-you-hero {
  text-align: center;
  padding: 4rem 1rem;
}

.thank-you-hero h1 {
  font-size: 2.85rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.thank-you-hero .check {
  width: 92px;
  height: 92px;
  background: #dcfce7;
  color: #166534;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3.25rem;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 1px solid var(--border);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .hero-text h1 {
    font-size: 2.35rem;
  }
  
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.65rem; }
  
  .section {
    padding: 3.5rem 0;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .articles-grid .card:nth-child(3n+1),
  .articles-grid .card:nth-child(4n+1) {
    grid-column: span 1;
  }
}

/* Print & accessibility */
@media print {
  header, footer, .btn, .modal { display: none !important; }
}