:root{
  --bg-primary:#06060A; --bg-secondary:#0C0C12; --bg-tertiary:#12121A;
  --bg-card:#0F0F16;
  --hero-bg:#0a0807; --hero-bg-deep:#050403;
  --accent:#C8A44E; --accent-bright:#E4C76A; --accent-glow:rgba(200,164,78,0.15);
  --border:rgba(255,255,255,0.06); --border-accent:rgba(200,164,78,0.2);
  --text-primary:#F0EDE6; --text-secondary:#8A8694; --text-muted:#5A5666;
  --text-faint:#6b6358;
  --gradient-gold:linear-gradient(135deg,#C8A44E 0%,#E4C76A 50%,#C8A44E 100%);
  --sans:'DM Sans',-apple-system,BlinkMacSystemFont,sans-serif;
  --hero-sans:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  --serif:'Instrument Serif',Georgia,serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 17px;
}
::selection { background: rgba(200, 164, 78, 0.3); color: var(--text-primary); }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.site-header { position: relative; z-index: 1000; }
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(24px, 5vw, 80px);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 6, 10, 0.8);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--hero-sans);
}
nav.scrolled { background: rgba(6, 6, 10, 0.95); }
.nav-logo {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  text-transform: uppercase;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text-primary); }
@media (min-width: 769px) {
  .nav-mobile-only { display: none; }
}
.nav-cta {
  font-size: 13px !important;
  color: var(--accent) !important;
  border: 1px solid rgba(200, 164, 78, 0.22);
  padding: 8px 20px;
  border-radius: 999px;
  transition: all 0.3s ease !important;
}
.nav-cta:hover {
  background: rgba(200, 164, 78, 0.12);
  border-color: var(--accent);
}
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: 0;
  background: transparent;
}
.nav-mobile-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

main { position: relative; z-index: 1; }
.blog-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 148px 0 96px;
}
.blog-hero {
  padding-bottom: clamp(48px, 8vw, 84px);
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-family: var(--hero-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}
.blog-title {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 86px);
  font-weight: 400;
  line-height: 1.02;
  max-width: 800px;
}
.blog-title em,
.article-title em { color: var(--accent); font-style: italic; }
.blog-intro {
  color: var(--text-secondary);
  max-width: 620px;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.7;
  margin-top: 24px;
  font-weight: 300;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  padding-top: 36px;
}
.post-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.post-card:hover {
  border-color: var(--border-accent);
  background: rgba(18, 18, 26, 0.94);
  transform: translateY(-2px);
}
.post-card-media {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.post-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.post-card:hover .post-card-media img {
  transform: scale(1.025);
}
.post-card-body {
  display: flex;
  min-height: 230px;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
}
.post-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.12;
  margin-bottom: 16px;
}
.post-card p {
  color: var(--text-secondary);
  line-height: 1.65;
}
.post-date,
.article-date {
  color: var(--text-faint);
  font-family: var(--hero-sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 28px;
}
.empty-state {
  margin-top: 36px;
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  color: var(--text-secondary);
}

.article-shell {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 148px 0 96px;
}
.article-header {
  padding-bottom: 42px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
}
.article-description {
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.65;
  font-weight: 300;
}
.draft-banner {
  margin-bottom: 24px;
  border: 1px solid var(--border-accent);
  background: rgba(200, 164, 78, 0.09);
  color: var(--accent-bright);
  padding: 12px 14px;
  border-radius: 8px;
  font-family: var(--hero-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.article-hero-image {
  aspect-ratio: 16 / 9;
  margin-bottom: 42px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
}
.article-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-content {
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.72;
}
.article-content > * + * { margin-top: 1.25em; }
.article-content h2 {
  font-family: var(--hero-sans);
  color: var(--accent);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2.6em;
}
.article-content h3 {
  font-family: var(--sans);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1.35;
  margin-top: 2em;
}
.article-content p,
.article-content li { color: var(--text-primary); }
.article-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 164, 78, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.article-content a:hover {
  color: var(--accent-bright);
  border-color: var(--accent-bright);
}
.article-content ul,
.article-content ol {
  padding-left: 1.35em;
}
.article-content blockquote {
  border-left: 2px solid var(--accent);
  color: var(--text-secondary);
  padding-left: 20px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.45;
}
.article-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12em 0.3em;
  color: var(--accent-bright);
}
.article-content pre {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
}
.article-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
}
.article-cta {
  margin-top: 64px;
  padding: 40px 28px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
}
.article-cta p {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.18;
  margin-bottom: 24px;
}
.app-store-badge {
  display: inline-flex;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}
.app-store-badge img {
  width: 210px;
  height: auto;
  display: block;
}
.back-link {
  display: inline-flex;
  margin-top: 34px;
  color: var(--accent);
  text-decoration: none;
  font-family: var(--hero-sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.back-link:hover { color: var(--accent-bright); }

footer {
  padding: 48px clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-disclosure {
  margin: 0;
  max-width: 360px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(245, 239, 225, 0.45);
  letter-spacing: 0.02em;
}
.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--text-secondary); }

@media (max-width: 768px) {
  .nav-desktop-only { display: none; }
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 6, 10, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    backdrop-filter: blur(20px);
  }
  .nav-links.open { display: flex; }
  .nav-mobile-toggle { display: flex; }
  .blog-shell,
  .article-shell {
    width: min(100% - 36px, 720px);
    padding-top: 122px;
  }
  .post-card { min-height: 0; }
  .post-card-body { min-height: 0; padding: 24px; }
  footer { flex-direction: column; gap: 24px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 18px 24px; }
}
