/* ============================================================
   COMPONENTS
   ============================================================
   Grouped by the thing they style. Search for a heading to jump.

     1. Quiz          index.html
     2. Resume header resume.html
     3. Experience    resume.html
     4. Cards         advisory, focus areas
     5. Projects      projects.html and resume.html
     6. Education     resume.html
   ============================================================ */


/* --- 1. Quiz ------------------------------------------------ */

.quiz-outer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px var(--gutter);
  text-align: center;
}
.quiz-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  transition: width .35s ease;
  z-index: 5;
}
.quiz-topnav {
  position: fixed;
  top: var(--space-4); left: var(--gutter); right: var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-small);
  color: var(--muted);
}
.quiz-topnav button,
.quiz-topnav a {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--fs-small);
  text-decoration: none;
}
.quiz-topnav button:hover,
.quiz-topnav a:hover { color: var(--ink); }

.quiz-step { max-width: 620px; }

.quiz-eyebrow {
  color: var(--accent-ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  margin-bottom: var(--space-2);
}
.quiz-wave { font-size: 40px; margin-bottom: 18px; }
.quiz-h1 {
  font-family: var(--serif);
  font-size: var(--fs-display);
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.quiz-h1.sm { font-size: 30px; }
.quiz-sub { color: var(--muted); font-size: var(--fs-lead); margin-bottom: 34px; }

.quiz-input {
  width: 100%;
  max-width: 340px;
  padding: var(--space-3) 4px;
  border: none;
  border-bottom: 2px solid var(--border);
  background: transparent;
  font-size: 18px;
  text-align: center;
  color: var(--ink);
  margin-bottom: var(--space-5);
  outline: none;
}
.quiz-input:focus { border-bottom-color: var(--accent); }

.quiz-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--ink);
  color: #fff;
  border: none;
  padding: var(--space-3) 26px;
  border-radius: var(--space-2);
  font-size: var(--fs-lead);
  font-weight: 600;
}
.quiz-btn:hover { background: #000; }

.quiz-hint { margin-top: var(--space-3); font-size: 13px; color: var(--muted-2); }
.quiz-hint kbd {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px var(--space-1);
  font-family: var(--sans);
  background: var(--card);
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  text-align: left;
  margin-top: var(--space-1);
}
#options-theme {
  grid-template-columns: 1fr;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px) { .quiz-options { grid-template-columns: 1fr; } }

.quiz-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px var(--space-4);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  text-align: left;
  width: 100%;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.quiz-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.quiz-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz-card .icon {
  width: 40px; height: 40px;
  border-radius: var(--space-2);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
/* These are spans, not divs, because a <button> may only contain phrasing
   content. Spans are inline by default, so they need display:block to stack
   and to honour margin. Without this the title and description run together
   on one line with no space between them. */
.quiz-card .title {
  display: block;
  font-weight: 700;
  font-size: var(--fs-lead);
  margin-bottom: 4px;
}
.quiz-card .desc {
  display: block;
  font-size: var(--fs-small);
  color: var(--muted);
  line-height: 1.45;
}

.quiz-skip {
  margin-top: 26px;
  font-size: var(--fs-small);
  color: var(--muted-2);
  text-decoration: underline;
  background: none;
  border: none;
}

/* --- 2. Resume header --------------------------------------- */

.intro-banner {
  max-width: var(--measure);
  margin: 26px auto 0;
  padding: 0 var(--gutter);
}
.intro-banner .box {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: #f6f4ee;
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.intro-banner .box .spark { color: var(--accent); font-size: var(--space-4); }
.intro-banner strong { color: var(--accent); font-weight: 700; }

.rheader {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px var(--gutter) var(--space-2);
  display: flex;
  gap: 28px;
  align-items: center;
}
.rheader img.avatar {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  flex-shrink: 0;
}
.rheader .name {
  font-family: var(--serif);
  font-size: var(--fs-name);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.rheader .role {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--fs-lead);
  margin: 4px 0 var(--space-2);
}
.rheader .summary { color: var(--muted); font-size: 15px; max-width: 620px; }
.rheader .contact {
  margin-top: var(--space-3);
  display: flex; flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-small);
  color: var(--muted-2);
}
.rheader .contact a { text-decoration: none; color: var(--muted-2); }
.rheader .contact a:hover { color: var(--accent-ink); }

@media (max-width: 640px) {
  .rheader { flex-direction: column; text-align: center; }
  .rheader .contact { justify-content: center; }
}

/* --- 3. Experience ------------------------------------------ */

.job { margin-bottom: 26px; }
.job-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.job-title { font-weight: 700; font-size: var(--fs-lead); }
.job-co    { color: var(--accent-ink); }
.job-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}
.job-link:hover { text-decoration-color: var(--accent-ink); }
.job-meta    { color: var(--muted-2); font-size: var(--fs-small); white-space: nowrap; }
.job-context { color: var(--muted); font-size: var(--fs-body); margin-bottom: var(--space-2); }

.job-bullets li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  font-size: var(--fs-body);
  color: var(--ink);
  transition: opacity .2s ease;
}
.job-bullets li::before {
  content: "–";
  position: absolute;
  left: 4px;
  color: var(--muted-2);
}
.job-bullets li.starred::before {
  content: "★";
  color: var(--star);
  font-size: 12px;
  left: 2px; top: 1px;
}
.job-bullets li.starred { font-weight: 600; }
.job-bullets li.dim { opacity: .68; font-weight: 400; }

.earlier-roles {
  font-size: var(--fs-small);
  color: var(--muted);
  font-style: italic;
  margin-top: 4px;
}

/* --- 4. Cards: advisory and focus areas --------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.advisory-card,
.focus-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) 18px;
  background: var(--card);
}
.advisory-card.starred { border-color: var(--accent); background: var(--accent-soft); }
.focus-card.starred    { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.advisory-card .t {
  font-weight: 700;
  font-size: var(--fs-body);
  display: flex; align-items: center; gap: var(--space-1);
}
.advisory-card .role { color: var(--muted-2); font-size: var(--fs-micro); margin: 2px 0 var(--space-1); }
.advisory-card .desc { font-size: var(--fs-small); color: var(--muted); }
.advisory-card .star { color: var(--star); font-size: 12px; }

.focus-card .t {
  font-weight: 700;
  font-size: var(--fs-body);
  margin-bottom: var(--space-1);
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-1);
}
.focus-card .tag {
  font-size: 10.5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px var(--space-1);
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.focus-card ul li {
  font-size: 13px;
  color: var(--muted);
  padding-left: var(--space-3);
  position: relative;
  margin-bottom: 4px;
}
.focus-card ul li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--muted-2);
}
.focus-source { font-size: 12px; color: var(--muted-2); margin-top: var(--space-3); }

/* --- 5. Projects --------------------------------------------
   Two densities off one data source and one renderer:
     .project-grid.compact   two-up, used inside the resume
     .project-grid.full      one-up, roomier, the projects hub    */

.project-grid { display: grid; gap: var(--space-3); }
.project-grid.compact { grid-template-columns: 1fr 1fr; }
.project-grid.full    { grid-template-columns: 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .project-grid.compact { grid-template-columns: 1fr; } }

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
}
.project-card.starred { border-color: var(--accent); background: var(--accent-soft); }

.project-card .t {
  font-weight: 700;
  font-size: var(--fs-body);
  display: flex; align-items: center; gap: var(--space-1);
}
.project-title-link { color: inherit; text-decoration: none; }
.project-title-link:hover { color: var(--accent-ink); text-decoration: underline; }

.project-card .tagline {
  font-size: var(--fs-small);
  color: var(--ink);
  margin: var(--space-1) 0 var(--space-1);
  font-style: italic;
}
.project-card .detail {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--space-2);
  flex-grow: 1;
}
.project-card .stack {
  font-size: 11.5px;
  color: var(--accent-ink);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.project-card .plink {
  font-size: var(--fs-micro);
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  align-self: flex-start;
}
.project-card .plink:hover { color: var(--accent-ink); }
.project-card .pnote { font-size: 11.5px; color: var(--muted-2); font-style: italic; }

/* Roomier treatment on the hub page only. */
.project-grid.full .project-card { padding: 26px 28px; }
.project-grid.full .project-card .t       { font-size: 19px; font-family: var(--serif); }
.project-grid.full .project-card .tagline { font-size: var(--fs-lead); }
.project-grid.full .project-card .detail  { font-size: var(--fs-body); max-width: 68ch; }

/* Placeholder for a project that has no live demo yet. */
.project-card .pempty {
  font-size: var(--fs-micro);
  color: var(--muted-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-xs);
  padding: var(--space-1) var(--space-2);
  align-self: flex-start;
}

/* --- 6. Education ------------------------------------------- */

.edu-item { margin-bottom: var(--space-3); }
.edu-item .t   { font-weight: 700; font-size: 15px; }
.edu-item .sub { color: var(--muted); font-size: var(--fs-small); }

/* --- Page intro used on the projects hub -------------------- */

.page-intro {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 44px var(--gutter) var(--space-1);
}
.page-intro h1 {
  font-family: var(--serif);
  font-size: var(--fs-name);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}
.page-intro p {
  color: var(--muted);
  font-size: var(--fs-lead);
  max-width: 62ch;
}
