@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&display=swap');

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

:root {
  --bg: #030303;
  --surface: #0a0a0a;
  --card: #0f0f0f;
  --border: rgba(255,255,255,0.06);
  --text: #f5f5f7;
  --text-dim: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.35);
  --accent: #c4b5fd;
  --accent-vivid: #a78bfa;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent-vivid); color: var(--bg); }

/* ── Navigation ── */
nav:not(.breadcrumb) { position: fixed; top: 2.75rem; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 2rem; padding: 0.75rem 1.5rem; background: rgba(255,255,255,0.08); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255,255,255,0.1); border-radius: 999px; box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 0.5px rgba(255,255,255,0.05) inset; }
.logo { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.04em; color: white; text-decoration: none; }
.nav-links { display: flex; gap: 3rem; justify-self: center; }
.nav-links a { color: white; text-decoration: none; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 500; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: white; transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active::after { width: 100%; }
.nav-download { display: flex; align-items: center; gap: 6px; background: white; color: black !important; padding: 7px 16px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.3s; text-decoration: none; border: 1px solid white; }
.nav-download svg { fill: black; }
.nav-download::after { display: none !important; }
.nav-download:hover { opacity: 0.9; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: white; margin: 5px 0; transition: all 0.3s; }
.nav-links.open { display: flex; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; right: 2rem; flex-direction: column; gap: 0; background: rgba(10,10,10,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem; min-width: 180px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1.2rem; border-radius: 8px; font-size: 0.8rem; }
  .nav-links a:hover { background: rgba(255,255,255,0.05); }
  .nav-links a::after { display: none; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
}

/* ── Container ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Page Header ── */
.page-header {
  padding: 140px 0 48px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.04em;
}

.page-header p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.7;
}

.page-content {
  padding: 0 0 40px;
}

/* ── Back Link ── */
.back-link {
  display: block;
  padding: 100px 0 0;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

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

.back-link a::before {
  content: '←';
}

/* ── Blog Grid ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.blog-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.blog-card.featured .blog-card-image {
  width: 45%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.blog-card.featured .blog-card-body {
  padding: 32px;
}

.blog-card.featured .blog-card-title {
  font-size: 1.35rem;
}

.blog-card-image {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(196, 181, 253, 0.08));
  position: relative;
}

.blog-card-image:has(img) {
  background: none;
}

.blog-card-image picture {
  display: block;
  width: 100%;
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: auto;
}

.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.blog-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  background: rgba(167, 139, 250, 0.12);
  border-radius: 100px;
}

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

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

/* ── Article Header ── */
.article-header {
  padding: 120px 0 32px;
  text-align: center;
}

.article-header h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-header .blog-card-meta {
  justify-content: center;
  margin-bottom: 20px;
}

.article-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
}

.article-hero-image {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-bottom: 32px;
  border-radius: 12px;
}

.article-content {
  max-width: 720px;
  margin: 48px auto 80px;
}

/* ── Prose Typography ── */
.prose {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.prose p {
  margin-bottom: 20px;
}

.prose h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 16px;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
}

.prose ul,
.prose ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.4);
  transition: text-decoration-color 0.2s;
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

.prose code {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, monospace;
  font-size: 0.88em;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
}

.prose table th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.prose table td {
  font-size: 0.9rem;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-dim);
}

/* ── Key Takeaways ── */
.key-takeaways {
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 32px 0;
}

.key-takeaways-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 14px;
}

.key-takeaways ul {
  margin: 0;
  padding-left: 18px;
}

.key-takeaways li {
  margin-bottom: 8px;
  color: var(--text-dim);
  line-height: 1.6;
}

.key-takeaways li:last-child {
  margin-bottom: 0;
}

/* ── FAQ Section ── */
.faq-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

.faq-item {
  margin-bottom: 24px;
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0;
}

/* ── Page CTA ── */
.page-cta {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(167, 139, 250, 0.04) 100%);
}

.page-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.page-cta > .container > p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.page-cta .cta-sub {
  display: block;
  margin-top: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 18px 36px;
  border-radius: 100px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255,255,255,0.08), 0 8px 32px rgba(167, 139, 250, 0.12);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(255,255,255,0.15), 0 20px 40px rgba(167, 139, 250, 0.2);
}

.btn-primary.large {
  padding: 20px 44px;
  font-size: 1.1rem;
}

.apple-icon {
  width: 20px;
  height: 20px;
}

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

/* ── Related Articles ── */
.related-articles {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-muted);
}

/* ── Footer ── */
footer {
  padding: 4rem 3.5rem 3rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 4rem;
  align-items: start;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.3s;
}

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

.footer-bottom {
  max-width: 1120px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom span {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.footer-bottom a {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card.featured { flex-direction: column; }
  .blog-card.featured .blog-card-image { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

@media (max-width: 600px) {
  nav:not(.back-link) { padding: 0.6rem 1rem; gap: 1rem; }
  .page-header { padding: 110px 0 32px; }
  .article-header { padding: 100px 0 24px; }
  .back-link { padding: 80px 0 0; }
  .page-cta { padding: 60px 24px; }
  footer { padding: 2rem 1.5rem; }
}
