*,
*:before,
*:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Lato", sans-serif;
  background-color: #1f0450;
}

main {
  padding: 0.8em;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 500px) {
  main {
    padding: 3em;
  }
}

@media (min-width: 920px) {
  main {
    padding: 0;
  }
}

/*=======================*\
||        Home Nav       ||
\*=======================*/

.home-nav {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  padding: 1em 1em 0 1em;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.home-nav-content {
  display: flex;
  align-items: center;
}

.home-nav-content > * {
  margin-right: 10px;
}

.home-nav-button {
  display: flex;
  height: 38px;
  align-items: center;
  padding: 0 0.75em;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  border: 2px solid #504263;
}

.home-nav-button:hover {
  border-color: #8d5ece;
}

/****************************
         Site Header
****************************/

#name-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 388px;
  padding-top: 88px;
  margin-bottom: -120px;
  text-align: center;
  overflow: hidden;
  z-index: -5;
}

#header-canvas {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

#header-text {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  flex-grow: 2;
}

#myname {
  color: #4300ff;
  font-size: 2.3em;
  font-weight: 300;
  line-height: 0.9;
  margin-bottom: 0.2em;
  margin-top: 1em;
}

#header-animating-word-list {
  padding: 0;
  margin: 0;
  font-weight: 900;
  font-size: 1.2em;
  color: #fff;
  height: 2.5em;
}

.word-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-block;
}

.animated-word {
  display: inline-block;
  opacity: 0;
  margin-right: 0.2em;
  transition: opacity 300ms, transform 300ms;
  transform: translateY(10px);
}

.word--transition-in {
  opacity: 1;
  transform: translateY(0);
}

.word--transition-out {
  opacity: 0;
  transform: translateY(-10px);
}

#header-fade {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(to top, #1f0450, transparent);
}

@media (min-width: 500px) {
  #name-header {
    font-size: 1.5em;
    height: 400px;
    margin-bottom: -120px;
    padding-top: 80px;
  }
  #header-fade {
    height: 200px;
  }
}

@media (min-width: 768px) {
  #myname {
    margin-top: 1.5em;
  }
  #name-header {
    font-size: 2.3em;
    height: 700px;
    margin-bottom: -200px;
    padding-top: 0;
  }
  #header-fade {
    height: 200px;
  }
}

@media (min-width: 920px) {
  #name-header {
    font-size: 3em;
    height: 900px;
    margin-bottom: -250px;
  }
  #header-fade {
    height: 300px;
  }
}

/*****************************
      Portfolio Sections
*****************************/

section {
  overflow: auto;
  margin-bottom: 2em;
  --accent: #fff;
}

section header {
  margin-bottom: 1em;
}

section header h2 {
  font-size: 2.3em;
  text-align: center;
  color: var(--accent);
}

section header hr {
  height: 4px;
  border-radius: 0.3em;
  background: var(--accent);
  border: 0;
}

section .project-card-tint {
  background: var(--accent);
}

section .project-card-text h2 {
  color: var(--accent);
}

section .cards {
  display: flex;
  flex-flow: column nowrap;
}

/* Colors & Details */

section.webapps {
  --accent: #f200ff;
}

section.games {
  --accent: #fff600;
}

section.games .project-card-link {
  background: rgba(255, 240, 0, 0.1);
}

section.music {
  --accent: #7af5ff;
}

.section-music .project-card-link {
  background: rgba(122, 245, 255, 0.1);
}

section.listening {
  --accent: #fff600;
}

@media (min-width: 500px) {
  section {
    margin-bottom: 4em;
  }
  section header h2 {
    font-size: 3.3em;
  }
  section header hr {
    margin: 0 0.4em;
  }
  section .cards {
    flex-flow: row wrap;
  }
}

@media (min-width: 768px) {
  section {
    margin-bottom: 5em;
  }
  section header h2 {
    font-size: 4em;
  }
}

@media (min-width: 920px) {
  section {
    margin-bottom: 8em;
  }
  section header h2 {
    font-size: 5em;
  }
}

/*==========================*\
||       Project Card       ||
\*==========================*/

.project-card {
  width: 100%;
  height: 160px;
  margin-bottom: 0.8em;
  position: relative;
  z-index: 2;
}

.project-card-link {
  text-decoration: unset;
  color: #fff;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: left;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 1px 3px 20px rgba(0, 0, 0, 0.2);
}

.project-card-backdrop {
  position: absolute;
  top: -50%;
  bottom: 0;
  left: 0;
  right: 0;
  object-fit: cover;
  object-position: center center;
  height: calc(100% + 200px);
  width: 100%;
  z-index: -2;
  border-radius: 6px;
  transition: filter 300ms;
  transform: translateY(0);
  filter: contrast(0.7) brightness(0.5) grayscale(0.3);
}

.project-card-tint {
  opacity: 0.2;
  transition: opacity 300ms;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: -1;
  border-radius: 6px;
}

.project-card-tags {
  top: 0;
  left: 0;
  position: absolute;
  padding: 1em;
  list-style: none;
}

.project-card-tags .project-card-tag {
  display: inline-block;
  font-size: 0.9em;
  background-color: rgba(242, 0, 255, 0.7);
  border-radius: 5px;
  font-weight: bold;
  padding: 0.2em 0.4em;
  margin: 0 0 0.2em 0;
}

.project-card-text {
  padding: 1.2em;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  transform: translate(0px);
  font-size: 0.9em;
  width: 100%;
}

.project-card-text h2 {
  margin: 0 0 0.1em 0;
}

.project-card-text p {
  font-size: 1.1em;
}

@media (min-width: 600px) {
  .project-card {
    width: 50%;
    height: 300px;
    font-size: 1em;
    margin-bottom: 0;
  }
  .project-card-link {
    top: 0.4em;
    bottom: 0.4em;
    right: 0.4em;
    left: 0.4em;
  }
  .project-card-text {
    padding: 1.2em;
    font-size: 1em;
  }
  .project-card-text h2 {
    margin: 0 0 0.4em 0;
  }
}

@media (min-width: 800px) {
  section.music .project-card {
    width: 33.3333%;
    height: 360px;
  }
  section.webapps .project-card {
    width: 50%;
    height: 360px;
  }
  .project-card-link:hover .project-card-tint {
    opacity: 0.4;
  }
  .project-card-text {
    padding: 1.4em;
  }
}

/*==========================*\
||      Listening Card      ||
\*==========================*/

.listening-cards {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  justify-content: stretch;
}

.listening-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1em 0.4em 0.4em 0.4em;
}

.listening-link a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.listening-link a:hover {
  text-decoration: underline;
}

.listening-card {
  width: 100%;
  position: relative;
  z-index: 2;
  padding: 0.4em;
}

.listening-card-link {
  position: relative;
  display: flex;
  flex-flow: row nowrap;
  background-color: #3c366b;
  border-radius: 6px;
  height: 100%;

  text-decoration: none;
  color: #fff;
  box-shadow: 1px 3px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.listening-card-art {
  position: relative;
  max-width: 160px;
  border-radius: 6px;
}

.listening-card-art img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.listening-card-meta {
  display: flex;
  flex-flow: column nowrap;
  padding: 1em;
  justify-content: flex-start;
}

.listening-card-title {
  font-size: 1.3em;
  font-weight: bold;
}

.listening-card-artist {
  margin-bottom: 1em;
}

.listening-card-review {
  flex: 1 1 100%;
  margin-bottom: 1em;
}

.listening-card-track {
  opacity: 0.6;
}

.listening-card-date {
  margin-bottom: 0.5em;
}

.listening-card-date > span {
  color: #fff;
  opacity: 0.6;
}

@media (min-width: 800px) {
  .listening-cards {
    flex-flow: row wrap;
  }

  .listening-card {
    flex: 0 0 33.3333%;
  }

  .listening-card-link {
    flex-flow: column nowrap;
  }

  .listening-card-art {
    max-width: 100%;
    max-height: unset;
    border-radius: 0;

    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
  }

  .listening-card-meta {
    padding: 1.4em;
    padding-top: 1em;
  }
}
