/* ================================================================
   GoMLX Design System — main.css
   Aesthetic: Editorial-technical. DM Sans + DM Mono. Teal accent.
   ================================================================ */

/* ── Custom properties ── */
:root {
  --accent:        #0FA878;
  --accent-dark:   #0C8A62;
  --accent-light:  #E6FAF3;
  --accent-dim:    rgba(15, 168, 120, 0.12);

  --bg:            #FFFFFF;
  --bg-2:          #F7F8F6;
  --bg-3:          #EEEEE8;
  --bg-code:       #1A1D1B;

  --text:          #14160F;
  --text-2:        #4A4E44;
  --text-3:        #898D84;
  --text-inv:      #FFFFFF;

  --border:        rgba(20,22,15,0.08);
  --border-2:      rgba(20,22,15,0.14);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --font-sans:     'DM Sans', system-ui, sans-serif;
  --font-mono:     'DM Mono', 'Fira Code', monospace;
  --font-display:  'DM Serif Display', Georgia, serif;

  --nav-h:         60px;
  --container-w:   1160px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.08);

  color-scheme: light;
}

[data-theme="dark"] {
  --accent:        #15D196;
  --accent-dark:   #0FA878;
  --accent-light:  #0D2B22;
  --accent-dim:    rgba(21, 209, 150, 0.10);

  --bg:            #0F1210;
  --bg-2:          #161A17;
  --bg-3:          #1E2420;
  --bg-code:       #111411;

  --text:          #EEF0EC;
  --text-2:        #A8ADA4;
  --text-3:        #666B62;

  --border:        rgba(238,240,236,0.07);
  --border-2:      rgba(238,240,236,0.13);

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.4);

  color-scheme: dark;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); }
ul { list-style: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Section helpers ── */
.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 17px;
  color: var(--text-2);
  max-width: 580px;
  line-height: 1.65;
  margin-bottom: 40px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-secondary:hover { background: var(--bg-2); border-color: var(--border-2); }
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(15,168,120,0.3); }

/* ================================================================
   NAV
   ================================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 36px;
  flex-shrink: 0;
}
.nav-wordmark {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav-version {
  font-size: 11px;
  font-family: var(--font-mono);
  background: var(--bg-3);
  color: var(--text-3);
  padding: 2px 7px;
  border-radius: 20px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-link {
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.14s;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); background: var(--bg-2); }
.nav-link.is-active { font-weight: 500; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--font-sans);
}
.nav-search-trigger:hover { border-color: var(--border-2); color: var(--text-2); }
.nav-search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-3);
}
.nav-github {
  display: flex;
  align-items: center;
  padding: 6px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all 0.14s;
}
.nav-github:hover { color: var(--text); background: var(--bg-2); }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--font-sans);
}
.theme-toggle:hover { border-color: var(--border-2); color: var(--text); }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }
.nav-hamburger { display: none; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 100%);
  opacity: 0.5;
}
.hero-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(15,168,120,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(15,168,120,0.2);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: 20px;
}

/* ================================================================
   CODE PREVIEW
   ================================================================ */
.code-preview-section {
  padding: 80px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.code-preview-section .section-title { margin-bottom: 40px; }
.code-window {
  background: var(--bg-code);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.06);
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.window-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.window-dots span:nth-child(1) { background: #FF5F56; }
.window-dots span:nth-child(2) { background: #FFBD2E; }
.window-dots span:nth-child(3) { background: #27C93F; }
.code-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}
.code-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  background: transparent;
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--font-sans);
}
.code-tab:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.06); }
.code-tab.is-active { color: #fff; background: rgba(255,255,255,0.1); }
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.14s;
  font-family: var(--font-sans);
  flex-shrink: 0;
}
.copy-btn:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.25); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }
.code-panels { position: relative; }
.code-panel { display: none; }
.code-panel.is-active { display: block; }
.code-panel pre {
  margin: 0;
  padding: 28px 32px;
  overflow-x: auto;
}
.code-panel pre code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: #d4d4d4;
  white-space: pre;
}
/* Inline syntax highlights (used in partial HTML) */
.code-panel .c  { color: #6A9955; }  /* comment */
.code-panel .kw { color: #569CD6; }  /* keyword */
.code-panel .fn { color: #DCDCAA; }  /* function */
.code-panel .s  { color: #CE9178; }  /* string */
.code-panel .n  { color: #B5CEA8; }  /* number */

/* ================================================================
   FEATURES
   ================================================================ */
.features-section {
  padding: 96px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card--large {
  grid-column: span 1;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon--blue   { background: #EAF3FB; color: #2070B4; }
.feature-icon--green  { background: #EAF6EC; color: #1E7A34; }
.feature-icon--amber  { background: #FDF5E6; color: #A0680A; }
.feature-icon--purple { background: #F0EDFB; color: #6B40C0; }
.feature-icon--coral  { background: #FAECEA; color: #B34028; }
.feature-icon--teal   { background: #E6FAF3; color: #0C8A62; }
[data-theme="dark"] .feature-icon--blue   { background: rgba(32,112,180,0.15); color: #7AB8E8; }
[data-theme="dark"] .feature-icon--green  { background: rgba(30,122,52,0.15);  color: #6DC882; }
[data-theme="dark"] .feature-icon--amber  { background: rgba(160,104,10,0.15); color: #E0A84A; }
[data-theme="dark"] .feature-icon--purple { background: rgba(107,64,192,0.15); color: #A880F0; }
[data-theme="dark"] .feature-icon--coral  { background: rgba(179,64,40,0.15);  color: #E88070; }
[data-theme="dark"] .feature-icon--teal   { background: rgba(15,168,120,0.15); color: #15D196; }
.feature-card h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
}
.feature-card p code {
  font-size: 13px;
  background: var(--bg-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}
.feature-link {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  margin-top: 14px;
  font-weight: 500;
  transition: gap 0.14s;
}
.feature-link:hover { text-decoration: underline; }

/* ================================================================
   EXAMPLES STRIP
   ================================================================ */
.examples-strip {
  padding: 96px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.examples-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.example-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.18s;
  cursor: pointer;
}
.example-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-2px);
}
.example-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}
.example-tag--vision { background: #EAF3FB; color: #1A5E90; }
.example-tag--nlp    { background: #F0EDFB; color: #5A30A8; }
.example-tag--rl     { background: #FDF5E6; color: #8A5008; }
[data-theme="dark"] .example-tag--vision { background: rgba(26,94,144,0.2);  color: #7AB8E8; }
[data-theme="dark"] .example-tag--nlp    { background: rgba(90,48,168,0.2);  color: #A880F0; }
[data-theme="dark"] .example-tag--rl     { background: rgba(138,80,8,0.2);   color: #E0A84A; }
.example-card h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.example-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  flex: 1;
}
.example-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.colab-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(15,168,120,0.2);
  padding: 3px 9px;
  border-radius: 20px;
  transition: all 0.14s;
}
.example-card:hover .colab-badge { background: var(--accent); color: white; border-color: var(--accent); }
.example-lang {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.examples-cta {
  margin-top: 36px;
  text-align: center;
}

/* ================================================================
   COMMUNITY STRIP
   ================================================================ */
.community-strip {
  padding: 96px 0;
}
.community-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.community-text h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 14px;
}
.community-text p {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 28px;
}
.community-text strong { color: var(--text); font-weight: 500; }
.community-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.community-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-3);
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 12px;
  line-height: 1.6;
}
.footer-brand .nav-logo { margin-bottom: 8px; }
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 13px;
  color: var(--text-3);
  transition: color 0.14s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-bottom p {
  font-size: 12px;
  color: var(--text-3);
}

/* ================================================================
   COMMUNITY GRID (from /community/_index.md)
   ================================================================ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}
.community-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  padding: 24px;
  transition: all 0.18s;
  text-decoration: none !important;
  color: var(--text) !important;
}
.community-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-2px);
}
.community-card svg,
.community-card img {
  margin-bottom: 16px;
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.community-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--heading) !important;
}
.community-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .examples-grid { grid-template-columns: 1fr 1fr; }
  .community-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 32px; height: 32px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; padding: 6px; }
  .nav-hamburger span { width: 100%; height: 1.5px; background: var(--text); border-radius: 1px; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .hero { padding: 64px 0 56px; }
  .features-grid { grid-template-columns: 1fr; }
  .examples-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .community-stats { grid-template-columns: 1fr 1fr; }
  .nav-search-trigger span, .nav-search-trigger kbd { display: none; }
}
