/* Styles for aolmo.github.io. Icons: Font Awesome Free 5.15.4 (CC BY 4.0). */

:root {
  --bg: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #2563eb;
  --logo-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --text: #e4e4e7;
    --muted: #a1a1aa;
    --line: #27272a;
    --accent: #60a5fa;
    --logo-bg: #f4f4f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }

.icon { height: 1em; width: auto; vertical-align: -0.125em; }

.wrap { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
/* Laptops and larger: use more of the screen. Phones and tablets keep 760px. */
@media (min-width: 1024px) { .wrap { max-width: 940px; } }

/* ---- Header ---- */

header { display: flex; gap: 28px; align-items: center; margin-bottom: 40px; }
header img {
  display: block;
  width: 112px;
  height: 112px;
  flex: none;
  /* Rounded square, same proportions as the 44px logos (10px corners). */
  border-radius: 25px;
  object-fit: cover;
  object-position: 50% 0%;  /* top of the photo: keeps the whole head in frame */
}
h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h1 a, h1 a:hover { color: inherit; text-decoration: none; }
.role { margin: 6px 0 14px; color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
}
.links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---- Sections: label in a left gutter, content on the right ---- */

section {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
h2 {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
section p { margin: 0 0 14px; }
section p:last-child { margin-bottom: 0; }

.item { margin-bottom: 22px; }
.item:last-child { margin-bottom: 0; }
.item-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.item-title { font-weight: 600; }
.date { color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.org { color: var(--muted); }
.desc { margin-top: 4px; }
.grow { flex: 1; }
.edu.has-desc { align-items: flex-start; }

/* Experience entries reuse the education row (.edu): logo left of title and company.
   `logo-full` logos have their own background, so they fill the tile edge to edge. */
.edu img.logo-full { padding: 0; background: none; }
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.edu + .desc { margin-top: 8px; }

.edu { display: flex; gap: 14px; align-items: center; }
.edu img {
  width: 44px;
  height: 44px;
  flex: none;
  padding: 4px;
  border-radius: 10px;
  background: var(--logo-bg);
  object-fit: contain;
}

/* Publications: small number in a narrow gutter, with a faint rule between the
   number and the paper; both turn the accent colour on hover. */
.pubs { counter-reset: pub; }
.pubs > .item { position: relative; padding: 2px 0 2px 40px; margin-bottom: 22px; }
.pubs > .item:last-child { margin-bottom: 0; }
.pubs > .item::before {
  counter-increment: pub;
  content: counter(pub, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  text-align: right;
  color: var(--muted);
  opacity: 0.65;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s, opacity 0.15s;
}
.pubs > .item::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background-color 0.15s;
}
.pubs > .item:hover::before { color: var(--accent); opacity: 1; }
.pubs > .item:hover::after { background: var(--accent); }
/* On wide screens, pull the list into the column gap so the numbers sit closer
   to the "Publications" label (the label column only stacks on small screens). */
@media (min-width: 641px) { .pubs { margin-left: -36px; } }

.pub-title { font-weight: 600; color: var(--text); }
.pub-title:hover { color: var(--accent); }
.authors { color: var(--muted); font-size: 15px; }
.me-author { color: var(--text); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 14px; }
.venue { color: var(--muted); font-style: italic; }

/* ---- Footer ---- */

footer {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer p { margin: 0 0 6px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

/* ---- Small screens ---- */

@media (max-width: 640px) {
  .wrap { padding: 40px 16px 64px; }
  header { flex-direction: column; align-items: flex-start; gap: 18px; }
  section { grid-template-columns: 1fr; gap: 12px; }
  .item-head { flex-direction: column; gap: 0; }
}

@media print {
  .wrap { padding: 0; max-width: none; }
  .links a { border: 0; padding: 0; }
}
