:root {
  --text: #fffaff;
  --muted: rgba(255, 250, 255, 0.82);

  --glass: rgba(45, 25, 50, 0.25);
  --border: rgba(255, 255, 255, 0.28);

  --sidebar-width: 235px;
}


/* =========================
   BASIC RESET
========================= */

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}


body {
  margin: 0;
  min-height: 100vh;

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.7;


  /* Fixed background */

  background-image:
    linear-gradient(
      rgba(60, 34, 57, 0.08),
      rgba(60, 34, 57, 0.08)
    ),
    url("background.png");

  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}


/* =========================
   TOP NAVIGATION
========================= */

.site-header {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;

  z-index: 100;

  padding: 22px 24px;
}


.nav {
  display: flex;

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

  gap: clamp(22px, 4vw, 55px);
}


.nav a {
  color: white;

  text-decoration: none;

  font-size: 0.9rem;
  font-weight: 600;

  letter-spacing: 0.035em;

  text-shadow:
    0 2px 14px rgba(30, 15, 30, 0.45);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}


.nav a:hover {
  opacity: 0.7;

  transform:
    translateY(-1px);
}


/* =========================
   FIXED PROFILE AREA
========================= */

/*
   This is what keeps the name,
   picture and icons in exactly
   the same place while scrolling.
*/

.profile-sidebar {
  position: fixed;

  left: 0;
  top: 50%;

  transform: translateY(-50%);

  width: var(--sidebar-width);

  padding: 20px 20px;

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  z-index: 90;
}


/* NAME */

.profile-sidebar h1 {
  margin: 0 0 15px 0;

  font-size: 1.65rem;

  line-height: 1.1;

  font-weight: 600;

  letter-spacing: -0.035em;

  color: white;

  text-shadow:
    0 4px 20px rgba(35, 10, 35, 0.4);
}


/* PROFILE PICTURE */

/*
   Smaller than before.
   No circle.
   No cropping.
*/

.profile-picture {
  width: 145px;

  height: auto;

  max-height: 250px;

  display: block;

  object-fit: contain;

  border: none;

  border-radius: 0;

  box-shadow: none;
}


/* =========================
   SOCIAL ICONS
========================= */

.social-links {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 10px;

  margin-top: 17px;
}


.social-links a {
  width: 36px;
  height: 36px;

  display: flex;

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

  color: white;

  text-decoration: none;

  border:
    1px solid rgba(255, 255, 255, 0.38);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.10);

  backdrop-filter: blur(8px);

  -webkit-backdrop-filter: blur(8px);

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}


.social-links a:hover {
  transform:
    translateY(-3px)
    scale(1.06);

  background:
    rgba(255, 255, 255, 0.22);
}


/* LinkedIn, GitHub and Email */

.social-links svg {
  width: 17px;
  height: 17px;

  fill: currentColor;
}


/* Hugging Face */

.huggingface-link {
  line-height: 0;
}


.huggingface-icon {
  width: 18px;
  height: 18px;

  display: block;

  object-fit: contain;
}


/* =========================
   MAIN CONTENT
========================= */

main {
  margin-left: var(--sidebar-width);

  padding-top: 45px;
}


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

.content-section {
  width:
    min(
      900px,
      calc(100% - 70px)
    );

  margin: 0 auto;

  padding: 115px 0;

  min-height: 90vh;

  display: flex;

  align-items: center;
}


/* =========================
   GLASS CARDS
========================= */

.glass-card {
  width: 100%;

  padding:
    clamp(30px, 5vw, 58px);

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

  border-radius: 28px;

  background:
    var(--glass);

  backdrop-filter:
    blur(16px);

  -webkit-backdrop-filter:
    blur(16px);

  box-shadow:
    0 20px 70px
    rgba(35, 10, 35, 0.18);
}


.glass-card h2 {
  margin: 0 0 28px;

  font-size:
    clamp(2rem, 5vw, 3.2rem);

  line-height: 1.1;

  letter-spacing: -0.035em;
}


.glass-card h3 {
  margin:
    38px 0 12px;

  font-size: 1.35rem;
}


.glass-card p {
  color: var(--muted);

  margin:
    0 0 18px;
}


/* =========================
   CV
========================= */

.cv-section {
  min-height: auto;
}


.cv-card {
  padding-top: 42px;
  padding-bottom: 42px;
}


/* CV title + link */

.section-heading-row {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 28px;
}


.section-heading-row h2 {
  margin: 0;
}


.cv-link {
  display: inline-block;

  color: white;

  text-decoration: none;

  padding:
    5px 15px;

  border:
    1px solid rgba(255, 255, 255, 0.35);

  border-radius: 999px;

  font-size: 0.85rem;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.cv-link:hover {
  background:
    rgba(255, 255, 255, 0.16);

  transform:
    translateY(-1px);
}


/* CV categories */

.cv-block {
  margin-bottom: 28px;
}


.cv-block:last-child {
  margin-bottom: 0;
}


.cv-block h3 {
  margin:
    0 0 12px;

  font-size: 1.1rem;

  color: white;
}


/* Individual CV entry */

.cv-item {
  display: grid;

  grid-template-columns:
    155px 1fr;

  gap: 20px;

  padding:
    13px 0;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.14);
}


.cv-date {
  color:
    rgba(255, 255, 255, 0.68);

  font-size: 0.86rem;
}


.cv-description {
  display: flex;

  flex-direction: column;

  gap: 1px;
}


.cv-description strong {
  color: white;

  font-weight: 600;
}


.cv-description span {
  color: var(--muted);

  font-size: 0.92rem;
}


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

.publication {
  padding:
    25px 0;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.17);
}


.publication h3 {
  margin:
    0 0 8px;

  font-size: 1.25rem;

  line-height: 1.45;
}


.publication h3 a {
  color: white;

  text-decoration: none;
}


.publication h3 a:hover {
  text-decoration: underline;
}


.authors {
  margin:
    0 0 5px;
}


.authors a {
  color: white;

  text-decoration: none;
}


.authors a:hover {
  text-decoration: underline;
}


.venue {
  margin:
    0 0 5px;

  opacity: 0.75;

  font-size: 0.95rem;
}


/* Publication buttons */

.paper-links {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 13px;
}


.paper-links a {
  color: white;

  text-decoration: none;

  padding:
    4px 13px;

  border:
    1px solid
    rgba(255, 255, 255, 0.3);

  border-radius: 999px;

  font-size: 0.85rem;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}


.paper-links a:hover {
  background:
    rgba(255, 255, 255, 0.16);

  transform:
    translateY(-1px);
}


/* =========================
   UPDATES
========================= */

.update {
  display: grid;

  grid-template-columns:
    90px 1fr;

  gap: 20px;

  padding:
    22px 0;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.17);
}


.update p {
  margin: 0;
}


.date {
  font-weight: 700;

  color: white;
}


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

footer {
  margin-left:
    var(--sidebar-width);

  padding:
    35px 20px 50px;

  text-align: center;

  color:
    rgba(255, 255, 255, 0.65);

  font-size: 0.85rem;
}


/* =========================
   TABLET
========================= */

@media (max-width: 850px) {

  :root {
    --sidebar-width: 190px;
  }


  .profile-picture {
    width: 120px;

    max-height: 220px;
  }


  .profile-sidebar h1 {
    font-size: 1.4rem;
  }


  .social-links {
    gap: 7px;
  }


  .social-links a {
    width: 33px;
    height: 33px;
  }


  .social-links svg {
    width: 15px;
    height: 15px;
  }


  .huggingface-icon {
    width: 16px;
    height: 16px;
  }


  .nav {
    gap: 20px;
  }


  .nav a {
    font-size: 0.8rem;
  }
}


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

@media (max-width: 650px) {

  .site-header {
    padding: 15px 12px;
  }


  .nav {
    gap: 13px;

    flex-wrap: wrap;
  }


  .nav a {
    font-size: 0.72rem;
  }


  /*
     On small screens the profile
     becomes part of the normal page
     because there isn't enough room
     for a fixed sidebar.
  */

  .profile-sidebar {
    position: relative;

    top: auto;
    left: auto;

    transform: none;

    width: 100%;

    padding:
      100px 20px 20px;
  }


  .profile-sidebar h1 {
    font-size: 1.65rem;

    margin-bottom: 12px;
  }


  .profile-picture {
    width: 125px;

    max-height: 220px;
  }


  .social-links {
    margin-top: 14px;
  }


  main {
    margin-left: 0;

    padding-top: 0;
  }


  .content-section {
    width:
      calc(100% - 24px);

    min-height: auto;

    padding:
      45px 0;
  }


  .glass-card {
    border-radius: 22px;

    padding:
      28px 24px;
  }


  .glass-card h2 {
    font-size: 2.2rem;
  }


  /* CV becomes stacked on phones */

  .section-heading-row {
    align-items: flex-start;
  }


  .cv-item {
    grid-template-columns: 1fr;

    gap: 2px;
  }


  .cv-date {
    font-size: 0.8rem;

    margin-bottom: 2px;
  }


  /* Updates */

  .update {
    grid-template-columns: 1fr;

    gap: 0;
  }


  footer {
    margin-left: 0;
  }

}
