@font-face {
  font-family: "David Libre";
  src: url("/fonts/DavidLibre-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: "David Libre", serif;
  font-size: 1.5em;
  line-height: 2.5em;
  margin: 0;
}

h1,
h2 {
  font-weight: 100;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 2rem;
  padding: 0;
  margin: 0;
}

.text {
  text-align: justify;
text-align-last: center;
  padding: 7vh 0;
  width: 700px;
  max-width: 90%;
  margin: 0 auto;
}

body.presentation-mode {
  overflow: hidden;
  height: 100vh;
}

/* Center navigation header and style links */
header {
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  font-size: 2rem;
  padding: 0 0 7vh 0;
  background: none;
  border: none;
  box-shadow: none;
}

header.root {
  padding: 0;
}

.root {
  overflow: hidden;
}

header a {
  display: flex;
  flex: 0 0 128px;
  letter-spacing: 0.15em;
  width: 128px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

body.presentation-mode #present {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  overflow: hidden;
  margin: 0;
  z-index: 9999;
}

body.presentation-mode #present svg.typst-doc {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* SVG basics for embedded docs or assets */
svg.typst-doc {
  width: 96vw;
  height: auto !important;
  display: block;
}

#present {
  display: none;
}

#handout {
  display: block;
}

.card {
  width: 90vw;
  /* height is determined by the image (80vh) + info (auto) */
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
  /*background: #fff;*/
  /*position: relative;*/
  /*margin-bottom: 2rem;*/
  padding: 14vh 0;
}

.cover {
  transition: transform 1s cubic-bezier(0.4, 0.05, 0.2, 1);
}
.cover:hover {
  transform: scale(1.03);
}

.cover {
  width: 100%;
  height: 80vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Only apply 30vh height to images in a .talk.card */
.talk.card .cover {
  height: 33vh;
}

/* Only apply rounded corners to images in a .work.card */
.work.card .cover {
  border-radius: 20px;
}

.work.card {
  position: relative;
}
.work.card .card-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff; /* Or any contrasting color for text over the image */
  /* Optionally add background for readability: */
  /* background: rgba(0,0,0,0.4); */
  pointer-events: none;
}

.work.card .card-info > * {
  margin: 0;
  /* ensures there is no default margin affecting centering */
}

.card-info {
  text-align: center;
}

.card-list {
  width: 100vw;
  display: flex;
  flex-wrap: wrap; /* If you have multiple cards and want them to wrap to the next line */
  justify-content: center; /* Center all cards horizontally */
  gap: 2rem; /* Space between cards, adjust as you like */
  margin: 0 auto;
  padding: 0;
}

/* Reset all default and inherited link styling */
a {
  color: inherit;
  text-decoration: none;
  background: none;
  font-style: normal;
  font-weight: normal;
  border: none;
  outline: none;
  box-shadow: none;
}

.slides {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.art-descr {
  text-align: center;
  padding: 0 0 10vh 0;
}
.series {
  text-align: center;
}
.series-list {
  padding: 7vh 0;
}
.work-img {
  width: 85vw;
  max-width: 90vw;
  margin: 0 auto;
  display: block;
}
.logo {
  text-align: center;
}

.logo > div {
  width: 80vw;
  height: 70vh;
  margin: 0 auto;
  overflow: hidden;
  padding-top: 5vh;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.not-root {
  transform: translateY(-72.5vh);
  margin-bottom: -72.5vh;
}

/*.section-heading {*/
/*text-align: center;*/
/*}*/

@media (max-width: 800px) {
  .show-instruction {
    display: none;
  }
  header a {
    flex: 0 0 64px;
    width: 64px;
  }
  body {
    font-size: 1.2em;

  }
  header {
    padding-top: 20px;
  }
  /*.section-head {*/
  /*padding-top: 15vh;*/
  /*font-size: 1em;*/
  /*}*/

  .talk.card .cover {
    height: 35vh;
  }
}

/*.section-head h1 {*/
/*padding-top: 15vh;*/
/*font-size: 1.4em;*/
/*}*/

.talk .card-info {
  padding-top: 2em;
}

h2.slide-name,
h1.slide-name {
  padding: 0.25em 0;
}

.hidden-h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cover {
  width: 100%;
}

.posts-list {
  display: grid;
  gap: clamp(50px, 10vh, 150px);
  padding: 50px 0;
  width: 90%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .posts-list {
    width: 95%;
  }
  .text {
    /* font-size: clamp(0.8rem, 3vw, 1em); */
  }
  h3 {
    font-size: clamp(0.8rem, 3vw, 1em);
  }
}

/* light and dark mode theme stuff below */
@media (prefers-color-scheme: dark) {
  html,
  body {
    background-color: black;
    color: white;
  }
  body.presentation-mode #present {
    background: black;
  }
  svg,
  img {
    filter: invert(1) hue-rotate(180deg);

  }
body.works {
    background-color: white !important;
    color: black !important;
}
.work-img, .work {
  filter: invert(0) !important;
}

}
