/* ==========================================================================
   Fluid Palette Tech - Product Management & AI | Material Design 3 (M3) System
   ========================================================================== */

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

:root {
  /* Material 3 Light Roles (Clean Minimal Tech Theme) */
  --md-sys-color-primary: #1e40af;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #dbeafe;
  --md-sys-color-on-primary-container: #1e3a8a;

  --md-sys-color-secondary: #0f766e;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #ccfbf1;
  --md-sys-color-on-secondary-container: #115e59;

  --md-sys-color-tertiary: #b45309;
  --md-sys-color-on-tertiary: #ffffff;

  --md-sys-color-background: #f8fafc;
  --md-sys-color-on-background: #0f172a;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #0f172a;
  --md-sys-color-surface-variant: #e2e8f0;
  --md-sys-color-on-surface-variant: #475569;

  --md-sys-color-surface-container-low: #ffffff;
  --md-sys-color-surface-container: #f1f5f9;
  --md-sys-color-surface-container-high: #e2e8f0;
  --md-sys-color-surface-container-highest: #cbd5e1;

  --md-sys-color-outline: #94a3b8;
  --md-sys-color-outline-variant: #e2e8f0;
  --md-sys-color-scrim: rgba(15, 23, 42, 0.5);

  /* Compatibility Mapping */
  --bg-primary: var(--md-sys-color-background);
  --bg-secondary: var(--md-sys-color-surface-container);
  --bg-card: var(--md-sys-color-surface-container-low);
  --bg-header: rgba(248, 250, 252, 0.92);
  --text-main: var(--md-sys-color-on-surface);
  --text-muted: var(--md-sys-color-on-surface-variant);
  --text-light: #64748b;
  --accent-primary: var(--md-sys-color-primary);
  --accent-secondary: var(--md-sys-color-secondary);
  --border-subtle: var(--md-sys-color-outline-variant);

  /* Typography Scale */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Material 3 Elevations */
  --md-elevation-0: none;
  --md-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --md-elevation-2: 0 3px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
  --md-elevation-3: 0 8px 16px rgba(0, 0, 0, 0.10), 0 4px 6px rgba(0, 0, 0, 0.06);
  --md-elevation-4: 0 12px 24px rgba(0, 0, 0, 0.12), 0 6px 8px rgba(0, 0, 0, 0.08);

  /* Material 3 Shapes */
  --md-shape-xs: 4px;
  --md-shape-sm: 8px;
  --md-shape-md: 12px;
  --md-shape-lg: 16px;
  --md-shape-xl: 24px;
  --md-shape-full: 9999px;

  --radius-sm: var(--md-shape-sm);
  --radius-md: var(--md-shape-md);
  --radius-lg: var(--md-shape-lg);
  --radius-full: var(--md-shape-full);

  --transition-smooth: all 0.22s cubic-bezier(0.2, 0, 0, 1);
  --container-max: 1140px;
}

[data-theme="dark"] {
  --md-sys-color-primary: #60a5fa;
  --md-sys-color-on-primary: #0f172a;
  --md-sys-color-primary-container: #1e3a8a;
  --md-sys-color-on-primary-container: #dbeafe;

  --md-sys-color-secondary: #2dd4bf;
  --md-sys-color-on-secondary: #042f2e;
  --md-sys-color-secondary-container: #115e59;
  --md-sys-color-on-secondary-container: #ccfbf1;

  --md-sys-color-background: #090d16;
  --md-sys-color-on-background: #f1f5f9;
  --md-sys-color-surface: #0f172a;
  --md-sys-color-on-surface: #f1f5f9;
  --md-sys-color-surface-variant: #1e293b;
  --md-sys-color-on-surface-variant: #94a3b8;

  --md-sys-color-surface-container-low: #0f172a;
  --md-sys-color-surface-container: #162032;
  --md-sys-color-surface-container-high: #1e293b;
  --md-sys-color-surface-container-highest: #334155;

  --md-sys-color-outline: #475569;
  --md-sys-color-outline-variant: #1e293b;
  --md-sys-color-scrim: rgba(0, 0, 0, 0.75);

  --bg-primary: var(--md-sys-color-background);
  --bg-secondary: var(--md-sys-color-surface-container);
  --bg-card: var(--md-sys-color-surface-container-low);
  --bg-header: rgba(9, 13, 22, 0.92);
  --text-main: var(--md-sys-color-on-surface);
  --text-muted: var(--md-sys-color-on-surface-variant);
  --text-light: #94a3b8;
  --border-subtle: var(--md-sys-color-outline-variant);

  --md-elevation-1: 0 1px 3px rgba(0, 0, 0, 0.4);
  --md-elevation-2: 0 4px 10px rgba(0, 0, 0, 0.5);
  --md-elevation-3: 0 8px 20px rgba(0, 0, 0, 0.6);
}

/* Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--md-sys-color-on-surface);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.98rem;
}

a {
  color: var(--md-sys-color-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Header & Clean Navigation (No Badges/Logos) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  transition: var(--transition-smooth);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}

.brand-title {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-title .brand-main {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  letter-spacing: -0.02em;
}

.brand-title .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-primary);
  font-weight: 600;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  padding: 8px 14px;
  border-radius: var(--md-shape-sm);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container);
}

.nav-link.active {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Material 3 Buttons */
.btn, .md-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--md-shape-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  text-decoration: none;
  line-height: 1;
}

.btn-primary, .md-btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--md-elevation-1);
}

.btn-primary:hover, .md-btn-filled:hover {
  box-shadow: var(--md-elevation-2);
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-secondary, .md-btn-outlined {
  background-color: transparent;
  color: var(--md-sys-color-on-surface);
  border-color: var(--md-sys-color-outline);
}

.btn-secondary:hover, .md-btn-outlined:hover {
  background-color: var(--md-sys-color-surface-container);
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* Theme Toggle Button */
.theme-btn {
  background: var(--md-sys-color-surface-container);
  border: 1px solid var(--md-sys-color-outline-variant);
  width: 38px;
  height: 38px;
  border-radius: var(--md-shape-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--md-sys-color-on-surface);
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}

.theme-btn:hover {
  background: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-outline);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--md-sys-color-surface-container-high);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--md-elevation-3);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
}

/* Material 3 Outlined Inputs */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--md-shape-sm);
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
  background-color: var(--md-sys-color-surface);
}

/* Footer (Compact & Minimal) */
.site-footer {
  background: var(--md-sys-color-surface-container-low);
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 24px 0;
  margin-top: 50px;
}

.footer-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.footer-nav {
  display: flex;
  gap: 16px;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.footer-nav a:hover {
  color: var(--md-sys-color-primary);
}

.footer-copy {
  font-size: 0.80rem;
  color: var(--md-sys-color-outline);
}

@media (max-width: 768px) {
  .footer-compact {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-nav {
    justify-content: center;
    gap: 12px;
  }
}
