@font-face {
  font-family: EgyptianEF;
  src:
    url("fonts/EgyptianEF-BoldExtended.woff2") format("woff2"),
    url("fonts/EgyptianEF-BoldExtended.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Special Elite";
  src:
    url("fonts/SpecialElite-Regular.woff2") format("woff2"),
    url("fonts/SpecialElite-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@keyframes draw {
  from {
    stroke-dashoffset: var(--path-length);
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes slide-down {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(300vh);
  }
}

@keyframes slide-up {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-300vh);
  }
}

@keyframes slide-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100vw);
  }
}

@keyframes undo-slide-left {
  0% {
    transform: translateX(-100vw);
  }

  100% {
    transform: translateX(0);
  }
}

/* Handle resize */
@keyframes slide-right {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100vw);
  }
}

@keyframes undo-slide-right {
  0% {
    transform: translateX(100vw);
  }

  100% {
    transform: translateX(0);
  }
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / 0%) 0%, rgb(0 0 0 / 30%) 100%);
  z-index: 100;
}

path {
  stroke-dasharray: var(--path-length);
}

#landing-text {
  font-size: 2rem;
  text-anchor: middle;
  alignment-baseline: middle;
}

.about {
  position: relative;
  width: 70vw;
  height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--r);
}

.about h1 {
  font-family: EgyptianEF, serif;
  font-size: 5.1rem;
  font-weight: bold;
  font-kerning: 0.1rem;
  line-height: 1;
  text-align: center;
}

.about-split {
  display: flex;
  justify-content: center;
  align-items: start;
  height: 30vh;
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
}

.about-description {
  font-family: "Special Elite", typewriter, monospace;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: right;
  margin: 0;
  padding: 0 0.5rem;
  max-width: 50%;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: end;
  height: 100%;
  justify-content: space-between;
}

.about-description p {
  margin: 0;
  padding: 0;
  max-width: 18ch;
}

.about-image {
  position: relative;
  width: 50%;
  height: 30vh;
  margin: 0;
  padding: 0;
}

.about img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  max-height: 100%;
}

a,
.redacted {
  display: inline-block;
  font-family: "Special Elite", typewriter, monospace;
  background-image: url("images/redact.webp");
  background-repeat: no-repeat;
  text-decoration: none;
  color: var(--p);
  background-size: 100% 100%;
  background-position: center;
  transition: color 0.2s ease-in-out;
}

a:hover,
.redacted:hover {
  color: var(--l);
}

a::selection,
.redacted::selection {
  background-color: var(--p);
  color: var(--l);
}

#about-border-image {
  z-index: 2;
}

.about-content {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
}

.about-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--r);
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.about-image:hover::before {
  opacity: 0;
}

.about-form {
  display: grid;
  flex: 1;
  justify-content: center;
  align-items: stretch;
  width: 64rem;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: 1fr;
  grid-gap: 0;
  max-width: 50rem;
  margin-top: 2rem;
}

.about-item {
  font-family: "Special Elite", typewriter, monospace;
  font-weight: 300;
  line-height: 1.5;
  text-align: left;
  max-width: 64rem;
  margin: 0;
  padding: 0 0.5rem;
  border: 1px solid var(--p);
}

.about-item.span-two {
  grid-column: span 2;
}

.about-label {
  font-size: 0.75rem;
  font-weight: bold;
  display: block;
  margin: 0 0 0.5rem;
  padding: 0;
}

.about-value {
  font-size: 1rem;
  font-weight: light;
  display: block;
  margin: 0 0 1rem;
  padding: 0;
}

.projects {
  overflow: hidden;
}

.projects-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.projects-ribbon {
  margin: 0;
  height: 70vh;
  background-image: url("images/newspaper.webp");
  background-color: var(--r);
  top: 50%;
  transform: translateY(20%);
}

.projects-ribbon h1 {
  font-family: EgyptianEF, serif;
  font-size: 5rem;
  font-weight: bold;
  line-height: 1;
  text-align: center;
}

.projects-ribbon-border {
  position: absolute;
  width: 100%;
  height: 50vh;
  pointer-events: none;
}

.projects-ribbon-border img {
  width: 100%;
  height: 80%;
}

.projects-list {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 55vh;
  width: 64rem;
  margin: 0 auto;
  flex-wrap: wrap;
}

.projects-item {
  font-family: "Special Elite", typewriter, monospace;
  text-align: center;
  margin: 0;
  padding: 0 0.5rem;
  max-width: 50%;
}

.projects-item a {
  background-image: none;
}

.projects-item img {
  max-width: 100%;
  max-height: 35vh;
}

.projects-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.projects-item ul li {
  display: inline-block;
  margin: 0;
  padding: 0;
  text-align: left;
}

.projects-item ul > li + li {
  padding-left: 2%;
}

section.contact {
  position: relative;
  background-color: var(--s);
  color: var(--p);
  height: 100vh;
}

.video-curtain {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10; /* Adjust as needed */
  pointer-events: none;
}

.video-curtain video {
  display: none;
}

.contact-container {
  left: 50%;
  max-width: 75vw;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 5;
}

.contact-link {
  font-family: "Special Elite", typewriter, monospace;
  font-size: 2rem;
  font-weight: 500;
  background-image: none;
  text-decoration: underline;
}

.contact-container h1 {
  font-family: EgyptianEF, serif;
  font-size: 5rem;
  font-weight: bold;
  font-kerning: 0.1rem;
  line-height: 1;
  text-align: center;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: baseline;
}

footer .footer-social {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

footer a {
  background-image: none;
  color: var(--p);
  font-family: "Special Elite", typewriter, monospace;
  text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
  .landing.in-view path {
    animation: draw 2.75s forwards;
    stroke-dashoffset: var(--path-length);
  }

  .transition.in-view path {
    animation: draw 0.4s forwards;
    stroke-dashoffset: var(--path-length);
  }

  .about-curtain {
    position: absolute;
    z-index: 3;
    height: 100%;
    top: 0;
    background-color: var(--p);
  }

  .about-curtain-top {
    left: calc(50% - var(--path-width) / 2);
    width: var(--path-width);
  }

  .about-curtain-left,
  .about-curtain-right {
    width: calc(50% - var(--path-width) / 2);
  }

  .about-curtain-left {
    left: 0;
  }

  .about-curtain-right {
    right: 0;
  }

  .about.in-view .about-curtain-top {
    animation: slide-down 0.5s forwards;
    animation-delay: 0.2s;
  }

  .about.in-view .about-curtain-left {
    animation: slide-left 1.5s forwards;
    animation-delay: 0.7s;
  }

  .about.in-view .about-curtain-right {
    animation: slide-right 1.5s forwards;
    animation-delay: 0.7s;
  }

  .about.in-view.projects-in-view .about-curtain-right {
    animation: undo-slide-right 0.5s;
  }

  .about.in-view.projects-in-view .about-curtain-left {
    animation: undo-slide-left 0.5s;
  }

  .projects {
    position: relative;
  }

  .projects-curtain {
    position: absolute;
    z-index: 3;
    height: 100%;
    top: 0;
    background-color: var(--p);
  }

  .projects-curtain-middle {
    top: calc(50% - var(--path-width) / 2);
    height: var(--path-width);
    width: 100%;
  }

  .projects-curtain-top,
  .projects-curtain-bottom {
    width: 100%;
    height: calc(50% - var(--path-width) / 2);
  }

  .projects-curtain-top {
    top: 0;
  }

  .projects-curtain-bottom {
    top: 50%;
  }

  .projects.in-view .projects-curtain-top {
    animation: slide-up 1.5s forwards;
    animation-delay: 0.7s;
  }

  .projects.in-view .projects-curtain-middle {
    animation: slide-right 0.7s forwards;
    animation-delay: 0s;
  }

  .projects.in-view .projects-curtain-bottom {
    animation: slide-down 1.5s forwards;
    animation-delay: 0.7s;
  }

  .video-curtain video {
    display: block;
    width: 100vw;
    height: 100vh;
    object-fit: fill;
    background: transparent;
  }
}

@media (width <= 600px) {
  a,
  .redacted {
    background-image: none;
  }

  #landing-text {
    font-size: 1rem;
  }

  .about {
    height: fit-content;
    width: 98vw;
  }

  .about h1 {
    font-size: 2rem;
  }

  .about-split {
    width: 100%;
    height: fit-content;
  }

  .about-description {
    font-size: 1rem;
    max-width: 100%;
  }

  .about-form {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .projects {
    height: fit-content;
  }

  .projects-ribbon h1 {
    font-size: 2rem;
  }

  .projects-list {
    width: 100%;
    height: fit-content;
  }

  .contact-container {
    max-width: 100vw;
  }

  .contact-container h1 {
    font-size: 2rem;
  }
}
