header {
  text-align: center;
  position: relative;
  height: 100vh;
}

header.js-fixed {
  height: 110vh;
}

.header-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  align-items: start;
}

header h1 {
  font-size: 4rem;
  margin: 0;
}

header h1 p {
  position: relative;
  font: inherit;
  margin: 0;
  width: -moz-fit-content;
  width: fit-content;
  font-weight: 800;
  text-align: left;
  line-height: 130%;
  letter-spacing: -0.03em;
}

header h2 {
  max-width: 65ch;
  font-weight: 200;
  color: var(--shade-500);
  margin: 0;
}

header .fixed-header {
  position: absolute;
  height: 100vh;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

header.js-fixed .fixed-header {
  position: fixed;
}

header.js-fixed .fixed-header.scrolled {
  position: absolute;
  top: auto;
  bottom: 0;
}

header .fixed-header:before {
  content: "";
  z-index: -1;
  position: absolute;
  background-color: var(--shade-100);
  width: 100%;
  height: 50%;
  margin: auto;
  bottom: 0;
  left: 0;
}

header .header-text {
  position: relative;
}

.scroll-button {
  position: absolute;
  bottom: 0;
  padding: 2rem 0;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  transition: opacity 250ms;
}

.fixed-header.scrolled .scroll-button {
  opacity: 0;
}

.scroll-button .arrow {
  margin-right: 0.25rem;
}

.scroll-button:hover .arrow,
.scroll-button:focus .arrow {
  animation: bounce-top 1.5s ease-in-out infinite both;
}

section:nth-of-type(even) {
  background-color: var(--shade-100);
}

section .container {
  padding: 5rem 0;
}

section:last-of-type .container {
  padding-bottom: 0;
}

.section-link {
  text-align: center;
  margin-top: 5rem;
}

.section-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--shade-500);
}

.section-subtitle {
  font-size: 1.5rem;
  color: var(--grey-text);
  max-width: 60ch;
}

.title-icon {
  display: inline-block;
}

.scrolled .title-icon {
  animation: bounce-top 1s ease-in-out both;
}

.intro a:not([class]) {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--grey-color);
}

.project-container {
  margin: 3rem 0;
}

.project {
  display: flex;
  margin: 3rem 0;
}

.project:nth-of-type(even) {
  flex-direction: row-reverse;
}

.project.scrolled {
  animation: fade-in 1s linear both;
}

.project.scrolled .project-content {
  animation: fade-in-bottom 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  opacity: 0.8;
  filter: brightness(45%) grayscale(1);
  transition: filter 1000ms;
  cursor: pointer;
}

.project:hover .project-image img,
.project.active .project-image img,
.project:focus-within .project-image img {
  filter: brightness(100%) grayscale(0);
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-content p {
  font-size: 1.25rem;
  color: var(--grey-text);
  margin: 0.5rem 0;
  line-height: 135%;
}

.project-title {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--shade-500);
  font-size: 1.5rem;
  text-transform: uppercase;
}

.project-title a {
  color: inherit;
  text-decoration: none;
}

.project-tags {
  display: flex;
  padding: 1rem;
  margin: 0;
  flex-wrap: wrap;
}

.project-tags .tag {
  margin-right: 2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 10px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  margin: 0 -1rem;
}

.project-links a {
  color: var(--grey-text);
  margin: 1rem;
  border-radius: 0;
}

.talks-container {
  margin: 1.5rem -1.5rem -1.5rem;
  display: flex;
  flex-wrap: wrap;
}

.talk-card {
  flex: 1 0 auto;
  margin: 1.5rem;
}

.talk-card iframe {
  width: 100%;
  min-height: 300px;
  background-color: var(--grey-color);
}

.articles-container,
.cards-container {
  display: flex;
  margin: 1.5rem -1.5rem -1.5rem;
  flex-wrap: wrap;
}

.article,
.card {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  margin: 1.5rem;
  transition: box-shadow 500ms;
  box-shadow: 0px 0 10px 1px rgb(0 0 0 / 20%);
}

.article.scrolled:nth-of-type(2) {
  animation-delay: 50ms;
}

.article.scrolled:nth-of-type(3) {
  animation-delay: 100ms;
}

.article:hover,
.article:focus-within,
.card:hover,
.card:focus-within {
  box-shadow: 0px 0 10px 1px rgb(0 0 0 / 50%);
}

.article-image img,
.card-image img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: 0.8;
  filter: contrast(75%) grayscale(1);
  transition: filter 1000ms, opacity 500ms;
}

.article:hover .article-image img,
.article:focus-within .article-image img,
.card:hover .card-image img,
.card:focus-within .card-image img {
  opacity: 1;
  filter: contrast(100%) grayscale(0);
}

.article-content {
  background-color: var(--background-color);
  padding: 2rem;
  height: 100%;
}

.card-content {
  background-color: var(--shade-100);
  padding: 0rem 1rem;
  height: 100%;
}

.card-content .card-title {
  margin-bottom: 0;
}

.article-site a,
.card-site a {
  text-transform: uppercase;
  color: var(--grey-text);
  font-size: 0.9rem;
  transition: color 500ms;
}

.article-site a:hover {
  color: var(--text-color);
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
}

.contact-content .link-btn {
  border-radius: 0;
  margin: 1.5rem 0;
  display: block;
  width: -moz-fit-content;
  width: fit-content;
}

.links-container {
  flex: 0 1 300px;
}

.links-container h3 {
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  color: var(--shade-500);
}

.links-container li {
  margin-bottom: 1rem;
}

.links-container a:hover,
.links-container a:focus {
  text-decoration: underline;
}

.form-container {
  flex: 1 0 auto;
  max-width: 600px;
  width: 100%;
  margin-right: 3rem;
}

.input-container {
  position: relative;
  margin: 1.5rem 0;
}

.input-container .form-input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  caret-color: var(--shade-300);
  border: 1px solid var(--grey-color);
  color: var(--text-color);
  transition: border 500ms;
  padding: 1.75rem 1rem 0.5rem;
  font-size: 1.15rem;
}

.input-container textarea {
  height: 300px;
  resize: none;
  font: inherit;
}

.input-container label {
  display: block;
  position: absolute;
  width: 100%;
  font-size: 1.15rem;
  top: 15px;
  padding: 0.25rem 1rem;
  color: var(--grey-text);
  transform-origin: left;
  -webkit-user-select:none;
  user-select: none;
  transition: all 500ms;
}

.input-container .form-input:hover,
.input-container .form-input:focus {
  outline: none;
  border-color: var(--shade-300);
}

.form-input:focus + label,
.focused label {
  top: 0rem;
  font-size: 0.75rem;
  background-color: var(--shade-500);
  color: var(--background-color);
  -webkit-user-select:none;
  user-select: auto;
}

footer {
  padding-top: 0;
}

@media screen and (max-width: 960px) {
  header .fixed-header:before {
    height: 51%;
  }
  header h1 {
    font-size: 3rem;
  }
  header h2 {
    font-size: 1.5rem;
  }
}

@media screen and (min-width: 721px) {
  .project-container {
    margin: 0 -5rem;
  }

  .project {
    justify-content: space-between;
    margin: 0 5rem;
    padding: 5rem 0;
    border-bottom: 1px dashed var(--shade-300);
  }

  .project.scrolled .project-image {
    animation: slide-in-left 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  .project:nth-of-type(even).scrolled .project-image {
    animation: slide-in-right 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  .project-image,
  .project-content-container {
    width: 50%;
  }

  .project:nth-of-type(odd) .project-content-container {
    margin-left: 3rem;
  }

  .project:nth-of-type(even) .project-content-container {
    margin-right: 3rem;
  }

  .project-content p {
    color: var(--text-color);
  }
}

@media screen and (max-width: 720px) {
  header h1 {
    font-size: 2.5rem;
  }

  header h2 {
    font-size: 1.25rem;
  }

  .project,
  .project:nth-of-type(even) {
    flex-direction: column;
  }

  .project-content-container {
    background-color: var(--background-color);
    padding: 2rem;
  }

  .project-links a {
    margin: 1rem auto;
  }
}

@media (prefers-reduced-motion) {
  .project.scrolled,
  .project.scrolled:nth-of-type(odd) .project-image,
  .project.scrolled:nth-of-type(even) .project-image {
    animation: none;
  }
}
