:root {
  color-scheme: light;
  --ink: #26333d;
  --muted: #6e7b84;
  --accent: #2f6f8f;
  --accent-dark: #225b78;
  --accent-soft: #edf4f7;
  --line: #d7e0e5;
  --paper: #ffffff;
  --background: #f4f7f8;
  --shadow: 0 20px 60px rgba(31, 52, 65, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.52;
  -webkit-font-smoothing: antialiased;
}

p,
ul {
  margin-top: 0;
}

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

.resume {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
  overflow: hidden;
  border: 1px solid #e1e7ea;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 38px 42px 34px;
  border-top: 8px solid var(--accent);
  border-bottom: 1px solid var(--line);
}

.hero__photo {
  display: block;
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
}

.hero h1 {
  margin: -4px 0 3px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.hero__role {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1.08rem;
  font-weight: 750;
}

.hero__domains {
  margin: 2px 0 0;
  color: var(--accent-dark);
  font-weight: 650;
}

.hero__facts {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero__summary {
  max-width: 790px;
}

.hero__summary p {
  margin-bottom: 5px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 150px;
  padding-top: 3px;
  text-align: center;
}

.download {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 22px rgba(47, 111, 143, 0.20);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.download:hover {
  background: var(--accent-dark);
}

.pdf-link {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resume__grid {
  display: grid;
  grid-template-columns: 31% minmax(0, 1fr);
}

.sidebar {
  padding: 30px 30px 38px 42px;
  background: var(--accent-soft);
}

.content {
  padding: 30px 42px 38px;
}

.section + .section {
  margin-top: 28px;
}

.section h2 {
  margin: 0 0 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid #b9cbd4;
  color: var(--accent-dark);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section h3 {
  margin: 0;
}

.job + .job {
  margin-top: 17px;
}

.job h3,
.education-item h3 {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.28;
}

.job p,
.education-item p,
.earlier {
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.38;
}

.job__date {
  margin: 2px 0 1px !important;
  color: var(--accent-dark);
  font-weight: 700;
}

.job p:last-child {
  color: var(--muted);
  font-style: italic;
}

.earlier {
  margin-top: 18px;
  color: #53636d;
}

.education-item + .education-item {
  margin-top: 16px;
}

.result-group + .result-group {
  margin-top: 24px;
}

.subheading {
  margin-bottom: 8px !important;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.result-group p {
  margin-bottom: 7px;
}

ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

li + li {
  margin-top: 7px;
}

.content li,
.content p {
  font-size: 0.93rem;
}

.compact h2 {
  margin-bottom: 10px;
}

.tags,
.teaching-orgs {
  margin-bottom: 4px;
}

.teaching-orgs {
  font-weight: 650;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfc;
  font-size: 0.78rem;
}

.footer a {
  color: inherit;
}

.download:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 111, 143, 0.28);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 112px minmax(0, 1fr);
    padding: 30px 30px 28px;
  }

  .hero__photo {
    width: 112px;
    height: 112px;
  }

  .hero__actions {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
    text-align: left;
  }

  .resume__grid {
    grid-template-columns: 35% minmax(0, 1fr);
  }

  .sidebar {
    padding: 28px 24px 34px 30px;
  }

  .content {
    padding: 28px 30px 34px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .resume {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    padding: 24px 20px 23px;
  }

  .hero__photo {
    width: 86px;
    height: 86px;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .hero__role,
  .hero__domains {
    font-size: 0.93rem;
  }

  .hero__facts {
    margin-bottom: 14px;
    font-size: 0.82rem;
  }

  .hero__summary,
  .hero__actions {
    grid-column: 1 / -1;
  }

  .hero__summary {
    margin-top: 4px;
  }

  .hero__actions {
    margin-top: 2px;
  }

  .download {
    min-height: 42px;
  }

  .resume__grid {
    display: block;
  }

  .sidebar,
  .content {
    padding: 26px 20px 30px;
  }

  .content {
    border-top: 1px solid var(--line);
  }

  .footer {
    flex-direction: column;
    gap: 5px;
    padding: 16px 20px;
  }
}

@media print {
  body,
  html {
    background: #fff;
  }

  .resume {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hero__actions,
  .footer {
    display: none;
  }
}
