:root {
  color-scheme: light dark;
  --bg-color: whitesmoke;
  --text-color: black;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1e1e1e;
    --text-color: whitesmoke;
  }
}

body,
html {
  font-family: "NotoSerif";
  margin: auto;
  text-align: center;
  padding: 0;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 1%);
  background-color: var(--bg-color);
  color: var(--text-color);
}

.slide-content {
  text-align: center;

  h1 {
    font-size: 22vh;
    font-size: 22dvh;
    font-family: "Roboto";
    color: var(--text-color);
  }
}

.links {
  a {
    text-decoration: none;
    color: var(--text-color);
  }
  a:visited {
    color: var(--text-color);
  }
  a::before {
    content: "☞";
    font-weight: bold;
    padding-right: 0.4rem;
  }

  .slide-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.skill-matrix {
  text-align: center;
  margin: 0 auto;
  padding-top: 1rem;
  padding-bottom: 1rem;

  table {
    border-collapse: collapse;
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
  }

  th {
    text-align: center;
  }

  td {
    text-align: left;
    padding: 0.2rem;
    white-space: nowrap;
  }

  td.skillmatrix-category {
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid;
  }

  td:nth-child(2) {
    text-align: right;
    padding-right: 1rem;
    padding-left: 1rem;
  }
  td:nth-child(3) {
    text-align: center;
    padding-right: 1rem;
    padding-left: 1rem;
  }
  td:nth-child(4) {
    padding-left: 2rem;
    text-align: left;
  }
}

:root {
  --carousel-nav-btn--bg-color: rgba(255, 255, 255, 0);
  --carousel-nav-btn--bg-color-hover: rgba(0, 0, 0, 0.1);
  --carousel-nav-btn--text-color: rgba(0, 0, 0, 0.2);
  --carousel-nav-btn--text-color-hover: rgba(0, 0, 0, 0.8);
  --carousel-nav-btn--width: 1rem;
  --carousel-dot-container--bg-color: rgba(255, 255, 255, 0);
  --carousel-dot-container--dot-color: rgba(0, 0, 0, 0.2);
  --carousel-dot-container--dot-color-active: rgba(0, 0, 0, 0.8);
  --carousel-dot-container--dot-color-hover: rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root {
    --carousel-nav-btn--bg-color: rgba(255, 255, 255, 0);
    --carousel-nav-btn--bg-color-hover: rgba(255, 255, 255, 0.1);
    --carousel-nav-btn--text-color: rgba(255, 255, 255, 0.1);
    --carousel-nav-btn--text-color-hover: rgba(255, 255, 255, 0.6);
    --carousel-nav-btn--width: 1rem;
    --carousel-dot-container--bg-color: rgba(255, 255, 255, 0);
    --carousel-dot-container--dot-color: rgba(255, 255, 255, 0.1);
    --carousel-dot-container--dot-color-active: rgba(255, 255, 255, 0.6);
    --carousel-dot-container--dot-color-hover: rgba(255, 255, 255, 0.6);
  }
}

carousel {
  display: inline-block;
  position: relative;
  width: 100%;
  height: 100%;

  .carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
  }

  .carousel-nav-btn {
    display: inline-block;
    width: var(--carousel-nav-btn--width);
    height: 100%;
    background-color: var(--carousel-nav-btn--bg-color);
    color: var(--carousel-nav-btn--text-color);
    border: none;
    transition: all 0.2s;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    z-index: 2;
    &:hover {
      background-color: var(--carousel-nav-btn--bg-color-hover);
      color: var(--carousel-nav-btn--text-color-hover);
      cursor: pointer;
    }
    &.left {
      position: absolute;
      top: 0;
      left: 0;
    }
    &.right {
      position: absolute;
      top: 0;
      right: 0;
    }
  }

  .slides-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: none;
    opacity: 0;
    transition: all 0.2s;
    z-index: 0;
    &.visible {
      visibility: visible;
      opacity: 1;
      z-index: 1;
    }
  }

  .carousel-dot-container {
    position: absolute;
    left: calc(var(--carousel-nav-btn--width));
    bottom: 0;
    width: calc(100% - (2 * var(--carousel-nav-btn--width)));
    height: 2rem;
    background-color: var(--carousel-dot-container--bg-color);
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
  }

  .dot {
    display: inline-block;
    color: black;
    background-color: var(--carousel-dot-container--dot-color);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 0.5rem;
    &.active {
      background-color: var(--carousel-dot-container--dot-color-active);
    }
    &:hover {
      cursor: pointer;
      background-color: var(--carousel-dot-container--dot-color-hover);
    }
  }
}
