/*
 * "Bento" — a modular tile grid, the dominant layout trend of the last few
 * years (Apple product pages, dashboards, portfolio sites).
 *
 * Deliberately the inverse of the glass template: light, high contrast and
 * cheap to print, with one accent colour doing all the work. Every tile is
 * break-inside: avoid so a tile is never sliced across a page boundary.
 */

@font-face { font-family: "ClearSans"; src: url("fonts/ClearSans-Regular.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "ClearSans"; src: url("fonts/ClearSans-Medium.ttf")  format("truetype"); font-weight: 500; }
@font-face { font-family: "ClearSans"; src: url("fonts/ClearSans-Bold.ttf")    format("truetype"); font-weight: 700; }
@font-face { font-family: "Spartan";   src: url("fonts/LeagueSpartan-Bold.otf") format("opentype"); font-weight: 700; }

:root {
  /* Overridden per person + template by the injected font choice. */
  --font-body: "ClearSans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Spartan", "ClearSans", sans-serif;

  --ink: #101014;
  --muted: #6b6b76;
  --faint: #9a9aa4;
  --accent: #5b3df5;
  --accent-ink: #ffffff;
  --accent-soft: #efecff;
  --surface: #ffffff;
  --page: #f2f2f5;
  --line: #e4e4ea;
  --radius: 18px;
  --gap: 10px;
}

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

html { background: var(--page); }

body {
  width: 816px;
  padding: 26px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12.2px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- grid -------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 17px;
  break-inside: avoid;
  page-break-inside: avoid;
}
.s2 { grid-column: span 2; }
.s3 { grid-column: span 3; }
.s4 { grid-column: span 4; }

.tile > h2 {
  font-size: 9.6px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 11px;
}

/* ---------- hero -------------------------------------------------------- */
.hero { grid-column: span 3; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: .98;
  letter-spacing: -1.2px;
}
.hero .role { font-size: 13.5px; font-weight: 500; color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 5px 6px; margin-top: 2px; }
.meta span, .meta a {
  font-size: 10.6px;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafafc;
}
.meta a { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

.portrait { padding: 0; overflow: hidden; display: flex; }
.portrait img { width: 100%; height: 100%; min-height: 168px; object-fit: cover; display: block; }

/* ---------- stat tiles -------------------------------------------------- */
.stat { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.stat b {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -1px;
}
.stat span { font-size: 9.6px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.tile.fill { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile.fill span { color: rgba(255,255,255,.72); }

/* ---------- entries ----------------------------------------------------- */
.entry { break-inside: avoid; page-break-inside: avoid; }
.entry + .entry { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.entry .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.entry .name { font-weight: 700; font-size: 12.8px; }
.entry .when { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.entry p { margin-top: 3px; color: var(--muted); font-size: 11.8px; }
.entry a { color: var(--accent); text-decoration: none; font-size: 11px; }

.bio { font-size: 12.6px; color: #2c2c35; }

/* ---------- tags & groups ----------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  padding: 3px 8px;
  font-size: 10.2px;
  color: #35353f;
  background: #f4f4f7;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.group + .group { margin-top: 9px; }
.group h3 { font-size: 9.6px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.group p { font-size: 11.2px; color: var(--muted); }

.rows { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.6px; }
.row span { color: var(--faint); font-size: 10.4px; }

/* ---------- stack ------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 7px; }
.chip { display: flex; align-items: center; gap: 8px; }
.chip img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; flex: none; }
.chip b { font-size: 11.4px; }
.chip span { margin-left: auto; font-size: 9.8px; color: var(--faint); }

.note { font-size: 11.4px; color: var(--muted); }
.note b { color: var(--accent); }
/* ---------- pagination ----------
 * `.entry` above already keeps one job or project whole. These two finish the
 * job: a heading is never left at the foot of a page with its content overleaf,
 * and a paragraph never leaves one or two lines stranded either side of a break.
 */
h1,
h2,
h3,
h4 {
  break-after: avoid;
  page-break-after: avoid;
}

p,
li {
  orphans: 3;
  widows: 3;
}
