:root {
  --bg: #000000;
  --surface: #101012;
  --surface-raised: #18181b;
  --surface-hover: #222227;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --muted: #86868b;
  --accent: #2997ff;
  --accent-hover: #47a6ff;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 0 20px 80px;
}

/* Navigation bar */
.blog-nav-bar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.blog-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand:hover {
  opacity: 0.85;
}

.nav-pill {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 3px 8px;
  background: rgba(41, 151, 255, 0.15);
  color: var(--accent);
  border-radius: 6px;
}

.blog-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-link.active {
  color: var(--text);
  font-weight: 600;
}

/* Container */
.blog-container {
  max-width: 1040px;
  margin: 0 auto;
}

.article-container {
  max-width: 760px;
  margin: 0 auto;
}

/* Blog Index Header */
.blog-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.blog-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.blog-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 18px;
  background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-description {
  font-size: 19px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}

/* Featured Post Card */
.featured-post-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 56px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.featured-post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.featured-image-wrap {
  position: relative;
  min-height: 340px;
  background: #000;
  overflow: hidden;
}

.featured-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-post-card:hover .featured-image-wrap img {
  transform: scale(1.03);
}

.featured-content {
  padding: 40px 36px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.post-tag {
  color: var(--accent);
  background: rgba(41, 151, 255, 0.12);
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}

.post-card-summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.read-more-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Post Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

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

.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}

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

.post-card-body .post-card-title {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card-body .post-card-summary {
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

/* Single Article Styling */
.article-header {
  margin-bottom: 40px;
}

.article-breadcrumb {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
}

.article-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-title {
  font-size: clamp(34px, 5.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 20px;
  color: #fff;
}

.article-lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}

.author-name {
  font-weight: 600;
  color: var(--text);
}

.article-hero-media {
  margin: 36px 0 44px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.article-hero-media img {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

.media-caption {
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* Article Body Prose */
.article-body {
  font-size: 18px;
  line-height: 1.75;
  color: #d1d1d6;
}

.article-body p {
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: clamp(26px, 3.8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: #ffffff;
  margin: 48px 0 18px;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #f5f5f7;
  margin: 36px 0 14px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 26px 24px;
}

.article-body li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.article-body strong {
  color: #ffffff;
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--accent-hover);
}

.article-body blockquote {
  margin: 36px 0;
  padding: 20px 26px;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 19px;
  font-style: italic;
  color: #e5e5ea;
}

/* Callout Box */
.article-callout {
  margin: 36px 0;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.article-callout h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-callout p {
  margin-bottom: 0;
  font-size: 15.5px;
  color: var(--text-secondary);
}

/* Media Figures Inside Article */
.article-figure {
  margin: 40px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.article-figure img {
  width: 100%;
  display: block;
}

.article-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.article-figure-grid .article-figure {
  margin: 0;
}

/* In-Article App Download Card */
.app-cta-card {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(135deg, #141416 0%, #1e1e24 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.app-cta-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-cta-icon {
  width: 76px;
  height: 76px;
  border-radius: 22.5%;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.app-cta-info h3 {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.app-cta-info p {
  margin-bottom: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.app-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #000000;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease;
}

.app-cta-btn:hover {
  transform: scale(1.04);
  background: #f0f0f2;
}

.app-cta-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Article Footer Navigation */
.article-footer-nav {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-footer-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.article-footer-nav a:hover {
  text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 860px) {
  .featured-post-card {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 24px 24px 32px;
  }
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .article-figure-grid {
    grid-template-columns: 1fr;
  }
  .app-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-cta-btn {
    width: 100%;
    justify-content: center;
  }
}
