body {
  margin: 0;
  padding: 0;
  font-family: 'Fira Code', monospace;
  color: var(--text);
  background: var(--bg);
  transition: background 500ms ease-in-out, color 1000ms ease-in-out;
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

button {
  /* inherit color from the nearest parent */
  margin: 0;
  padding: 0;
  font-family: 'Fira Code', monospace;
  font-size: medium;
  color: currentColor; 
  border: none;
  background: transparent;
  cursor: pointer;
}

header {
  padding: 1em;
  background: var(--bg-nav);
  margin-bottom: 1em;
  padding-bottom: 3.5em;
  text-align: center;
  /* oppen in Firefox to click on the clip-path tool (console/styles)*/
  clip-path: polygon(50% 0%, 100% 0, 100% 65%, 50% 100%, 0 65%, 0 0);
}

main {
  height: 100%;
  padding: 2rem;
  max-width: 70%;
  margin: 0 auto;
}

img {
  margin: 1em 0 0;
  width: 180px;
  height: 180px;
}

.footer {
  padding: 1em;
  text-align: center;
  bottom: 0;
  background: var(--bg-nav);
}

/* NAVBAR */

.navbar {
  height: 70px;
  width: 100%;
  background: var(--bg-nav);
  color: var(--text);
}

.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 100%;
}

.dropdown {
  position: absolute;
  width: 360px;
  /* invisible until focused */
  opacity: 0;
  /* z-index greater then parent element, so it appears on top of the navbar */
  z-index: 2;
  background: var(--bg-dropdown);
  border-top: 2px solid var(--border-color);

  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 3rem;
  margin-top: 2rem;
  padding: 0.5rem;

  box-shadow: 0 0.175em 0.5em rgba(2, 8, 20, 0.1);
  transform: translate(-44%, -10%);

  /* when something inside the dropddown is focused,
  the transition here makes the opacity fade in and out when losing focus */
  transition: opacity .15s ease-out;
}

/* detects when a link inside 'dropdown' has been focused */
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
}

.dropdown-item button {
  width: 100%;
  height: 100%;
  size: 0.7rem;
  padding-left: 5px;
  font-size: smaller;
}

/* ::before -> add content before the link text */
.dropdown-item button::before {
  content: ' ';
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

/* Themes: */

/* inside :root we define variables: static values */
:root {
  --gray0: #eeeded;
  --gray1: #dbe1e8;
  --gray2: #b2becd;
  --gray3: #6c7983;
  --gray4: #454e56;
  --gray5: #2a2e35;
  --gray6: #12181b;
  --gold: goldenrod;
  --light-gold: #f8eaab;
  --dark-gold: #B16626;
}

.light {
  --bg: var(--gray0);
  --bg-nav: linear-gradient(to right, var(--gray1), var(--gray3));
  --bg-dropdown: var(--gray0);
  --text: var(--gray6);
  --border-color: var(--gold);
  --bg-solar: var(--dark-gold);
}

.dark {
  --bg: var(--gray4);
  --bg-nav: linear-gradient(to right, var(--gray3), var(--gray6));
  --bg-dropdown: var(--gray3);
  --text: var(--gray0);
  --border-color: var(--gold);
  --bg-solar: var(--light-gold);
}

/* here we overwrite the :root scale for the solarized options */
.solar {
  --gray0: #fffab4;
  --gray1: #ECD155;
  --gray2: #D8AD45;
  --gray3: #C58A36;
  --gray4: #B16626;
  --gray5: #9E4216;
  --gray6: #751a06;
}

#light::before {
  background: #ffffff;
}

#dark::before {
  background: #2a2e35;
}

#solar::before {
  background: var(--bg-solar);
}

@media screen and (max-width: 576px) {
  .dropdown {
    transform: translate(-56%, -13%);
    scale: calc(0.95);
  }

  .footer {
    display: flex;
    flex-direction: column;
  }
}
