@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../webfonts/fa-solid-900.woff2") format("woff2");
}

:root {
  --marker: #0000cc;
  --rule: #8375ee;
  --rule-fade: rgba(131, 117, 238, 0);
  --card: #f4f4fd;
  --card-border: #deddec;
  --text: #090909;
  --muted: #7d7d7d;
  --dark-gray: #44444a;
  --violet: #8a2be2;
  --magenta: #ff00a8;
  --royal: #4169e1;
  --green: #228b22;
  --sans: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #fbfbff;
  color: var(--text);
  font-size: 16px;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 204, 0.035), rgba(0, 0, 204, 0) 360px),
    #fbfbff;
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.24;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.cv-page {
  display: grid;
  grid-template-columns: minmax(286px, 25%) minmax(0, 1fr);
  column-gap: clamp(34px, 5.2vw, 76px);
  width: min(1480px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
}

.profile-panel {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100svh;
  padding: 48px 28px 44px 0;
  border-right: 1px solid rgba(0, 0, 204, 0.13);
  overflow: auto;
  scrollbar-width: thin;
}

.cv-content {
  max-width: 980px;
  padding: 56px 0 112px;
}

.identity {
  min-width: 0;
}

.name-line {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  margin: 0 0 18px;
  font-family: var(--sans);
}

.name {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.role {
  color: #222;
  font-size: 22px;
  font-weight: 800;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: 17px;
}

.field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.fa {
  display: inline-block;
  color: var(--marker);
  font-family: "Font Awesome 6 Free";
  font-size: 1.02em;
  font-weight: 900;
  line-height: 1;
  text-rendering: auto;
}

.about-block {
  max-width: 100%;
  margin-top: 10px;
}

.label {
  color: var(--marker);
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
}

.about-block p {
  margin: 3px 0 18px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: -4px 0 24px;
  color: #0066d9;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.profile-links span {
  color: #777;
  font-weight: 500;
}

.interest-line {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
}

.interest-violet {
  color: var(--violet);
}

.interest-magenta {
  color: var(--magenta);
}

.interest-green {
  color: var(--green);
}

.interest-royal {
  color: var(--royal);
}

.portrait {
  display: block;
  width: min(220px, 82%);
  aspect-ratio: 210 / 232;
  margin: 0 0 30px;
  object-fit: cover;
  object-position: center;
}

.section {
  margin-top: 58px;
}

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

.section.compact {
  margin-top: 50px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 24px;
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: 0;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 6px;
  margin: 0 0 3px 0;
  background: linear-gradient(90deg, var(--rule), var(--rule-fade));
}

.section-heading .heading-icon {
  color: #000;
  font-size: 0.92em;
}

.rows {
  display: grid;
  gap: 15px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 215px 24px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
}

.date {
  padding-top: 4px;
  text-align: right;
  white-space: nowrap;
}

.bookmark {
  width: 16px;
  height: 25px;
  margin-top: 2px;
  background: var(--marker);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
}

.entry-main {
  min-width: 0;
}

.entry-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
  align-items: baseline;
}

.degree-line,
.entry-title {
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 850;
}

.degree {
  display: inline-block;
  min-width: 76px;
}

.edu-logo {
  width: 28px;
  max-height: 28px;
  margin: 0 15px 0 2px;
  vertical-align: -5px;
  object-fit: contain;
}

.location,
.subtle {
  color: #222;
}

.detail,
.coursework,
.entry-desc,
.intern-desc,
.skill-value {
  font-style: italic;
}

.coursework {
  margin-top: 8px;
}

.pub-list {
  display: grid;
  gap: 14px;
}

.pub-card {
  position: relative;
  min-height: 104px;
  padding: 12px 54px 14px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card);
}

.pub-meta {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(230px, 0.9fr);
  column-gap: 11px;
  align-items: baseline;
  margin-bottom: 8px;
}

.pub-num {
  color: var(--marker);
  font-family: var(--sans);
  font-weight: 850;
}

.authors {
  color: var(--muted);
  font-weight: 600;
}

.authors .me {
  color: var(--marker);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 204, 0.35);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.16em;
}

.venue {
  min-width: 0;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 850;
  text-align: right;
}

.venue.violet {
  color: var(--violet);
}

.venue.magenta {
  color: var(--magenta);
}

.venue.royal {
  color: var(--royal);
}

.venue.green {
  color: var(--green);
}

.pub-title {
  margin: 0 0 5px;
  color: var(--dark-gray);
  font-family: var(--sans);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 850;
}

.pub-note {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.9em;
  font-weight: 400;
}

.pub-abstract {
  margin: 0;
  font-style: italic;
  line-height: 1.24;
}

.pub-link {
  position: absolute;
  right: 18px;
  top: 48px;
  color: #000;
  font-family: "Font Awesome 6 Free";
  font-size: 26px;
  font-weight: 900;
}

.intern-row {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr) auto;
  column-gap: 18px;
  align-items: start;
}

.intern-logo {
  width: 150px;
  max-height: 58px;
  object-fit: contain;
}

.intern-title {
  color: var(--magenta);
  font-family: var(--sans);
  font-size: 25px;
  font-weight: 850;
}

.intern-meta,
.intern-date {
  color: var(--muted);
}

.intern-desc {
  margin-top: 4px;
  max-width: 630px;
  font-size: 18px;
}

.simple-rows {
  display: grid;
  gap: 8px;
}

.simple-row {
  display: grid;
  grid-template-columns: var(--date-col, 72px) 24px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
}

.teaching {
  --date-col: 150px;
}

.simple-row .date {
  padding-top: 0;
}

.simple-row .bookmark {
  margin-top: 0;
}

.award-text,
.skill-label,
.skill-value {
  font-size: 21px;
}

.award-text strong {
  font-weight: 850;
}

.skills .simple-row {
  grid-template-columns: 150px 24px minmax(0, 1fr);
}

.skill-label {
  text-align: right;
}

strong {
  font-weight: 850;
}

@media (max-width: 980px) {
  body {
    font-size: 18px;
    background: #fbfbff;
  }

  .cv-page {
    display: block;
    width: min(100% - 28px, 720px);
    padding: 34px 0 72px;
  }

  .profile-panel {
    position: static;
    height: auto;
    padding: 0 0 34px;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 204, 0.15);
    overflow: visible;
  }

  .cv-content {
    max-width: none;
    padding: 34px 0 0;
  }

  .name-line {
    margin-bottom: 14px;
  }

  .name {
    font-size: 32px;
  }

  .portrait {
    width: 160px;
    height: 176px;
    margin: 0 0 24px;
  }

  .contact-row {
    gap: 14px 28px;
    font-size: 17px;
  }

  .timeline-row,
  .simple-row,
  .teaching .simple-row,
  .skills .simple-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .date,
  .skill-label {
    text-align: left;
  }

  .bookmark {
    display: none;
  }

  .entry-top,
  .pub-meta,
  .intern-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .venue {
    text-align: left;
  }

  .intern-date {
    margin-top: 2px;
  }

  .pub-card {
    padding-right: 42px;
  }

  .pub-link {
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
  }
}

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

  .cv-page {
    display: block;
    width: auto;
  }

  .profile-panel {
    position: static;
    height: auto;
    padding: 0;
    border-right: 0;
  }

  .cv-content {
    max-width: none;
    padding: 0;
  }

  a {
    text-decoration: none;
  }
}
