/* ================= GLOBAL ================= */

* {
  box-sizing: border-box;
}

:root {
  --text: #252525;
  --subtext: #626262;
  --light-text: #858585;

  --accent: #67a9d3;
  --accent-dark: #438bb9;
  --accent-light: #eaf5fb;

  --line: #e6edf1;
}

body {
  margin: 0;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  color: var(--text);
  background: #ffffff;

  font-size: 16px;
  line-height: 1.65;
}

.container {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 50px;
}



/* ================= PROFILE ================= */

.profile {
  display: flex;
  align-items: center;
  gap: 42px;

  margin-bottom: 78px;
}

.profile-photo {
  width: 185px;
  height: 185px;

  object-fit: cover;
  border-radius: 50%;
}

.profile-info {
  flex: 1;
}

h1 {
  margin: 0 0 7px;

  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.7px;
}

.research-interests {
  margin: 0 0 18px;

  font-size: 16.5px;
  font-weight: 500;
  color: #4d4d4d;
}

.research-interests span {
  margin: 0 5px;
  color: var(--accent);
}

.bio {
  max-width: 620px;

  margin: 0 0 18px;

  color: var(--subtext);
}

.links {
  font-size: 15px;
}

.links span,
.publication-links span {
  margin: 0 5px;
  color: #b3b3b3;
}



/* ================= LINKS ================= */

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

a:hover {
  color: #2777aa;
  text-decoration: underline;
}



/* ================= SECTIONS ================= */

section {
  margin-bottom: 65px;
}

h2 {
  position: relative;

  margin: 0 0 29px;
  padding: 0 0 10px 14px;

  border-bottom: 1px solid var(--line);

  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

h2::before {
  content: "";

  position: absolute;
  left: 0;
  top: 7px;

  width: 4px;
  height: 18px;

  border-radius: 3px;
  background: var(--accent);
}



/* ================= PUBLICATIONS ================= */

.publication {
  display: flex;
  align-items: flex-start;

  gap: 19px;

  margin-bottom: 32px;
}

.publication-number {
  flex-shrink: 0;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 1px;

  border-radius: 9px;

  background: var(--accent-light);
  color: var(--accent-dark);

  font-size: 13px;
  font-weight: 700;
}

.publication-content {
  flex: 1;
}

.publication p {
  margin: 2px 0;
}

.publication-title {
  font-size: 17px;
  font-weight: 620;
  line-height: 1.5;
}

.publication-authors {
  color: #505050;
  font-size: 15px;
}

.publication-authors strong {
  color: var(--text);
}

.publication-venue {
  color: var(--light-text);
  font-size: 15px;
  font-style: italic;
}

.publication-links {
  margin-top: 6px !important;

  font-size: 14px;
  font-weight: 500;
}



/* ================= ITEMS ================= */

.item {
  display: flex;
  justify-content: space-between;

  gap: 35px;

  margin-bottom: 29px;
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-main > strong {
  display: block;

  margin-bottom: 3px;

  font-size: 16.5px;
  font-weight: 620;
  line-height: 1.45;
}

.item-main p {
  margin: 2px 0;

  color: var(--subtext);
}

.item-detail {
  font-size: 14px;
  color: var(--light-text) !important;
}

.item-date {
  flex-shrink: 0;

  padding-top: 1px;

  color: var(--light-text);
  font-size: 14px;

  white-space: nowrap;
}



/* ================= INSTITUTION LOGOS ================= */

.institution-item {
  justify-content: flex-start;
  gap: 17px;
}

.institution-logo-box {
  flex: 0 0 54px;

  width: 54px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-top: 1px;
}

.institution-logo {
  display: block;

  max-width: 62px;
  max-height: 56px;

  width: auto;
  height: auto;

  object-fit: contain;
}


.motif-logo-box {
  flex: 0 0 74px;

  width: 74px;
  height: 82px;

  margin-top: 0;
}

.motif-logo {
  width: 74px;
  max-width: 74px;
  max-height: 82px;

  height: auto;
}

.institution-item .item-date {
  margin-left: auto;
}



/* ================= EDUCATION LOGOS ================= */

.education-section .institution-logo-box {
  flex: 0 0 65px;
  width: 60px;
  height: 60px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;
}

.education-section .institution-logo {
  width: 62px;
  height: 62px;

  max-width: 62px;
  max-height: 62px;

  object-fit: contain;

  transform: scale(1.2);
  transform-origin: center;
}



/* ================= AWARDS ================= */

section:last-of-type .item {
  margin-bottom: 0;
}



/* ================= FOOTER ================= */

footer {
  margin-top: 85px;
  padding-top: 20px;

  border-top: 1px solid var(--line);

  color: #a0a0a0;
  font-size: 13px;
}



/* ================= MOBILE ================= */

@media (max-width: 650px) {

  .container {
    width: min(100% - 36px, 900px);
    padding-top: 45px;
  }

  .profile {
    flex-direction: column;
    align-items: flex-start;

    gap: 25px;

    margin-bottom: 58px;
  }

  .profile-photo {
    width: 145px;
    height: 145px;
  }

  h1 {
    font-size: 32px;
  }

  .publication {
    gap: 13px;
  }

  .publication-number {
    width: 30px;
    height: 30px;

    font-size: 12px;
  }


  /* Institution entries */

  .institution-item {
    display: grid;

    grid-template-columns: 48px 1fr;
    gap: 0 14px;
  }

  .institution-logo-box {
    grid-column: 1;
    grid-row: 1 / span 2;

    width: 48px;
    height: 44px;
  }

  .institution-logo {
    max-width: 46px;
    max-height: 40px;
  }


  .motif-logo-box {
    width: 60px;
    height: 66px;
  }

  .motif-logo {
    width: 60px;
    max-width: 60px;
    max-height: 66px;
  }

  .institution-item .item-main {
    grid-column: 2;
    grid-row: 1;
  }

  .institution-item .item-date {
    grid-column: 2;
    grid-row: 2;

    margin: 5px 0 0;
  }


  /* Education logos on mobile */

.education-section .institution-logo-box {
  width: 54px;
  height: 50px;
}

.education-section .institution-logo {
  width: 50px;
  height: 50px;

  max-width: 50px;
  max-height: 50px;

  transform: none;
}

  /* Awards */

  .item:not(.institution-item) {
    flex-direction: column;
    gap: 3px;
  }

  .item:not(.institution-item) .item-date {
    order: -1;
    margin-bottom: 3px;
  }

}