/* ============================================================
   Command+Tab — Design Tokens
   Color, Typography, Wordmark, Card system
   Source: uploads/cmdtab-design-spec.html (v1.0, May 2026)
   ============================================================ */

/* ---- Webfonts ---------------------------------
   Libre Baskerville and Inter are self-hosted from /fonts/ as
   variable-axis TTFs. Italic Inter has its own variable file.
   On this site Inter is used ONLY by the Command+Tab wordmark
   (--font-sans); the page's own fonts are set in personal.css.
*/
@font-face {
  font-family: 'Libre Baskerville';
  src: url('fonts/LibreBaskerville-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/LibreBaskerville-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Libre Baskerville';
  src: url('fonts/LibreBaskerville-Italic-VariableFont_wght.ttf') format('truetype-variations'),
       url('fonts/LibreBaskerville-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz_wght.ttf') format('truetype-variations'),
       url('fonts/Inter-VariableFont_opsz_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont_opsz_wght.ttf') format('truetype-variations'),
       url('fonts/Inter-Italic-VariableFont_opsz_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---------- Color: Core palette ---------- */
  --ct-purple:        #3D2260; /* Deep violet — primary brand color, dark-mode bg, light-mode primary text */
  --ct-sage-dark:     #8FBF96; /* Sage on dark backgrounds */
  --ct-sage-light:    #5A9464; /* Sage on light backgrounds (a11y) */
  --ct-cream:         #F5F2EE; /* Warm off-white surface, blog body bg, primary text on dark */
  --ct-lavender-bg:   #EDE8F5; /* Light Mode A background */
  --ct-lavender-bg-b: #D9D0ED; /* Light Mode B background (deeper lavender) */
  --ct-lavender-text: #B8B0C8; /* Secondary text on dark */
  --ct-muted-purple:  #6B5480; /* Secondary text on light */
  --ct-rule-light:    #E0D8EE; /* Hairline rule, dividers on light */
  --ct-ink:           #1A1A1A; /* Body copy on white/cream */
  --ct-body-gray:     #3D3D3D; /* Article body alt */

  /* ---------- Color: Category accents (extension palette) ----------
     Used ONLY in category-coded motifs and category eyebrows.
     Sage remains the primary brand accent; these are tertiaries.
  */
  --cat-hcd:       #5A9464; /* same as sage-light — HCD is the original */
  --cat-hcd-dark:  #8FBF96;
  --cat-data:          #4A8B9E; /* cool teal — used for the Data category (formerly Tableau) */
  --cat-data-dark:     #7AB8C9;
  --cat-art:           #C97B5C; /* warm terracotta */
  --cat-art-dark:      #E0997C;
  --cat-business:      #B8954A; /* muted gold */
  --cat-business-dark: #D4B36A;


  --bg:               var(--ct-purple);
  --bg-elevated:      #4A2D72;       /* slightly lifted card on dark */
  --surface:          var(--ct-cream);
  --fg1:              var(--ct-cream);          /* primary text */
  --fg2:              var(--ct-lavender-text);  /* secondary text */
  --accent:           var(--ct-sage-dark);
  --accent-soft-bg:   rgba(143, 191, 150, 0.12);
  --accent-soft-bd:   rgba(143, 191, 150, 0.35);
  --rule:             rgba(245, 242, 238, 0.15);
  --rule-strong:      rgba(245, 242, 238, 0.30);

  /* ---------- Typography: Families ---------- */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---------- Typography: Scale (px) ---------- */
  --fs-display:   52px; /* Cover / hero headline */
  --fs-h1:        32px;
  --fs-h2:        28px;
  --fs-h3:        24px;
  --fs-headline:  20px; /* Card headline */
  --fs-body-lg:   17px;
  --fs-body:      15px;
  --fs-small:     13px;
  --fs-xs:        0.8rem;
  --fs-micro:     0.8rem; /* Labels / category pills */
  --fs-eyebrow:   0.8rem;

  /* Line heights */
  --lh-tight:  1.1;
  --lh-snug:   1.25;
  --lh-normal: 1.5;
  --lh-body:   1.7;
  --lh-prose:  1.75;

  /* Letter spacing */
  --tracking-tight:  -0.01em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.1em;
  --tracking-cap-lg: 0.12em;

  /* ---------- Spacing (8pt base, with 4pt half-step) ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
  --sp-11: 72px;
  --sp-12: 96px;

  /* ---------- Radii ---------- */
  --radius-xs: 3px;   /* favicon-scale icon container */
  --radius-sm: 4px;   /* small chips, tags */
  --radius-md: 6px;   /* inputs */
  --radius-lg: 8px;   /* swatches, buttons */
  --radius-xl: 10px;  /* cards (default) */
  --radius-2xl: 12px; /* large cards / hero */
  --radius-pill: 999px;

  /* ---------- Shadow / Elevation ----------
     Brand is mostly flat. Shadows are subtle, used sparingly.
  */
  --shadow-1: 0 1px 2px rgba(61, 34, 96, 0.06);
  --shadow-2: 0 4px 14px rgba(61, 34, 96, 0.08);
  --shadow-3: 0 12px 32px rgba(61, 34, 96, 0.14);
  --shadow-focus: 0 0 0 3px rgba(143, 191, 150, 0.45);
}

/* ---- Light-mode override -------------------------------------
   Apply by adding `data-theme="light"` to a parent (or html).
   Light Mode A is default light variant.
*/
[data-theme="light"] {
  --bg:          var(--ct-lavender-bg);
  --bg-elevated: #F4EFFB;
  --surface:     var(--ct-cream);
  --fg1:         var(--ct-purple);
  --fg2:         var(--ct-muted-purple);
  --accent:      var(--ct-sage-light);
  --accent-soft-bg: rgba(90, 148, 100, 0.12);
  --accent-soft-bd: rgba(90, 148, 100, 0.45);
  --rule:        rgba(61, 34, 96, 0.12);
  --rule-strong: rgba(61, 34, 96, 0.20);
}

/* Light B variant (deeper lavender background) */
[data-theme="light-b"] {
  --bg:          var(--ct-lavender-bg-b);
  --bg-elevated: #E5DBF2;
  --surface:     var(--ct-cream);
  --fg1:         var(--ct-purple);
  --fg2:         var(--ct-muted-purple);
  --accent:      var(--ct-sage-light);
  --accent-soft-bg: rgba(90, 148, 100, 0.12);
  --accent-soft-bd: rgba(90, 148, 100, 0.45);
  --rule:        rgba(61, 34, 96, 0.15);
  --rule-strong: rgba(61, 34, 96, 0.25);
}

/* Cream / blog body theme — for long-form article surfaces */
[data-theme="cream"] {
  --bg:          var(--ct-cream);
  --bg-elevated: #FFFFFF;
  --surface:     #FFFFFF;
  --fg1:         var(--ct-ink);
  --fg2:         var(--ct-muted-purple);
  --accent:      var(--ct-sage-light);
  --accent-soft-bg: rgba(90, 148, 100, 0.12);
  --accent-soft-bd: rgba(90, 148, 100, 0.45);
  --rule:        rgba(61, 34, 96, 0.10);
  --rule-strong: rgba(61, 34, 96, 0.18);
}

/* ============================================================
   Semantic typography classes
   ============================================================ */

.ct-display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--fg1);
  letter-spacing: var(--tracking-tight);
}

.ct-h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg1);
}

.ct-h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg1);
}

.ct-h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--lh-snug);
  color: var(--fg1);
}

.ct-headline {
  font-family: var(--font-serif);
  font-size: var(--fs-headline);
  font-weight: 700;
  line-height: var(--lh-snug);
  color: var(--fg1);
}

/* Editorial italic — card "Part X of Y" labels, accents */
.ct-italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--accent);
}

.ct-body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-prose);
  color: var(--fg1);
}

.ct-body-secondary {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--fg2);
}

.ct-meta {
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 400;
  color: var(--fg2);
}

/* Eyebrow / category label — tracked uppercase Inter SemiBold */
.ct-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-cap-lg);
  text-transform: uppercase;
  color: var(--accent);
}

/* Section number (e.g. "01") */
.ct-section-num {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-cap-lg);
  text-transform: uppercase;
  color: var(--accent);
}

/* Inline code chip */
.ct-mono {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  background: #F0EBF8;
  color: var(--ct-purple);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Wordmark
   "COMMAND" (Inter 600, tracked, caps) + "+" (Inter 400, sage)
   + "Tab" (Libre Baskerville 700 italic). Ratio ~82% command:tab.
   ============================================================ */

.ct-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}
.ct-wordmark .wm-cmd {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg1);
}
.ct-wordmark .wm-plus {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--accent);
}
.ct-wordmark .wm-tab {
  font-family: var(--font-serif);
  font-weight: 700;
  font-style: italic;
  color: var(--fg1);
}

/* Wordmark scale variants */
.ct-wordmark--sm   .wm-cmd { font-size: 0.8rem; }
.ct-wordmark--sm   .wm-plus { font-size: 14px; }
.ct-wordmark--sm   .wm-tab { font-size: 15px; }

.ct-wordmark--md   .wm-cmd { font-size: 14px; }
.ct-wordmark--md   .wm-plus { font-size: 16px; }
.ct-wordmark--md   .wm-tab { font-size: 17px; }

.ct-wordmark--lg   .wm-cmd { font-size: 18px; }
.ct-wordmark--lg   .wm-plus { font-size: 20px; }
.ct-wordmark--lg   .wm-tab { font-size: 22px; }

.ct-wordmark--xl   .wm-cmd { font-size: 24px; letter-spacing: 0.08em; }
.ct-wordmark--xl   .wm-plus { font-size: 26px; }
.ct-wordmark--xl   .wm-tab { font-size: 29px; }

.ct-wordmark--display .wm-cmd { font-size: 32px; letter-spacing: 0.06em; }
.ct-wordmark--display .wm-plus { font-size: 34px; }
.ct-wordmark--display .wm-tab { font-size: 39px; }

/* ============================================================
   Reusable element rules
   ============================================================ */

/* Page-level reset helper */
.ct-page {
  background: var(--bg);
  color: var(--fg1);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* Hairline divider */
.ct-rule { height: 1px; background: var(--rule); border: 0; }

/* Sage 28×3 accent bar — used in LinkedIn cards / hero */
.ct-accent-bar {
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Category pill (sage outline + tinted bg) */
.ct-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--tracking-cap-lg);
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft-bg);
  border: 1px solid var(--accent-soft-bd);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

/* Promo card (default landscape) */
.ct-card {
  background: var(--bg);
  color: var(--fg1);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
}
.ct-card--light { background: var(--ct-lavender-bg); color: var(--ct-purple); }
.ct-card--square { aspect-ratio: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; }
