@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

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

:root {
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --amber-glow: rgba(245,158,11,0.15);
  --bg: #09090b;
  --card: rgba(18,18,20,0.85);
  --border: rgba(63,63,70,0.5);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #fff;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #09090b; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

@keyframes dotBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.85rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(9,9,11,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(63,63,70,0.3);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #fff; cursor: pointer;
}
.brand-icon-wrapper { display: flex; align-items: center; justify-content: center; }
.brand-mark { width: 38px; height: 38px; object-fit: contain; transition: transform 0.5s ease; }
.nav-brand:hover .brand-mark { transform: rotate(12deg); }
.nav-logo { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.4px; }
.nav-logo span { color: #f59e0b; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 8px 16px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; color: #a1a1aa;
  text-decoration: none; transition: all 0.2s ease;
}
.nav-link:hover { background: rgba(63,63,70,0.3); color: #fff; }
.nav-link.active { color: #f59e0b; background: rgba(245,158,11,0.08); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-badge {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 14px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; color: #f59e0b;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.nav-badge-dot { width: 6px; height: 6px; background: #f59e0b; border-radius: 50%; animation: dotBlink 1.6s ease-in-out infinite; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
  background: rgba(63,63,70,0.25); border: 1px solid rgba(63,63,70,0.5);
  cursor: pointer;
}
.nav-toggle span { width: 16px; height: 2px; background: #e4e4e7; border-radius: 2px; transition: all 0.25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  flex-direction: column; gap: 2px;
  background: rgba(9,9,11,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(63,63,70,0.3);
  padding: 0.5rem 1.25rem 1.25rem;
  max-height: calc(100dvh - 64px); overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  padding: 12px 14px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; color: #d4d4d8;
  text-decoration: none; transition: background 0.2s ease, color 0.2s ease;
}
.nav-mobile-link:hover { background: rgba(63,63,70,0.3); }
.nav-mobile-link.active { color: #f59e0b; background: rgba(245,158,11,0.08); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border-radius: 999px;
  color: #000; font-size: 0.82rem; font-weight: 800;
  text-decoration: none; white-space: nowrap;
  transition: all 0.25s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245,158,11,0.3); }

.nav-mobile-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.08);
  border-radius: 12px;
  color: #f59e0b; font-size: 0.92rem; font-weight: 700;
  text-decoration: none; transition: background 0.2s ease;
}
.nav-mobile-cta:hover { background: rgba(245,158,11,0.14); }

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

/* ── PAGE HEADER ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 8.5rem 2.5rem 5rem; }
.sec-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; color: #f59e0b;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 1rem;
}
.sec-h {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 900; letter-spacing: -1.5px; line-height: 1.08;
  margin-bottom: 1rem;
}
.sec-sub { color: #a1a1aa; font-size: 0.95rem; max-width: 480px; line-height: 1.65; }

/* ── SEARCH + FILTER ── */
.art-controls { margin-top: 2.5rem; }
.art-search {
  width: 100%; max-width: 420px; padding: 12px 16px;
  background: rgba(9,9,11,0.9);
  border: 1px solid rgba(63,63,70,0.55);
  border-radius: 11px;
  color: #fff; font-size: 0.9rem; font-family: inherit;
  outline: none; transition: all 0.25s ease;
}
.art-search::placeholder { color: #52525b; }
.art-search:focus { border-color: rgba(245,158,11,0.55); box-shadow: 0 0 0 3px rgba(245,158,11,0.09); }
.art-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 1.1rem; }
.art-pill {
  padding: 6px 15px;
  background: rgba(24,24,27,0.85);
  border: 1px solid rgba(63,63,70,0.55);
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; color: #d4d4d8;
  cursor: pointer; transition: all 0.25s ease;
}
.art-pill:hover { border-color: rgba(245,158,11,0.4); color: #f59e0b; }
.art-pill.active { background: #f59e0b; border-color: #f59e0b; color: #000; }

/* ── ARTICLE GRID / CARDS ── */
.art-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px,1fr));
  gap: 1.4rem; margin-top: 2.5rem;
}
.art-card {
  display: flex; flex-direction: column;
  background: rgba(14,14,16,0.85);
  border: 1px solid rgba(63,63,70,0.4);
  border-radius: 20px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: all 0.35s ease;
}
.art-card:hover {
  border-color: rgba(245,158,11,0.3);
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,158,11,0.08);
}
.art-cover {
  width: 100%; aspect-ratio: 16/9;
  background: #18181b;
  object-fit: cover;
}
.art-body { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.art-category { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
.art-title { font-size: 1.05rem; font-weight: 800; line-height: 1.35; color: #f4f4f5; }
.art-dek { font-size: 0.85rem; color: #a1a1aa; line-height: 1.55; flex: 1; }
.art-meta { display: flex; align-items: center; gap: 10px; margin-top: 0.4rem; }
.art-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg,#f59e0b,#f97316);
  flex-shrink: 0;
}
.art-meta-text { font-size: 0.75rem; color: #71717a; }
.art-meta-text strong { color: #d4d4d8; font-weight: 600; }
.art-dot { color: #3f3f46; }

/* ── STATES ── */
.art-state { text-align: center; padding: 4rem 1rem; color: #71717a; font-size: 0.95rem; }
.loader-wrap { display: flex; justify-content: center; align-items: center; padding: 4rem 1rem; grid-column: 1 / -1; }
.loader {
  width: 34px; height: 34px;
  border: 3px solid rgba(245,158,11,0.15);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DETAIL PAGE ── */
.article-wrap { margin: 0 auto; padding: 8.5rem 0 6rem; }
.article-header, .article-body-col { max-width: 720px; margin: 0 auto; padding: 0 2.5rem; }
.article-cover-wrap { max-width: 860px; margin: 2rem auto 0; padding: 0 2.5rem; }
.article-body-col { margin-top: 2.5rem; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: #a1a1aa;
  text-decoration: none; margin-bottom: 2rem; transition: color 0.2s;
}
.back-link:hover { color: #f59e0b; }
.article-title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -1px;
  margin: 0.75rem 0 1rem;
}
.article-dek { font-size: 1.05rem; color: #a1a1aa; line-height: 1.6; margin-bottom: 1.5rem; }
.article-author-row {
  display: flex; align-items: center; gap: 12px;
  padding: 1.1rem 0; border-top: 1px solid rgba(63,63,70,0.35); border-bottom: 1px solid rgba(63,63,70,0.35);
}
.article-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg,#f59e0b,#f97316);
  flex-shrink: 0;
}
.article-author-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.article-author-meta { font-size: 0.78rem; color: #71717a; margin-top: 2px; }

.article-cover-frame {
  border-radius: 18px; overflow: hidden;
  background: #18181b;
  border: 1px solid rgba(63,63,70,0.4);
}
.article-cover {
  display: block; width: 100%; max-height: 520px; object-fit: cover;
}
.article-cover-caption {
  margin-top: 0.6rem; text-align: center;
  font-size: 0.78rem; color: #71717a;
}

.article-prose { font-size: 1rem; line-height: 1.85; }
.article-prose p { color: #d4d4d8; margin: 0 0 1.1rem; }
.article-prose h2 { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 2rem 0 0.75rem; }
.article-prose h3 { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 1.5rem 0 0.5rem; }
.article-prose ul, .article-prose ol { color: #d4d4d8; margin: 0 0 1.1rem 1.3rem; }
.article-prose li { margin-bottom: 0.4rem; }
.article-prose blockquote {
  border-left: 3px solid rgba(245,158,11,0.6);
  padding-left: 1rem; margin: 1.5rem 0;
  color: #a1a1aa; font-style: italic;
}
.article-prose a { color: #fbbf24; text-decoration: underline; }
.article-prose strong, .article-prose b { font-weight: 700; color: #fff; }
.article-prose img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }

.takeaways-box {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 16px; padding: 1.5rem;
  margin: 2rem 0;
}
.takeaways-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #f59e0b; margin-bottom: 0.8rem; }
.takeaways-box ul { margin: 0; padding-left: 1.2rem; color: #d4d4d8; font-size: 0.92rem; line-height: 1.75; }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2.5rem; }
.tag-pill {
  padding: 5px 13px; border-radius: 999px;
  background: rgba(63,63,70,0.35);
  font-size: 0.75rem; color: #d4d4d8;
}

/* ── FOOTER ── */
.footer { padding: 2.5rem 2.5rem; border-top: 1px solid rgba(63,63,70,0.25); }
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  padding-bottom: 1.5rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(63,63,70,0.2);
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-size: 1rem; font-weight: 900; }
.footer-logo span { color: #f59e0b; }
.footer-copy { font-size: 0.75rem; color: #3f3f46; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.75rem; color: #3f3f46; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #f59e0b; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24,24,27,0.85);
  border: 1px solid rgba(63,63,70,0.5);
  color: #a1a1aa; transition: all 0.25s ease;
}
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-social:hover {
  color: #f59e0b;
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.08);
  transform: translateY(-2px);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .navbar { padding: 0.8rem 1.25rem; }
  .nav-badge-text { display: none; }
  .page-wrap { padding: 7rem 1.25rem 4rem; }
  .article-wrap { padding: 7rem 0 4rem; }
  .article-header, .article-body-col, .article-cover-wrap { padding: 0 1.25rem; }
  .footer { padding: 2rem 1.25rem; }
  .footer-top, .footer-bottom { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
