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

:root {
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fff;
  --accent: #1d3557;
  --font: system-ui, -apple-system, "Segoe UI", Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px 88px;
}

.accent-bar {
  height: 3px;
  background: var(--accent);
  margin-bottom: 56px;
}

/* ── Header ──────────────────────────────── */
header {
  margin-bottom: 52px;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--accent);
  margin-bottom: 16px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
  font-size: 0.875rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  transition: color 0.15s;
}

.contact-item:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  background: var(--border);
  border-radius: 50%;
  margin: 0 14px;
  flex-shrink: 0;
}

.contact-item:hover {
  color: var(--accent);
}

.contact-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}

/* ── Sections ────────────────────────────── */
section {
  margin-bottom: 52px;
}

h2 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 28px;
}

section > p {
  color: var(--text);
  max-width: 68ch;
  line-height: 1.72;
}

/* ── Entries (experience / education) ───── */
.entry {
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.entry-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.entry-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.entry-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 8px;
  font-style: italic;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #374151;
  line-height: 1.55;
}

ul li:last-child {
  margin-bottom: 0;
}

/* ── Publications ────────────────────────── */
ol.publications {
  list-style: none;
  counter-reset: pub-counter;
  padding: 0;
}

ol.publications li {
  counter-increment: pub-counter;
  padding-left: 2.4em;
  position: relative;
  margin-bottom: 16px;
}

ol.publications li:last-child {
  margin-bottom: 0;
}

ol.publications li::before {
  content: counter(pub-counter) ".";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 0.78rem;
  top: 3px;
  width: 2em;
  text-align: right;
}

.pub-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

a.pub-title {
  color: #1a4a7a;
  transition: color 0.15s;
}

a.pub-title:hover {
  color: var(--accent);
}

.pub-authors {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.pub-venue {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 1px;
}

.pub-links {
  display: inline-flex;
  gap: 6px;
  margin-top: 5px;
}

.pub-link {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 3px;
  padding: 1px 6px 2px;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.pub-link:hover {
  opacity: 1;
}

/* ── Skills ──────────────────────────────── */
.skills-row {
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.55;
}

.skills-row:last-child {
  margin-bottom: 0;
}

/* ── Print ───────────────────────────────── */
@media print {
  body { font-size: 10.5pt; }
  .page { padding: 0; max-width: 100%; }
  .accent-bar { margin-bottom: 32pt; }
  a { color: inherit !important; }
  .pub-link { border: none; padding: 0; font-size: 0.7rem; opacity: 1; }
  .pub-link::before { content: "["; }
  .pub-link::after { content: "]"; }
}

@media (max-width: 600px) {
  .page { padding: 0 22px 64px; }
  .accent-bar { margin-bottom: 40px; }
  header h1 { font-size: 1.8rem; }
  .entry-header { flex-direction: column; gap: 2px; }
  .entry-meta { order: 2; }
  .contact-item:not(:last-child)::after { margin: 0 10px; }
}
