/*
 * Paul Hobson — Brand Token Overrides
 * Editorial type system: Source Serif 4 (display/reading), Inter (body/UI)
 *
 * Loaded after assets/dist/main.css via head.html.
 * Scoped entirely under [data-brand="paul"].
 * Zero impact on other sites.
 */


/* ─── LIGHT MODE (default) ────────────────────────────────────────────── */

[data-brand="paul"] {

  /* Typography */
  --font-display:   'Source Serif 4', Georgia, serif;   /* headings, display text */
  --font-body:      'Inter', system-ui, sans-serif;     /* UI, navigation, metadata */
  --font-read:      'Source Serif 4', Georgia, serif;   /* post/essay prose */
  --font-mono:      'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* --font-heading maps display face to all heading-tagged elements in theme */
  --font-heading:   var(--font-display);

  /* Colour palette — warm neutrals, restrained */
  --black:          #0d0d0c;
  --dark:           #1f1f1e;
  --mid:            #454540;
  --muted:          #8a8a82;
  --rule:           #e0dfd8;
  --paper:          #f8f7f4;
  --white:          #ffffff;

  /* Accent — measured blue, not digital-bright */
  --accent:         #1e3a8a;
  --accent-mid:     #2563eb;
  --accent-light:   #eff6ff;

  /* Map to base token names (keeps Tailwind utilities working) */
  --bg:             var(--white);
  --bg2:            var(--paper);
  --bg3:            #f0eeea;
  --card-bg:        var(--white);
  --text:           var(--black);
  --text-2:         var(--mid);
  --text-3:         var(--muted);
  --text2:          var(--mid);
  --text-muted:     var(--muted);
  --border:         var(--rule);

  /* Sharp corners — editorial, not app-like */
  --radius:         2px;

  /* Type scale — display (Source Serif 4) */
  --text-h1:        3.5rem;       /* 56px — page titles */
  --text-h2:        2rem;         /* 32px — section heads */
  --text-h3:        1.375rem;     /* 22px — sub-sections */
  --text-pull:      1.625rem;     /* 26px — pull quotes */
  --text-num:       2.5rem;       /* 40px — data / numerics */

  /* Type scale — body (Inter) */
  --text-intro:     1.125rem;     /* 18px — lede paragraphs */
  --text-body:      1rem;         /* 16px — body prose */
  --text-small:     0.8125rem;    /* 13px — captions, meta */

  /* Type scale — mono */
  --text-label:     0.6875rem;    /* 11px — caps labels */
  --text-caption:   0.6875rem;    /* 11px — captions */
  --text-code:      0.875rem;     /* 14px — code blocks */

  /* Leading */
  --leading-display: 1.1;         /* Tight — display headings */
  --leading-heading: 1.2;         /* Post titles */
  --leading-intro:   1.65;        /* Comfortable — lede */
  --leading-body:    1.7;         /* Reading — body prose */
  --leading-mono:    1.6;         /* Code blocks */

  /* Tracking */
  --tracking-display: -0.02em;    /* Slightly tightened — headings */
  --tracking-label:    0.12em;    /* Caps labels / section metadata */
  --tracking-subnav:   0.10em;    /* Sub-navigation */

  /* Weights */
  --weight-hero:    700;
  --weight-h2:      600;
  --weight-h3:      600;
  --weight-intro:   300;
  --weight-body:    400;
  --weight-ui:      500;
}


/* ─── HOMEPAGE ────────────────────────────────────────────────────────── */

/* No empty image slot — paul's posts don't use feature images */
[data-brand="paul"] .card-image--no-feature {
  display: none;
}

/* Hero — 2-col editorial layout */
[data-brand="paul"] .hero-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 3.5rem;
}

[data-brand="paul"] .hero-headline {
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

[data-brand="paul"] .hero-sub {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 2rem;
}

/* Hero latest post — right column */
[data-brand="paul"] .ph-hero-latest {
  border-left: 1px solid var(--border);
  padding-left: 2.5rem;
  display: flex;
  align-items: flex-start;
}

[data-brand="paul"] .ph-hero-post {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

[data-brand="paul"] .ph-hero-post:hover {
  border-color: var(--accent);
  background: var(--bg);
}

[data-brand="paul"] .ph-hero-post-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

[data-brand="paul"] .ph-hero-post-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}

[data-brand="paul"] .ph-hero-post-excerpt {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

[data-brand="paul"] .ph-hero-post-read {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.25rem;
}

/* Work list — editorial numbered entries */
[data-brand="paul"] .ph-work-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

[data-brand="paul"] .ph-work-item {
  display: grid;
  grid-template-columns: 2.75rem 1fr auto;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}

[data-brand="paul"] .ph-work-item:hover {
  background: var(--bg2);
  padding-left: 1rem;
  padding-right: 1rem;
  margin: 0 -1rem;
}

[data-brand="paul"] .ph-work-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  padding-top: 0.2rem;
}

[data-brand="paul"] .ph-work-body h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

[data-brand="paul"] .ph-work-body p {
  font-size: 0.875rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.55;
}

[data-brand="paul"] .ph-work-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-3);
  white-space: nowrap;
  text-align: right;
  line-height: 1.4;
}

/* Elsewhere grid — compact 4-up */
[data-brand="paul"] .ph-elsewhere-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  [data-brand="paul"] .ph-elsewhere-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

[data-brand="paul"] .ph-elsewhere-item {
  background: var(--bg);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  display: block;
}

[data-brand="paul"] .ph-elsewhere-item:hover {
  background: var(--bg2);
}

[data-brand="paul"] .ph-elsewhere-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

[data-brand="paul"] .ph-elsewhere-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}

[data-brand="paul"] .ph-elsewhere-desc {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.5;
  display: block;
}

/* ─── DARK MODE ───────────────────────────────────────────────────────── */

[data-brand="paul"][data-theme="dark"] {

  --bg:             #0e0e0d;
  --bg2:            #181817;
  --bg3:            #1f1f1e;
  --card-bg:        #181817;
  --text:           #f0efe8;
  --text-2:         #b0afa6;
  --text-3:         #7a7a72;
  --text2:          #b0afa6;
  --text-muted:     #7a7a72;
  --border:         #2e2e2c;

  --accent:         #3b82f6;
  --accent-light:   #1e2f4a;
}
