/* "Colors" style: the Bauhaus look from the Personal Design System.
   Every rule is scoped to html[data-style="colors"], so "Classic" (style.css) is untouched. */

:root {
  --c-surface: #ffffff;
  --c-border: #e4e4e2;
  --c-ink: #1c1c1a;
  --c-ink-muted: #5c5c58;
  --c-red: #d7261e;
  --c-yellow: #f2b705;
  --c-blue: #1d3f94;
  --c-blue-light: #2b5bc4;
  --c-green: #1f8a4c;
  --c-cell: #f1f1ef;
  --c-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* Elements that only exist in Colors */
.avatar,
.post-marks,
.tag-filter .shape { display: none; }

/* ---------- Tag shapes (shared by list, filter) ----------
   Kandinsky's Bauhaus pairing, as on the carousels: yellow triangle, red square, blue circle; green quarter circle for culture. */
.shape { display: inline-block; flex: none; width: 10px; height: 10px; background: var(--c-ink-muted); }
.shape-leadership { background: var(--c-yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape-strategy { background: var(--c-blue); border-radius: 50%; }
.shape-life { background: var(--c-red); }
.shape-culture { background: var(--c-green); border-radius: 0 0 0 100%; } /* quarter circle, curve on the outer corner */
/* "All": the four Insights quadrants, as in the avatar */
.shape-all { background: conic-gradient(var(--c-red) 0 25%, var(--c-yellow) 0 50%, var(--c-green) 0 75%, var(--c-blue) 0); }

/* ---------- Base ---------- */
html[data-style="colors"] { font-size: 17px; line-height: 1.6; color: var(--c-ink); background: var(--c-surface); }
html[data-style="colors"] body { font-family: var(--c-sans); }
html[data-style="colors"] a { color: var(--c-blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
html[data-style="colors"] a:focus-visible,
html[data-style="colors"] button:focus-visible { outline: 2px solid var(--c-blue-light); outline-offset: 2px; }

/* ---------- Header ---------- */
html[data-style="colors"] header {
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 4px solid var(--c-ink);
}
html[data-style="colors"] .site-title a {
  display: inline-flex; align-items: center; gap: 12px;
  font: 900 19px/1.1 var(--c-sans); letter-spacing: -0.01em; color: var(--c-ink); text-decoration: none;
}
html[data-style="colors"] .avatar { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
html[data-style="colors"] nav { align-items: center; gap: 24px; flex-wrap: wrap; }
html[data-style="colors"] nav a {
  font: 700 12px/16px var(--c-sans); letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-ink-muted); padding: 4px 0; border-bottom: 3px solid transparent; text-decoration: none;
}
html[data-style="colors"] nav a:hover,
html[data-style="colors"] nav a.active { color: var(--c-ink); }
html[data-style="colors"] nav a.active { border-bottom-color: var(--c-red); }
html[data-style="colors"] nav a.cta { background: var(--c-blue); color: #fff; padding: 8px 14px; border-radius: 4px; border: 0; }
html[data-style="colors"] nav a.cta:hover { background: var(--c-blue-light); }

/* ---------- Home ---------- */
html[data-style="colors"] .intro p { color: var(--c-ink-muted); }
html[data-style="colors"] .intro p a { font-weight: 700; }

html[data-style="colors"] .tag-filter { gap: 8px; margin-bottom: 24px; }
html[data-style="colors"] .tag-filter button {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 12px/16px var(--c-sans); letter-spacing: .04em; text-transform: uppercase;
  background: var(--c-surface); color: var(--c-ink); border: 2px solid var(--c-ink); border-radius: 2px;
  padding: 7px 12px;
}
html[data-style="colors"] .tag-filter button:hover,
html[data-style="colors"] .tag-filter button.active { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
html[data-style="colors"] .tag-filter .shape { display: inline-block; pointer-events: none; }

html[data-style="colors"] .post-list { border-top: 4px solid var(--c-ink); }
html[data-style="colors"] .post-list li,
html[data-style="colors"] .post-list li:first-child {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: ". meta" "mark title" "mark sum"; /* icon starts at the title, not the date */
  column-gap: 16px;
  padding: 24px 0;
  border-top: 0;
  border-bottom: 1px solid var(--c-border);
}
/* Article icon: a fixed 2x2 grid in the Insights layout.
   Top left strategy (blue circle), top right life (red square), bottom left culture (green quarter circle), bottom right leadership (yellow triangle).
   A cell shows its shape only when the article has that tag. */
html[data-style="colors"] .post-marks {
  grid-area: mark; align-self: start; margin-top: 6px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; width: 36px; aspect-ratio: 1; max-width: 100%;
}
html[data-style="colors"] .post-marks .cell { background: var(--c-cell); display: block; min-width: 0; }
html[data-style="colors"] .post-marks .shape { display: block; width: 100%; height: 100%; }
html[data-style="colors"] .post-list li > a {
  grid-area: title;
  font: 700 19px/25px var(--c-sans); letter-spacing: -0.005em; color: var(--c-ink);
  margin: 4px 0 2px; text-wrap: balance;
}
html[data-style="colors"] .post-list li > a:hover { color: var(--c-blue); text-decoration: none; }
html[data-style="colors"] .post-list .post-meta { grid-area: meta; margin: 0; }
html[data-style="colors"] .post-list .post-summary { grid-area: sum; font-size: 16px; color: var(--c-ink-muted); margin: 0; }

/* Meta and tags: small uppercase labels */
html[data-style="colors"] .post-meta {
  font: 700 12px/16px var(--c-sans); letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-ink-muted); gap: 16px;
}
html[data-style="colors"] .tag { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; letter-spacing: inherit; font-weight: 400; } /* lighter than the date */

/* ---------- Essay and About pages ---------- */
html[data-style="colors"] h1 { font: 900 30px/36px var(--c-sans); letter-spacing: -0.01em; text-wrap: balance; margin-bottom: 12px; }
html[data-style="colors"] h2 { font: 700 20px/26px var(--c-sans); letter-spacing: -0.005em; }
html[data-style="colors"] .post-header { padding-bottom: 24px; margin-bottom: 32px; border-bottom: 4px solid var(--c-ink); }
html[data-style="colors"] .about h2 { font-size: 17px; line-height: 24px; }
html[data-style="colors"] .affiliations { color: var(--c-ink-muted); }
html[data-style="colors"] .about-photo { border-radius: 0; }
html[data-style="colors"] th, html[data-style="colors"] td { border-bottom-color: var(--c-border); }

/* ---------- Footer ---------- */
html[data-style="colors"] footer {
  font: 700 12px/16px var(--c-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-muted);
}
html[data-style="colors"] footer hr { border-top: 4px solid var(--c-ink); }
html[data-style="colors"] footer a { color: var(--c-blue); text-decoration: none; }

@media (max-width: 480px) {
  html[data-style="colors"] h1 { font-size: 26px; line-height: 32px; }
  html[data-style="colors"] .post-list li,
  html[data-style="colors"] .post-list li:first-child { grid-template-columns: 28px minmax(0, 1fr); }
  html[data-style="colors"] .post-marks { width: 28px; }
  html[data-style="colors"] .post-list li > a { font-size: 18px; line-height: 24px; }
}

/* ---------- Style selector (both styles) ---------- */
.style-switch {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: inline-flex;
  border: 1px solid #1c1c1a;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28,28,26,0.06), 0 1px 1px rgba(28,28,26,0.04);
  font: 600 11px/14px -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.style-switch button {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  background: #fff; color: #1c1c1a; border: 0; padding: 7px 12px; cursor: pointer;
}
.style-switch button[aria-pressed="true"] { background: #1c1c1a; color: #fff; }
.style-switch button:focus-visible { outline: 2px solid #2b5bc4; outline-offset: -2px; }
html[data-style="colors"] .style-switch { font-family: var(--c-sans); font-weight: 700; border-radius: 2px; }
footer { padding-bottom: 4.5rem; }
