:root {
  color-scheme: light;
  --ink: #343e4f;
  --muted: #4b5668;
  --navy: #323c4e;
  --sidebar: #e5e5e5;
  --paper: #fff;
  --line: #263d53;
  --timeline: #88919c;
  --font: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 28px;
  background: #303030;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.48;
}

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

a:hover {
  text-decoration: underline;
}

.resume {
  width: min(100%, 1050px);
  min-height: 1100px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 4px 18px rgb(0 0 0 / 24%);
}

.resume-header {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 218px;
  grid-template-columns: 31% 69%;
  align-items: center;
  background: var(--navy);
  color: #fff;
}

.header-photo-space {
  position: relative;
  height: 100%;
}

.avatar {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 36px;
  display: grid;
  width: 218px;
  aspect-ratio: 1;
  transform: translateY(-18%);
  place-items: center;
  border: 6px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #667287, #252d3b);
  box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
  color: #fff;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 3px;
}

.header-title {
  align-self: center;
  padding: 28px 30px 28px 8px;
}

.header-title h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.15;
}

.header-title p {
  margin: 8px 0 0;
  color: #e0e3e8;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 400;
}

.resume-body {
  display: grid;
  grid-template-columns: 31% 69%;
}

.sidebar {
  min-width: 0;
  padding: 132px 34px 48px;
  background: var(--sidebar);
}

.side-section {
  margin-bottom: 48px;
}

.side-section h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.icon {
  width: 17px;
  flex: 0 0 17px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.bullet-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  list-style: disc;
}

.bullet-list li {
  padding-left: 1px;
}

.bullet-list li::marker {
  color: var(--navy);
}

.main-content {
  min-width: 0;
  padding: 48px 48px 56px 26px;
}

.content-section {
  margin-bottom: 38px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 0;
}

.section-title h2 {
  flex: 1;
  margin: 0;
  padding: 0 0 7px;
  border-bottom: 3px solid var(--line);
  color: var(--navy);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.timeline {
  position: relative;
  margin-left: 16px;
  padding: 10px 0 0 42px;
  border-left: 2px solid var(--timeline);
}

.timeline-entry {
  position: relative;
}

.timeline-entry::before {
  position: absolute;
  top: 6px;
  left: -48px;
  width: 10px;
  height: 10px;
  border: 2px solid #667181;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.timeline-entry p {
  margin: 0;
}

.profile-timeline {
  min-height: 113px;
}

.profile-timeline .timeline-entry p {
  text-align: justify;
}

.projects-section {
  margin-top: 6px;
}

.project-timeline {
  padding-top: 10px;
}

.project {
  margin-bottom: 22px;
}

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

.project h3,
.education-entry h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.project-role {
  margin: 1px 0 10px !important;
  color: var(--muted);
  font-size: 16px;
}

.project ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 21px;
}

.project li {
  padding-left: 2px;
}

.project li::marker {
  color: var(--navy);
}

.education-section {
  margin-top: 42px;
  margin-bottom: 0;
}

.education-icon {
  font-size: 16px;
}

.education-timeline {
  padding-top: 20px;
  padding-bottom: 70px;
}

.education-entry::before {
  top: 4px;
}

.education-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.education-heading h3 {
  max-width: 430px;
}

.date {
  flex: 0 0 auto;
  color: var(--muted);
  white-space: nowrap;
}

.education-entry > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 720px) {
  body {
    padding: 0;
    background: var(--paper);
  }

  .resume {
    min-height: 100vh;
    box-shadow: none;
  }

  .resume-header {
    min-height: 170px;
    grid-template-columns: 30% 70%;
  }

  .avatar {
    left: 18px;
    width: clamp(90px, 23vw, 150px);
    border-width: 4px;
    font-size: 30px;
  }

  .header-title {
    padding-left: 12px;
  }

  .resume-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
    padding: 78px 28px 20px;
  }

  .side-section {
    margin-bottom: 20px;
  }

  .contact-section {
    margin-top: 0;
  }

  .main-content {
    padding: 30px 24px 48px;
  }
}

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

  .resume-header {
    min-height: 145px;
    grid-template-columns: 29% 71%;
  }

  .avatar {
    left: 12px;
    width: 86px;
    font-size: 25px;
  }

  .header-title {
    padding-right: 12px;
  }

  .header-title h1 {
    font-size: 25px;
    letter-spacing: 0;
  }

  .header-title p {
    font-size: 13px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 66px 24px 10px;
  }

  .side-section {
    margin-bottom: 22px;
  }

  .side-section h2,
  .section-title h2 {
    font-size: 19px;
  }

  .main-content {
    padding: 24px 18px 38px;
  }

  .section-title {
    gap: 12px;
  }

  .section-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .timeline {
    margin-left: 14px;
    padding-left: 26px;
  }

  .timeline-entry::before {
    left: -32px;
  }

  .education-heading {
    flex-direction: column;
    gap: 4px;
  }

  .content-section {
    margin-bottom: 30px;
  }
}

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

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

  .resume {
    width: 100%;
    min-height: 0;
    box-shadow: none;
  }

  .resume-header {
    min-height: 165px;
  }

  .avatar {
    width: 170px;
  }

  .sidebar {
    padding-top: 112px;
  }

  .main-content {
    padding: 34px 32px 38px 20px;
  }

  .content-section,
  .timeline-entry {
    break-inside: avoid;
  }
}
