@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Poppins:wght@500;600&display=swap');

/* =========================
   TOKENS
   ========================= */

:root {
  /* Colors */
  --color-bg:             #f7f5f2;
  --color-surface:        #ffffff;
  --color-surface-2:      #f0ede8;
  --color-border:         #dedad4;
  --color-border-soft:    #e8e4df;

  --color-text-primary:   #1a1714;
  --color-text-secondary: #3d3935;
  --color-text-muted:     #3b3b3b;
  --color-text-inverse:   #ffffff;

  --color-accent:         #612B86;
  --color-accent-hover:   #7a36a8;
  --color-green:          #2e7d52;
  --color-nav-selected:   #f2f6fb;

  /* Fonts */
  --font-heading: 'Inter', sans-serif;
  --font-sans:    'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono:    'Poppins', sans-serif;
  --font-eyebrow: 'Poppins', sans-serif;

  /* Layout
     The sidebar is position:sticky — part of normal document flow.
     .app-shell is a flex row; the sidebar takes its natural width
     and .main-content fills the remaining space with flex:1.
     --sidebar-width is the single source of truth for the sidebar column.
     --content-padding is the horizontal breathing room on main-content only. */
  --sidebar-width:   280px;
  --content-padding: 32px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;

  --transition: 200ms ease;
}

/* =========================
   RESET
   ========================= */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
}

a      { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-sans); }
ul     { list-style: none; }

/* =========================
   APP SHELL

   .app-shell    → flex row, full viewport height
   .sidebar      → position:sticky, height:100vh, scrolls as part of flow
   .main-content → flex:1, fills all remaining width;
                   horizontal padding for legibility only —
                   NO max-width cap, content fills all available width.
   ========================= */

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-height: 100vh;
  padding: 0 var(--content-padding);
}

/* =========================
   TYPOGRAPHY
   ========================= */

h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.05;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--color-text-primary);
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-primary);
}

p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* =========================
   SECTION SYSTEM
   ========================= */

.section { margin-bottom: 72px; }

.section-label {
  font-family: var(--font-eyebrow);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

/* =========================
   BUTTONS
   ========================= */

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color var(--transition), color var(--transition);
}
.btn-secondary:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}

/* =========================
   UTILITY
   ========================= */

.stack > * + * { margin-top: var(--space-3); }

/* =========================
   SCROLLBAR
   ========================= */

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

/* =========================
   MOBILE

   Sidebar slides off-screen via sidebar.css (translateX).
   main-content fills the full viewport width naturally
   since the sidebar is out of flow on mobile.
   ========================= */

@media (max-width: 768px) {
  :root {
    --content-padding: 20px;
  }
}