:root {
  /* Michigan-inspired blue & maize on a white canvas */
  --bg: #ffffff;          /* page background */
  --fg: #0a0f1f;          /* primary text (near-UM blue but readable) */
  --muted: #4b5672;       /* secondary text */
  --link: #75037b;       /* accessible blue for links */
  --accent: ##f1c71d;      /* maize accent */
  --card: #ffffff;        /* cards stay white to keep a clean page */
  --border: #ffffff;      /* subtle border */
  --radius: 14px;
  --maxw: 980px;
}
@media (prefers-color-scheme: dark) {
  /* Force the same white / blue / maize palette even if the user prefers dark mode */
  :root {
    --bg: #ffffff;       /* keep page background white */
    --fg: #0a0f1f;       /* dark readable text */
    --muted: #4b5672;    /* secondary text */
    --link: #75037b;    /* accessible blue for links */
    --card: #ffffff;     /* cards stay white */
    --border: #e3e7ef;   /* subtle border */
    --accent: #f1c71d;   /* maize accent */
  }
}
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  display: flex;
  justify-content: center;
}
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ===== Layout ===== */
.wrap { width: 100%; max-width: var(--maxw); padding: 2.5rem 1.2rem 4rem; }
header { display:flex; align-items:center; gap:1.2rem; margin-bottom: 1.5rem; }

/* Larger avatar (desktop) */
.avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Keep avatar reasonably sized on small screens */
@media (max-width: 640px) {
  /* Stack header vertically on small screens so the avatar appears first,
     followed by h1, h2, p, and badges */
  header {
    flex-direction: column;
    align-items: center;   /* center avatar and text */
    gap: .6rem;
  }

  .avatar {
    width: 160px;
    height: 160px;
    flex: 0 0 auto;
  }

  /* Title and meta should flow under the avatar */
  .title {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
  }

  .title h1 { font-size: clamp(1.4rem, 6vw, 1.8rem); margin: 0; }
  .title h2 { margin-top: 0; }
  .title p  { margin-bottom: 0.6rem; }

  /* Make badges wrap and center beneath the intro text */
  .linksbar {
    margin-top: .4rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
}

.title {align-items: center; align-content: center;}
.title h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0;}
.title h2 { font-size: 1.3rem; color:#a38409; margin: 0;}
.title p { margin: .3rem 0 1rem; color: rgb(87, 87, 87); }

/* Callouts */
.badge {display:inline-flex; gap:.5ch; align-items:center; padding:.2rem .6rem; border-radius:999px; background: var(--card); border:1px solid var(--border); font-size:.9rem; }

/* Sections */
section { margin-top: 2rem; }
section h2 { font-size: 1.3rem; letter-spacing:.2px; margin: 0 0 .8rem; color: rgb(13, 13, 101);}
.intro { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding:1rem 1.2rem; }

/* CV button aligned to the right inside the introduction card */
.intro .cv-row { margin-top: 1rem; text-align: left; }

/* On narrow screens keep the button left-aligned for better flow */
@media (max-width: 640px) {
  .intro .cv-row { text-align: left; }
}

/* Projects grid */
.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.card h3 { font-size: 1.1rem; margin:.2rem 0 .4rem; }
.meta { color: var(--muted); font-size:0.95rem; margin-top: 0.2rem; margin-bottom: 0.2rem; }
.actions { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:.8rem; }
.btn { display:inline-flex; align-items:center; gap:.5ch; border:1px solid var(--border); background: #fff0; padding:.45rem .75rem; border-radius: 10px; text-decoration:none; }

/* Publications (horizontal cards) */
.hlist { display:flex; flex-direction:column; gap:1rem; }
.hcard { display:flex; gap:1rem; align-items:flex-start; padding:1rem; border:1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.hcard .stamp { flex:0 0 auto;  border-radius:12px; display:grid; place-items:center; /* border removed to avoid outline around emoji */ font-size: 1.4rem; border: none; background: transparent; }
.hcard .content { flex:1 1 auto; min-width:0; }
.hcard h3 { margin:.1rem 0 .2rem; font-size:1.1rem; }
.hcard .meta { margin:.2rem 0 .4rem; }
.hcard p { margin:.2rem 0 .2rem; }
@media (min-width: 760px) {
  .hlist { gap:1.2rem; }
  .hcard { padding:1rem 1.2rem; }
}

/* Footer / Links */
.links { display:flex; flex-wrap: wrap; gap:.6rem; }

/* Spotlight list — maize + Michigan blue themed cards */
.spotlight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.spotlight-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  align-items: var(--spotlight-align, flex-start); /* default, overridable by class */
  background: linear-gradient(90deg, rgba(255,203,5,0.06), rgba(0,39,76,0.01));
  border: 1px solid rgba(0,39,76,0.06);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: var(--fg);
  font-size: 0.98rem;
}

/* When JS marks an item single-line, vertically center content */
.spotlight-item.single-line {
  --spotlight-align: center;
}

.spotlight-item .marker {
  flex: 0 0 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--accent);         /* maize square */
  color: var(--michigan-blue);       /* blue text on maize */
  font-weight: 700;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04) inset;
}

.spotlight-item strong { color: var(--michigan-blue); }

/* make text flow nicely on small viewports */
@media (max-width: 640px) {
  .spotlight-item { padding: 0.6rem; gap: 0.6rem; }
  .spotlight-item .marker { flex-basis: 40px; height: 40px; font-size: 0.9rem; }
}

/* optional: subtle hover for interactive feel */
.spotlight-item:hover {
  transform: translateY(-2px);
  transition: transform 120ms ease;
}

/* Print: hide nav‑like pieces, keep a clean CV‑ish page */
@media print {
  .badge, .actions, .linksbar { display:none !important; }
  body { background:#fff; color:#000; }
  a { color:#000; text-decoration: none; }
  .wrap { padding: 0; }
  .card, .intro { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
