/* Minimal additions on top of new.css. */

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 1rem;
  margin-bottom: 2.5rem;
}

section:last-of-type {
  margin-bottom: 0;
}

small {
  font-weight: 400;
  color: var(--nc-tx-2);
  opacity: 0.75;
}


header {
  text-align: center;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

nav li {
  margin-top: 0;
}

nav a {
  text-decoration: none;
}

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.project-head h3 {
  margin: 0;
  padding: 0;
  border-bottom: none;
}

#projects details {
  margin-bottom: 0.75rem;
}

#projects details img {
  width: 240px;
  max-width: 45%;
  border-radius: 4px;
  float: right;
  margin: 0.5rem 0.75rem 1.25rem 1.75rem;
}

@media (max-width: 600px) {
  #projects details img {
    float: none;
    display: block;
    max-width: 100%;
    margin: 1.25rem auto 1.25rem;
  }
}

#projects .references {
  padding-left: 1.5rem;
  font-size: 0.9rem;
}

#projects .references li {
  margin-bottom: 0.75rem;
}

#projects details.references-block summary {
  font-weight: 400;
}

#projects details.references-block summary .bi {
  margin-right: 0.4rem;
}

.about-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.about-row img {
  width: 200px;
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .about-row {
    flex-direction: column;
    align-items: center;
  }
}

article {
  margin-bottom: 1.25rem;
}

article:last-of-type {
  margin-bottom: 0;
}

article small {
  display: block;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

article h4 {
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

article h4 a {
  text-decoration: none;
  font-weight: 600;
}

article h4 a:hover {
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--nc-lk-1);
  color: var(--nc-lk-tx);
  border-radius: 4px;
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.back-to-top.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.back-to-top:hover {
  background: var(--nc-lk-2);
  color: var(--nc-lk-tx);
}

@media print {
  .back-to-top {
    display: none;
  }

  header nav {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
