:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #183633;
  --muted: #687875;
  --line: #d9dfd9;
  --green: #14665c;
  --coral: #d36a50;
  --white: #fffefa;
  --heading: "Manrope", "DM Sans", sans-serif;
  --body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(#b9c6bd 0.55px, transparent 0.55px);
  background-size: 7px 7px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: inherit;
}

.resume {
  width: min(100% - 64px, 1120px);
  margin: 48px auto;
  padding: 0 64px;
  background: var(--white);
  box-shadow: 0 24px 80px rgb(32 56 47 / 10%);
}

.profile-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 60px;
  min-height: 390px;
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.entry-meta,
.project-topline > span,
.section-number {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #e5f0e9;
}

.eyebrow-divider {
  color: #b0bab3;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(43px, 6vw, 67px);
  font-weight: 800;
  line-height: 1.04;
}

.name-break {
  display: none;
}

.name-period {
  color: var(--coral);
}

.job-title {
  margin-bottom: 13px;
  color: var(--green);
  font-size: 17px;
  font-weight: 700;
}

.header-summary {
  max-width: 450px;
  margin-bottom: 17px;
  color: var(--muted);
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration-color: #a9c4b6;
  text-underline-offset: 4px;
}

.email-link span {
  color: var(--coral);
}

.portrait-wrap {
  position: relative;
  width: 240px;
  margin: 0;
}

.portrait-wrap::before {
  position: absolute;
  z-index: 0;
  top: 13px;
  right: -13px;
  width: 100%;
  height: calc(100% - 20px);
  border: 1px solid #a8c2b1;
  content: "";
}

.portrait {
  position: relative;
  display: block;
  width: 100%;
  height: 270px;
  object-fit: cover;
  object-position: center 38%;
  filter: saturate(0.78);
}

.portrait-wrap figcaption {
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
}

.header-index {
  position: absolute;
  right: 0;
  bottom: 20px;
  color: #9eaaa3;
  font-family: var(--heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.header-index span {
  margin-left: 7px;
  color: var(--coral);
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.8fr);
  gap: 64px;
  padding: 12px 0 38px;
}

.resume-section {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.section-heading {
  padding-top: 2px;
}

.section-number {
  display: block;
  margin-bottom: 5px;
  color: var(--coral);
  font-size: 10px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.section-body > :last-child {
  margin-bottom: 0;
}

.section-body p {
  color: var(--muted);
  font-size: 13px;
}

.section-body .lead {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.timeline-entry + .timeline-entry {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.timeline-entry h3,
.education-entry h3,
.project-entry h3,
.skill-group h3 {
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.section-body .organization {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.timeline-entry ul {
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-entry li + li {
  margin-top: 5px;
}

.project-entry + .project-entry {
  margin-top: 21px;
}

.project-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project-topline > span {
  flex: 0 0 auto;
  font-size: 10px;
}

.project-entry p {
  margin-bottom: 8px;
}

.section-body .project-tools {
  margin-bottom: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.project-tools span {
  padding: 0 4px;
  color: var(--coral);
}

.side-column .resume-section {
  grid-template-columns: 1fr;
  gap: 14px;
}

.skill-group + .skill-group {
  margin-top: 15px;
}

.skill-group h3 {
  margin-bottom: 3px;
  font-size: 12px;
}

.skill-group p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.65;
}

.language-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.language-row:first-of-type {
  margin-top: 18px;
}

.language-row + .language-row {
  margin-top: 9px;
}

.language-row span + span {
  color: var(--muted);
  font-weight: 400;
  text-align: right;
}

.education-entry .entry-meta {
  display: block;
}

.education-entry h3 {
  font-size: 13px;
}

.education-entry .organization {
  margin-bottom: 7px;
}

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

.contact-list {
  display: grid;
  gap: 12px;
  font-style: normal;
}

.contact-list a,
.contact-list p {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 11px;
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-list span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 15px;
  background: #edf3ec;
}

.availability-mark {
  color: var(--coral);
  font-size: 21px;
  line-height: 1;
}

.availability p {
  margin: 0;
  color: var(--green);
  font-family: var(--heading);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.resume-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0 25px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.resume-footer a {
  color: var(--green);
  text-decoration: none;
}

@media (max-width: 800px) {
  .resume {
    width: min(100% - 32px, 680px);
    padding: 0 36px;
    margin: 24px auto;
  }

  .profile-header {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 30px;
    min-height: 340px;
    padding: 48px 0;
  }

  .portrait-wrap {
    width: 190px;
  }

  .portrait {
    height: 230px;
  }

  .resume-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(190px, 0.8fr);
    gap: 32px;
  }

  .resume-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .resume {
    width: 100%;
    margin: 0;
    padding: 0 22px;
    box-shadow: none;
  }

  .profile-header {
    grid-template-columns: minmax(0, 1fr) 112px;
    align-items: start;
    gap: 14px;
    min-height: 0;
    padding: 36px 0 43px;
  }

  .eyebrow {
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  .job-title {
    max-width: 220px;
    font-size: 14px;
    line-height: 1.45;
  }

  .header-summary {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.6;
  }

  .email-link {
    font-size: 11px;
  }

  .portrait-wrap {
    width: 112px;
    margin-top: 29px;
  }

  .portrait {
    height: 148px;
  }

  .portrait-wrap figcaption {
    font-size: 9px;
    line-height: 1.4;
  }

  .header-index {
    bottom: 12px;
  }

  .resume-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0;
  }

  .main-column,
  .side-column {
    display: contents;
  }

  .resume-section,
  .side-column .resume-section {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    padding: 23px 0;
  }

  .section-heading h2 {
    font-size: 14px;
  }

  .section-body .lead {
    font-size: 14px;
  }

  .timeline-entry h3,
  .education-entry h3,
  .project-entry h3 {
    font-size: 13px;
  }

  .availability {
    margin: 20px 0 26px 100px;
  }
}

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  body {
    background: #fff;
    font-size: 10pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

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

  .profile-header {
    min-height: 0;
    padding: 20px 0 28px;
  }

  .resume-grid {
    gap: 36px;
    padding-top: 0;
  }

  .resume-section {
    padding: 17px 0;
    break-inside: avoid;
  }

  .availability,
  .resume-footer a {
    display: none;
  }

  a {
    text-decoration: none;
  }
}