html {
  scroll-behavior: smooth;
}
body {
  /* min-width: 600px; */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.tab-body {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  overflow-y: scroll;
  overflow-x: scroll;
}
.tab-content {
  display: block;
  max-width: 800px;
}
.tab-inbox {
  width: 100%;
  height: 100%;
  border: none;
}
.tab-content::-webkit-scrollbar {
  display: none;
}
body::-webkit-scrollbar {
  display: none;
}
.home-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 48px 0 0 0;
  width: 100%;
  line-height: 1.5;
}
.profile-container {
  display: block;
}
#home {
  top: 100px;
}
#home-profile {
  border-radius: 10px;
}
#contacts {
  font-size: 13px;
}
#contacts a {
  text-decoration: none;
  color: cornflowerblue;
}
#contacts a:visited {
  text-decoration: none;
  color: cornflowerblue;
}
.flexbox {
  display: flex;
  align-items: center;
  gap: 8px;
  height: fit-content;
}
.home-textarea {
  flex: 1;
  display: block;
}

.project-container {
  padding: 100px 0 0 0;
}
.project-item {
  display: flex;
  width: 120;
  padding: 20px 10px;
  gap: 20px;
  border: 1px 0px solid;
  border-radius: 10px;
  align-items: center;
}
.project-item.clickable:hover {
  cursor: pointer;
  background-color: aliceblue;
  -webkit-transition: background-color 300ms linear;
  -ms-transition: background-color 300ms linear;
  transition: background-color 300ms linear;
}
.project-title {
  font-size: 20px;
}
.project-thumbnail {
  display: flex;
  border-radius: 10px;
  width: 156px;
  height: 120px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
img {
  object-fit: cover;
}
.textbox {
  font: size 11px;
}
a {
  text-decoration: none;
  color: cornflowerblue;
}

/* CV Sections */
.cv-section {
  padding: 40px 0 10px 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 10px;
}
.cv-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.cv-item {
  margin-bottom: 18px;
}
.cv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.cv-role {
  color: #444;
  font-style: italic;
}
.cv-location {
  color: #888;
  font-size: 13px;
}
.cv-date {
  color: #888;
  font-size: 13px;
  white-space: nowrap;
}
.cv-pub-title {
  font-weight: 600;
  margin: 0;
}
.cv-bullets {
  margin: 6px 0 0 0;
  padding-left: 20px;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}
.cv-subitem {
  margin: 10px 0 0 12px;
  padding-left: 12px;
  border-left: 2px solid #e0e0e0;
}
.cv-desc {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: #555;
}

/* Publication items */
.pub-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 8px;
  background: #fafafa;
}
.pub-thumbnail {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.pub-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pub-authors {
  font-size: 13px;
  color: #555;
  margin: 0;
}
.pub-venue {
  font-size: 13px;
  color: #888;
  margin: 0;
}
a.pub-item {
  display: flex;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
a.pub-item:hover {
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Print / PDF */
@page {
  size: A4;
  margin: 14mm 12mm;
}

@media print {
  html,
  body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Scrolling wrappers clip content when paginated */
  .tab-body {
    display: block;
    overflow: visible;
  }
  .tab-content {
    max-width: none;
    width: 100%;
  }

  .home-container {
    padding: 0 0 8px 0;
  }
  .home-textarea h2 {
    margin: 0 0 6px 0;
  }
  #home-profile {
    height: 120px;
  }

  /* Keep a heading with the block it introduces */
  .cv-section {
    padding: 14px 0 4px 0;
    margin-top: 4px;
    break-inside: auto;
  }
  .cv-section-title {
    font-size: 14pt;
    margin-bottom: 10px;
    break-after: avoid;
    page-break-after: avoid;
  }

  /* Never split an entry across two pages */
  .cv-item,
  .cv-subitem,
  .pub-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .cv-item {
    margin-bottom: 12px;
  }

  .pub-item {
    margin-bottom: 12px;
    padding: 8px;
    background: #fafafa;
    box-shadow: none;
  }
  .pub-thumbnail {
    width: 110px;
    height: 72px;
  }

  /* Printed links: readable in ink, still clickable in the PDF */
  a,
  a:visited,
  #contacts a,
  #contacts a:visited {
    color: #1a4f9c;
  }
}