:root {
  --white: #ffffff;
  --light-grey: #dce0e8;
  --black: #181825;
  --dark-black: #11111b;
  --grey: #8c8fa1;
  --green: #5a931b;
  --links: #235e70;
}

@media (prefers-color-scheme: dark) {
  body {
    color: var(--light-grey);
    background-color: var(--black);
  }

  .dark-mode {
    display: inline-block;
  }

  .light-mode {
    display: none;
  }

  .item button {
    color: var(--black);
    background-color: var(--light-grey);
  }
}

@media (prefers-color-scheme: light) {
  body {
    color: var(--black);
    background-color: var(--white);
  }

  .dark-mode {
    display: none;
  }

  .light-mode {
    display: inline-block;
  }

  .item button {
    color: var(--light-grey);
    background-color: var(--black);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif;
  font-size: 18px;
}

header {
  background-color: var(--green);
  color: var(--white);
  font-size: 16px;
  height: 20px;
  width: 100%;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
}

a {
  color: var(--links);
}

a:hover {
  color: var(--links);
}

a:visited {
  color: var(--links);
}

header a {
  text-decoration: none;
  color: var(--white);
}

header a:hover {
  text-decoration: none;
  color: var(--white);
}

header a:visited {
  text-decoration: none;
  color: var(--white);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 50px;
  box-sizing: border-box;
}

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 20px);
  max-height: calc(100vh - 20px);
  text-align: center;
  margin: 0;
  font-size: 24px;
}

.command {
  font-family: 'Lucida Console', monospace;
  width: 100%;
  max-width: 400px;
  font-size: 17px;
  display: inline;
  text-align: left;
}

.contact {
  width: 100%;
  max-width: 400px;
  display: inline-block;
  text-align: left;
  font-size: 18px;
  margin: 0;
}


.logo {
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
}

hr {
  border: none;
  height: 2px;
  background-color: var(--grey);
  width: 100%;
  margin: 30px auto;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 280px);
  width: 100%;
  gap: 10px;
  margin-bottom: 100px;
}

.item {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin: 2px;
  border: solid var(--grey);
  border-radius: 20px;
}


.item-grid a:hover {
  color: inherit;
  border-width: 3px;
  margin: 0;
}

.item-grid a:visited {
  color: inherit;
}

.item div {
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item button {
  width: 50%;
  margin: 10px auto;
  border-radius: 2px;
  border: none;
  padding: 5px;
  transition: 0.3s ease-in-out;
}

.item button:hover {
  cursor: pointer;
  opacity: 0.8;
}


/* Conway's game of life */
#grid {
  border-collapse: collapse;
  visibility: hidden;
  width: 90%;
  margin: 0 auto;
}

#grid td {
  border: 0.5px solid;
  width: 1px;
  height: 1px;
}

@media (prefers-color-scheme: dark) {
  #grid td {
    border-color: white;
  }

  .filled {
    background-color: white;
  }
}

@media (prefers-color-scheme: light) {
  #grid td {
    border-color: black;
  }

  .filled {
    background-color: black;
  }
}


#restart {
  display: none
}
