/* =============================================
   RESET & VARIABLES
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0A0A0A;
  --bg-card: #141414;
  --ink: #FFFFFF;
  --ink-muted: #8E8E8E;
  --ink-body: rgba(255, 255, 255, 0.85);
  --ink-dim: rgba(255, 255, 255, 0.35);
  --accent: #FF5C35;
  --accent2: #CEEF5A;
  --border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(10, 10, 10, 0.85);
  --footer-bg: #070707;
  --footer-brand: #FFFFFF;
  --footer-border: rgba(255, 255, 255, 0.06);
  --footer-title: rgba(255, 255, 255, 0.3);
  --footer-text: rgba(255, 255, 255, 0.5);
  --footer-link: rgba(255, 255, 255, 0.5);
  --footer-link-hover: #FFFFFF;
  --footer-copy: rgba(255, 255, 255, 0.25);
  --cursor-ring: rgba(255, 255, 255, 0.25);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

body.light-theme {
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --ink: #0A0A0A;
  --ink-muted: #5F5F5F;
  --ink-body: rgba(10, 10, 10, 0.85);
  --ink-dim: rgba(0, 0, 0, 0.35);
  --border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(250, 250, 250, 0.88);
  --footer-bg: #F0F0F5;
  --footer-brand: #0A0A0A;
  --footer-border: rgba(0, 0, 0, 0.07);
  --footer-title: rgba(0, 0, 0, 0.4);
  --footer-text: rgba(0, 0, 0, 0.55);
  --footer-link: rgba(0, 0, 0, 0.55);
  --footer-link-hover: #0A0A0A;
  --footer-copy: rgba(0, 0, 0, 0.3);
  --cursor-ring: rgba(0, 0, 0, 0.2);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   NAVIGATION
============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}
.nav-logo-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.nav-logo-subtitle {
  font-size: 0.6rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-cta {
  padding: 10px 20px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.3s;
}
.nav-cta:hover {
  opacity: 0.9;
}

/* =============================================
   RESOURCES INDEX LAYOUT
============================================= */
.resources-header {
  padding: 160px 4% 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.resources-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}
.resources-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

.resources-grid {
  max-width: 1200px;
  margin: 0 auto 120px;
  padding: 0 4%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 40px;
}
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-spring);
}
.resource-card:hover {
  border-color: rgba(255, 92, 53, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 12px;
}
.card-desc {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

/* =============================================
   ARTICLE LAYOUT
============================================= */
.article-header {
  padding: 160px 4% 40px;
  max-width: 780px;
  margin: 0 auto;
}
.article-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.article-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 24px;
}

.article-content {
  max-width: 780px;
  margin: 0 auto 100px;
  padding: 0 4%;
}
.article-body p {
  font-size: 1.1rem;
  color: var(--ink-body);
  margin-bottom: 24px;
  line-height: 1.7;
}
.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 48px 0 20px;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 32px 0 16px;
  color: var(--ink);
}
.article-body ul, .article-body ol {
  margin: 0 0 28px 24px;
}
.article-body li {
  font-size: 1.1rem;
  color: var(--ink-body);
  margin-bottom: 10px;
}
.article-body strong {
  color: var(--ink);
}

/* Comparisons and Tables */
.article-table-wrapper {
  overflow-x: auto;
  margin: 32px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
.article-table th, .article-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.article-table th {
  background: var(--bg-card);
  font-family: var(--font-heading);
  font-weight: 600;
}
.article-table tr:last-child td {
  border-bottom: none;
}

/* Callouts / Highlights */
.article-callout {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 24px 32px;
  margin: 36px 0;
  border-radius: 0 4px 4px 0;
}
.article-callout p {
  margin-bottom: 0;
  font-style: italic;
  font-size: 1.08rem;
}

/* CTA Card */
.article-cta {
  background: linear-gradient(135deg, #141414, #0d0d0d);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 6px;
  margin: 60px 0;
  text-align: center;
}
.article-cta h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.article-cta p {
  color: var(--ink-muted);
  font-size: 1rem;
  margin-bottom: 24px;
}

/* =============================================
   FOOTER
============================================= */
footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  padding: 80px 4% 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1fr 1fr 0.8fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--footer-border);
  margin-bottom: 0;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--footer-brand);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.footer-brand .accent {
  color: var(--accent);
}
.footer-tagline {
  color: var(--footer-text);
  font-size: 0.85rem;
  line-height: 1.6;
}
.footer-address {
  font-size: 0.78rem;
  color: var(--footer-copy);
  line-height: 1.5;
  margin-top: 10px;
}
.footer-address a {
  color: inherit;
  text-decoration: none;
}
.footer-col-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-title);
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--footer-link);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--footer-link-hover);
}
.footer-bottom {
  max-width: 1280px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--footer-copy);
}

@media (max-width: 960px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .resources-title, .article-title {
    font-size: 2.4rem;
  }
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   THEME TOGGLE BUTTON
============================================= */
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}
.theme-btn:hover {
  background: var(--border);
  transform: scale(1.08);
}
.theme-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.4s var(--ease-spring);
}
.theme-btn:hover svg {
  transform: rotate(20deg);
}
.theme-icon-sun { display: block; }
.theme-icon-moon { display: none; }

body.light-theme .theme-icon-sun { display: none; }
body.light-theme .theme-icon-moon { display: block; }
