/* TrackTrendy Blog - Shared Stylesheet */

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

:root {
  --black:        #000000;
  --surface:      #07050f;
  --surface2:     #0f0c1e;
  --sep:          #1e1830;
  --purple:       #7b5cdc;
  --purple-light: #a78bfa;
  --purple-pale:  #c4b5fd;
  --purple-glow:  rgba(123,92,220,0.14);
  --white:        #ffffff;
  --t1:           #f1f1f1;
  --t2:           rgba(255,255,255,0.68);
  --t3:           rgba(255,255,255,0.35);
  --green:        #4ade80;
  --font:         'Be Vietnam Pro', -apple-system, sans-serif;
  --max-w:        1140px;
  --prose-w:      760px;
}

body.light {
  --black:        #F9F9F9;
  --surface:      #ffffff;
  --surface2:     #f0eefe;
  --sep:          #e4e0f5;
  --t1:           #1E1E2F;
  --t2:           rgba(30,30,47,0.72);
  --t3:           rgba(30,30,47,0.4);
  --purple-glow:  rgba(123,92,220,0.08);
  --green:        #16a34a;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--t1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 14px 5%;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(123,92,220,0.12);
}
body.light .nav {
  background: rgba(249,249,249,0.92);
  border-bottom-color: rgba(123,92,220,0.15);
}
.nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.nav-logo img { height: 24px; }
.nav-wordmark {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--white);
}
body.light .nav-wordmark { color: #1E1E2F; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--t2);
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--t1); }
body.light .nav-links a { color: rgba(30,30,47,0.65); }
body.light .nav-links a:hover { color: #1E1E2F; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-login {
  font-size: 14px; color: var(--t2);
  text-decoration: none; transition: color 0.15s;
}
.nav-login:hover { color: var(--t1); }
body.light .nav-login { color: rgba(30,30,47,0.65); }
.theme-toggle {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid rgba(123,92,220,0.2); background: transparent;
  color: var(--t2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.theme-toggle:hover { background: var(--surface2); border-color: rgba(123,92,220,0.4); color: var(--t1); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
body.light .theme-toggle .icon-moon { display: none; }
body.light .theme-toggle .icon-sun  { display: block; }
body.light .theme-toggle { border-color: var(--sep); color: rgba(30,30,47,0.6); }
.nav-cta {
  padding: 8px 18px; background: var(--purple); color: #fff;
  border-radius: 7px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background 0.18s;
}
.nav-cta:hover { background: #6948c8; }

/* ===== BLOG INDEX ===== */
.blog-hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: 120px 5% 64px;
}
.blog-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple-light); margin-bottom: 16px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 54px); font-weight: 300;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 16px;
}
.blog-hero h1 .accent { color: var(--purple-light); }
.blog-hero p { font-size: 17px; color: var(--t2); max-width: 520px; }

.blog-grid {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 5% 96px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--surface); border: 1px solid var(--sep);
  border-radius: 14px; padding: 28px;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover { border-color: rgba(123,92,220,0.4); transform: translateY(-2px); }
body.light .post-card { background: #fff; }
.post-card-tag {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--purple-light);
}
.post-card h2 {
  font-size: 18px; font-weight: 600;
  color: var(--t1); line-height: 1.3;
}
.post-card p { font-size: 14px; color: var(--t2); line-height: 1.65; flex: 1; }
.post-card-meta {
  font-size: 12px; color: var(--t3);
  display: flex; gap: 14px; margin-top: 4px;
}
.post-card-arrow { font-size: 13px; color: var(--purple-light); font-weight: 500; }

/* ===== POST LAYOUT ===== */
.post-wrap {
  max-width: var(--prose-w); margin: 0 auto;
  padding: 100px 5% 80px;
}
.post-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--t3);
  margin-bottom: 32px;
}
.post-breadcrumb a { color: var(--t3); text-decoration: none; transition: color 0.15s; }
.post-breadcrumb a:hover { color: var(--purple-light); }
.post-breadcrumb svg { opacity: 0.4; }
.post-eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--purple-light); margin-bottom: 14px;
}
.post-wrap h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 300;
  color: var(--t1); line-height: 1.15; letter-spacing: -0.015em;
  margin-bottom: 16px;
}
body.light .post-wrap h1 { color: #1E1E2F; }
.post-meta {
  font-size: 13px; color: var(--t3);
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 40px; padding-bottom: 32px;
  border-bottom: 1px solid var(--sep);
}

/* ===== QUICK ANSWER ===== */
.quick-answer {
  background: var(--surface);
  border: 1px solid rgba(123,92,220,0.25);
  border-left: 3px solid var(--purple);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 40px;
  font-size: 15px; color: var(--t2); line-height: 1.75;
}
body.light .quick-answer { background: var(--surface2); }
.quick-answer strong { color: var(--purple-light); font-weight: 600; }

/* ===== PROSE ===== */
.post-body { font-size: 16px; color: var(--t2); line-height: 1.8; }
.post-body h2 {
  font-size: 22px; font-weight: 600; color: var(--t1);
  line-height: 1.25; margin: 48px 0 16px; letter-spacing: -0.01em;
}
body.light .post-body h2 { color: #1E1E2F; }
.post-body h3 {
  font-size: 17px; font-weight: 600; color: var(--t1);
  margin: 28px 0 10px;
}
body.light .post-body h3 { color: #1E1E2F; }
.post-body p { margin-bottom: 20px; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 20px; }
.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--t1); font-weight: 600; }
body.light .post-body strong { color: #1E1E2F; }
.post-body a { color: var(--purple-light); text-decoration: none; transition: color 0.15s; }
.post-body a:hover { color: var(--white); }
body.light .post-body a:hover { color: #1E1E2F; }

/* Highlight box */
.highlight-box {
  background: var(--surface); border: 1px solid var(--sep);
  border-radius: 10px; padding: 20px 24px; margin: 28px 0;
  font-size: 15px; line-height: 1.7;
}
body.light .highlight-box { background: var(--surface2); }

/* ===== FAQ SECTION ===== */
.faq-section { margin-top: 56px; }
.faq-section > h2 {
  font-size: 22px; font-weight: 600; color: var(--t1);
  margin-bottom: 24px;
}
body.light .faq-section > h2 { color: #1E1E2F; }
.faq-item { border-top: 1px solid var(--sep); padding: 20px 0; }
.faq-q { font-size: 16px; font-weight: 600; color: var(--t1); margin-bottom: 10px; }
body.light .faq-q { color: #1E1E2F; }
.faq-a { font-size: 14px; color: var(--t2); line-height: 1.75; }

/* ===== CTA BLOCK ===== */
.post-cta {
  background: linear-gradient(135deg, rgba(123,92,220,0.12) 0%, var(--surface) 100%);
  border: 1px solid rgba(123,92,220,0.25);
  border-radius: 14px; padding: 36px 32px;
  text-align: center; margin-top: 64px;
}
body.light .post-cta { background: linear-gradient(135deg, rgba(123,92,220,0.07) 0%, #fff 100%); }
.post-cta h3 { font-size: 22px; font-weight: 600; color: var(--t1); margin-bottom: 10px; }
body.light .post-cta h3 { color: #1E1E2F; }
.post-cta p { font-size: 15px; color: var(--t2); margin-bottom: 24px; }
.post-cta .btn {
  display: inline-block; padding: 12px 28px;
  background: var(--purple); color: #fff;
  border-radius: 8px; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: background 0.18s;
}
.post-cta .btn:hover { background: #6948c8; }
.post-cta .btn-note { font-size: 12px; color: var(--t3); margin-top: 10px; }

/* ===== RELATED POSTS ===== */
.related {
  margin-top: 64px; padding-top: 40px;
  border-top: 1px solid var(--sep);
}
.related h3 {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--t3); margin-bottom: 18px;
}
.related-links { display: flex; flex-direction: column; gap: 12px; }
.related-links a {
  font-size: 15px; color: var(--purple-light);
  text-decoration: none; transition: color 0.15s;
}
.related-links a:hover { color: var(--white); }
body.light .related-links a:hover { color: #1E1E2F; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--sep); padding: 56px 5% 32px; }
body.light .footer { background: #fff; }
.footer-top {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand {}
.footer-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; margin-bottom: 14px;
}
.footer-logo img { height: 22px; }
.footer-logo span {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--t2);
}
body.light .footer-logo span { color: rgba(30,30,47,0.5); }
.footer-desc { font-size: 13px; color: var(--t3); line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--t3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--t2); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--t1); }
body.light .footer-col a { color: rgba(30,30,47,0.5); }
body.light .footer-col a:hover { color: #1E1E2F; }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--sep);
}
.footer-copy { font-size: 12px; color: var(--t3); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: var(--t3); text-decoration: none; transition: color 0.15s; }
.footer-legal a:hover { color: var(--t2); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav-links { display: none; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .post-cta { padding: 28px 20px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
