:root {
  --scrollbar-size: 0px;

  --color-main-back: hsl(0, 0%, 20%);
  --color-main-text: hsl(0, 0%, 90%);
  --color-header-back: hsl(0, 0%, 18%);
  --color-panel-back: hsl(0, 0%, 15%);
  --color-card-back: hsl(0 0% 14% / 1);
  --color-card-back-hover: hsl(0 0% 18% / 1);
  --color-card-text: hsl(0 0% 80% / 1);
  --color-card-text-darker: hsl(0 0% 60% / 1);
  --color-lesser-text: hsl(0, 0%, 70%);
  --color-button-back: hsla(0, 0%, 0%, 0.3);
  --color-button-text: hsl(0, 0%, 100%);
  --color-link: hsl(0, 0%, 65%);
  --color-scroll-track: hsl(0 0% 0% / 0.06);
  --color-scroll-thumb: hsl(0 0% 40% / 1);
  --color-scroll-thumb-hover: hsl(0 0% 30% / 1);
}

body,
html {
  margin: 0;
}

body {
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--color-main-back);
  color: var(--color-main-text);
}

a,
app-link-external {
  color: var(--color-link);
}

header {
  padding: 0.5em;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-header-back);
  border-bottom: 1px solid var(--color-panel-back);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8);

  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5em;
}
header a {
  color: var(--color-link);
  text-decoration: none;
}

footer {
  padding: 1em;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.5em;
}

footer > a {
  color: var(--color-link);
  text-decoration: none;
}

footer > a:not(:first-child)::before {
  content: "|";
  display: inline-block;
  margin-right: 0.5em;
}


.item-button {
  font-size: 1.2em;
  margin-top: 0.85em;
}

.item-container .item-button:last-child {
  margin-bottom: 0.85em;
}

.item-button a,
.item-button button {
  background-color: var(--color-button-back);
  display: inline-block;
  font-size: inherit;
  font-weight: 100;
  color: var(--color-button-text);
  border: none;
  padding: 0.75em 3em;
  opacity: 0.7;
  cursor: pointer;
  text-decoration: none;
}

.item-button a:hover,
.item-button a:focus,
.item-button button:hover,
.item-button button:focus {
  opacity: 0.8;
}

.item-button a:active,
.item-button button:active {
  opacity: 0.9;
}


@media (max-width: 780px) {
  header {
    grid-template-columns: auto 1fr;
  }

  .header-brand {
    display: none;
  }

  .hide-on-mobile {
    display: none;
  }
}

/*### Scrollbar ############## */

/* not all and (hover: none) is a funky workaround for touch input */
@media not all and (hover: none) {
  :root {
    --scrollbar-size: 8px;
  }

  /* size */
  ::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: var(--color-scroll-track);
    border-radius: 8px;
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: var(--color-scroll-thumb);
    border-radius: 8px;
    padding-left: 100px;
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-scroll-thumb);
  }
}
