/* General page layout */

body {
  background: #ffffff;
  color: #2f3542;
  font-size: 17px;
  line-height: 1.65;
}

html {
  scroll-behavior: smooth;
}

/* Make Quarto page wider */

main.content {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

/* Navbar */

.navbar {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1030;
}

#quarto-header.headroom,
#quarto-header.headroom--pinned,
#quarto-header.headroom--unpinned {
  transform: translateY(0) !important;
}

.navbar .navbar-nav .nav-link {
  font-weight: 600;
}

/* Hero block */

.cv-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.cv-photo img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid #2f3542;
}

.cv-intro h1 {
  font-size: 3rem;
  line-height: 1.05;
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-weight: 800;
}

.cv-intro p {
  max-width: 760px;
}

.cv-intro > p:first-of-type {
  color: #2f3542;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.cv-affiliation {
  margin-top: 0.8rem;
  color: #2f3542;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.cv-affiliation p,
.cv-links p {
  margin-bottom: 0;
}

.cv-links {
  margin-top: 1.15rem;
}

.cv-links p {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.cv-link,
.cv-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #f8fafc;
  color: #2f3542;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.15;
}

.cv-link-icon {
  width: 0.95rem;
  height: 0.95rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.cv-links a:hover {
  background: #eef6f5;
  border-color: #b7d8d1;
  color: #16836f;
  text-decoration: none;
}

/* Headings */

h2 {
  scroll-margin-top: 6rem;
  margin-top: 2.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #52AB98;
  font-size: 1.85rem;
  font-weight: 800;
}

h3 {
  scroll-margin-top: 6rem;
  margin-top: 1.8rem;
  font-size: 1.35rem;
  font-weight: 750;
}

/* Education */

.education-list {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.4rem;
}

.education-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: center;
  padding: 0.35rem 0 1.35rem;
  border-bottom: 1px solid #e5e7eb;
}

.education-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.education-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  min-height: 88px;
}

.education-logo img {
  display: block;
  max-width: 104px;
  max-height: 76px;
  object-fit: contain;
}

.education-text p {
  margin-bottom: 0;
}

.education-text strong {
  display: inline-block;
  margin-bottom: 0.15rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

/* Right table of contents */

#TOC {
  font-size: 0.9rem;
  line-height: 1.35;
}

#TOC ul.collapse {
  display: block;
  height: auto;
  visibility: visible;
}

#TOC ul {
  list-style: none;
  padding-left: 0;
}

#toc-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

#TOC .nav-link {
  color: #4b5563;
  border-left: 2px solid #d1d5db;
  padding: 0.25rem 0;
  padding-left: 0.85rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

#TOC .nav-link.active,
#TOC .nav-link:hover {
  color: #18bc9c;
  border-left-color: #18bc9c;
  text-decoration: none;
}

/* Links */

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Publications */

#refs {
  margin-top: 1.35rem;
}

#refs.hanging-indent,
#refs .csl-entry {
  margin-left: 0;
  padding-left: 0;
  text-indent: 0;
}

#refs .csl-entry {
  margin-bottom: 1rem;
}

#refs a {
  color: #4b5563;
  overflow-wrap: anywhere;
}

#refs a:hover {
  color: #18bc9c;
  text-decoration: none;
}

/* Lists */

ul {
  padding-left: 1.4rem;
}

/* Cards for future project blocks */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1rem;
}

.cv-card {
  padding: 1.2rem 1.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cv-card h3 {
  margin-top: 0;
}

/* Mobile */

@media (max-width: 800px) {
  main.content {
    padding: 2rem 1.1rem;
  }

  .cv-hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
  }

  .cv-photo img {
    width: 170px;
    height: 170px;
  }

  .cv-intro h1 {
    font-size: 2.3rem;
  }

  .education-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .education-logo {
    width: 72px;
    min-height: 64px;
    justify-content: flex-start;
  }

  .education-logo img {
    max-width: 68px;
    max-height: 52px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}


/* Tech skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.skill-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.035);
  line-height: 1.35;
}

.skill-card p {
  margin: 0;
}

.skill-card strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.98rem;
  line-height: 1.25;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.skill-tags p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.tag {
  display: inline-block;
  margin: 0;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #d7e0e7;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #374151;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
