/* ===== Design system ===== */
:root {
  --bg: #0c0c0f;
  --bg-elevated: #14141a;
  --surface: #1a1a22;
  --surface-hover: #22222c;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-glow: rgba(139, 92, 246, 0.35);
  --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #0c0c0f 45%, #042f2e 100%);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-modal: 0 32px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --max: 1100px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* Blur blog when consent modal is open */
body.consent-locked .site-shell {
  filter: blur(10px) saturate(0.85);
  transform: scale(0.98);
  pointer-events: none;
  user-select: none;
}

body.consent-locked {
  overflow: hidden;
}

.site-shell {
  transition: filter 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}

.consent-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.consent-modal {
  width: 100%;
  max-width: 480px;
  padding: 2.25rem 2rem 2rem;
  background: linear-gradient(165deg, #22222e 0%, #16161d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  text-align: center;
  transform: scale(0.88) translateY(24px);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), opacity 0.35s var(--ease-out);
}

.consent-overlay.is-visible .consent-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.consent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-glow);
}

.consent-modal h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.consent-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.consent-lead strong {
  color: var(--text);
  font-weight: 600;
}

.consent-box {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.consent-details {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.consent-details li {
  margin-bottom: 0.4rem;
}

.consent-details li:last-child {
  margin-bottom: 0;
}

.consent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.consent-footnote {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 50%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.45);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.btn-arrow {
  transition: transform 0.2s;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 12, 15, 0.8);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.logo-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}

.logo:hover {
  color: #fff;
}

.nav {
  display: flex;
  gap: 2rem;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 1;
}

.hero-bg::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 100px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 0%, #c4c4cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 34rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.btn-hero-primary,
.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-hero-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-hero-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.hero-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.meta-sep {
  margin: 0 0.4rem;
}

/* ===== Cards ===== */
.featured {
  padding: 0 0 3rem;
  margin-top: -1rem;
}

.section-head {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.card-accent.policy {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.card-accent.engineering {
  background: linear-gradient(90deg, var(--accent-2), #3b82f6);
}

.card-accent.culture {
  background: linear-gradient(90deg, #ec4899, var(--accent));
}

.card-featured {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.card-featured-visual {
  position: relative;
  min-height: 220px;
  background: linear-gradient(160deg, #312e81 0%, #0c0c0f 100%);
}

.gradient-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.6;
  filter: blur(2px);
}

.card-featured .card-body {
  padding: 2rem;
}

.card-tag {
  margin: 0 0 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.card h2,
.card h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.card-featured h2 {
  font-size: 1.65rem;
}

.card h3 {
  font-size: 1.2rem;
}

.card-excerpt {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.read-more {
  font-weight: 600;
  color: var(--accent-2);
  transition: color 0.2s;
}

.read-more:hover {
  color: #67e8f9;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.articles {
  padding: 2rem 0 4rem;
}

.about {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}

.about-inner {
  max-width: 560px;
}

.about-inner p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.link-button {
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.link-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .card-featured {
    grid-template-columns: 1fr;
  }

  .card-featured-visual {
    min-height: 160px;
  }

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

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

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1.5rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: none;
  }

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

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

  .header-inner {
    position: relative;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .consent-modal {
    padding: 1.75rem 1.35rem 1.5rem;
  }
}

@media (min-width: 480px) {
  .consent-actions {
    flex-direction: row;
  }

  .consent-actions .btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 120px;
  }

  .consent-actions .btn-primary {
    flex: 1;
  }
}
