:root {
  color-scheme: light;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #5c6b7a;
  --line: #d8e0ea;
  --accent: #0a66c2;
  --accent-dark: #084c91;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-dark); }

.page {
  display: grid;
  grid-template-columns: 220px minmax(0, 900px);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem;
}

.index {
  align-self: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(27, 39, 51, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
  position: sticky;
  top: 2rem;
}

.profile-picture {
  align-self: center;
  border: 4px solid #e8f1fb;
  border-radius: 50%;
  display: block;
  height: 140px;
  margin-bottom: 0.65rem;
  object-fit: cover;
  width: 140px;
}

.index a {
  border-radius: 10px;
  color: var(--text);
  font-weight: 650;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.index a:hover,
.index a:focus {
  background: #e8f1fb;
  color: var(--accent-dark);
}

.resume {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(27, 39, 51, 0.08);
  padding: 2.5rem;
}

.hero {
  border-bottom: 3px solid var(--accent);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.eyebrow,
.date {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
}

h1, h2, h3, h4, h5 { line-height: 1.25; }

h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  margin: 0;
}

h2 {
  border-bottom: 1px solid var(--line);
  font-size: 1.8rem;
  margin-top: 0;
  padding-bottom: 0.4rem;
}

h3 { font-size: 1.35rem; margin-bottom: 0.2rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.25rem; }
h5 { font-size: 1rem; margin-bottom: 0.2rem; }

.section {
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  scroll-margin-top: 1.5rem;
}

.section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.role,
.item {
  border-left: 4px solid #dbeafe;
  margin-top: 1.5rem;
  padding-left: 1rem;
}

.contact-list {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-list div { min-width: 0; }
.contact-list dt { color: var(--muted); font-weight: 700; }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }

ul { padding-left: 1.4rem; }

@media (max-width: 780px) {
  .page {
    display: block;
    padding: 1rem;
  }

  .index {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    position: static;
  }

  .profile-picture {
    height: 72px;
    margin-bottom: 0;
    width: 72px;
  }

  .index a { font-size: 0.92rem; }

  .resume { padding: 1.25rem; }

  .contact-list { grid-template-columns: 1fr; }
}

@media print {
  @page {
    size: letter;
    margin: 0.5in;
  }

  body { background: #fff; }

  body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
  }

  .page {
    display: block;
    max-width: none;
    padding: 0;
  }

  .index { display: none; }

  .resume {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  h2,
  h3,
  h4,
  h5 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .section,
  .role,
  .item,
  .contact-list div {
    break-inside: avoid;
    page-break-inside: avoid;
  }

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