body {
  background-color: var(--black);
  font-family: var(--sans);
  font-weight: 400;

  font-size: 1.25rem;
}

strong,
b {
  font-weight: 500;
}

a {
  color: rgb(0, 0, 191);
  transition: color 0.5s;
  text-decoration: none;
}

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

a[href^="http"]:not([href*="andrewy.wang"])::after {
  content: "";
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.25em;
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22400%22%20height%3D%22400%22%20viewBox%3D%22-0.125%20-0.125%201.25%201.25%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M.75.5V1H0V.25h.5m-.25.5L1%200M.5%200H1v.5%22%20stroke%3D%22%23000%22%20stroke-width%3D%22.08%22%2F%3E%3C%2Fsvg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  background-color: currentcolor;
  mask-size: 100% 100%;
  mask-clip: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading);
  font-weight: 600;
  margin: 0;
  padding: 0;
}

.section-name {
  display: block;
  position: static;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 0;

  animation: fade-from-black ease-out 2s;
}

.section-name-vignette {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;

  box-shadow: inset rgba(0, 0, 0, 0.25) 0 0 2rem;
}

.section-name-background {
  width: 400%;
  height: 400%;
  position: relative;
  left: -150%;
  top: -150%;
  z-index: 0;

  background-image:
    radial-gradient(rgba(127, 127, 127, 1), rgba(127, 127, 127, 0) 20%),
    conic-gradient(in oklch, var(--print-cyan), var(--print-magenta), var(--print-yellow), var(--print-cyan));
  background-size: max(400vw, 400vh) max(400vw, 400vh);
  background-position: 50% 50%;
  filter: blur(48rem) brightness(0.875);

  animation: pan360 24s linear infinite;
}

.section-name-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;
}

.my-name-box {
  position: relative;

  margin-bottom: 2rem;
  border-radius: 2rem;

  text-align: center;

  animation: fade-in ease-in-out 3s;
  user-select: none;
}

.my-name {
  display: block;
  font-weight: 500;
  font-size: min(8rem, 12vw);
  color: var(--white);
  text-shadow: #1F1F1F 0 0 0.5rem;
}

.my-name-subtitle {
  display: block;
  font-weight: 400;
  font-size: min(2.5rem, 4vw);
  color: var(--white);
  text-shadow: #1F1F1F 0 0 0.5rem;
}

.scroll-down {
  display: block;
  position: absolute;
  top: calc(100vh - 8rem);
  left: 0;
  right: 0;
  margin: 0 auto;

  z-index: 11;
  text-align: center;
  text-transform: uppercase;

  font-weight: 200;
  font-size: min(1.5rem, 2.5vw);
  color: var(--white);
  text-shadow: #1F1F1F 0 0 0.5rem;
  opacity: 0;

  animation: fade-in 2s ease-in 4s 1 forwards, bounce-y 4s ease-in-out infinite;
}

#scroll-down.transparent {
  animation: fade-out 0.5s ease-out 1 forwards;
}

.section-bio {
  display: block;
  position: static;
  width: 100vw;
  overflow: hidden;
  box-sizing: border-box;

  background-color: var(--black);
  box-shadow: inset rgba(0, 0, 0, 0.75) 0 0 4rem;
  animation: dark-cycle-background 24s linear infinite;

  z-index: 100;
}

.about-me-label {
  margin-top: 3rem;
  margin-bottom: 2rem;
  text-align: center;

  color: var(--white);
  font-size: min(4rem, 7vw);
}

.about-me {
  width: 60%;
  margin: auto;
  margin-top: 2rem;
  margin-bottom: 6rem;
  text-align: center;
  text-wrap: pretty;

  color: var(--white);
  font-size: 1.5rem;
  font-weight: 300;
}

.about-me p {
  margin: 2rem 0;
}

.resume-link {
  color: var(--white);
  transition: text-shadow 0.5s;
  font-weight: 400;
}

.resume-link:hover {
  text-decoration: none;
  text-shadow: var(--white) 0 0 0.5rem;
}

.section-projects {
  display: block;
  position: static;
  width: 100vw;
  overflow: hidden;
  box-sizing: border-box;

  background-color: var(--print-cyan);

  animation: cycle-background-1 192s linear infinite;
  z-index: 100;
}

.projects-label {
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;

  color: var(--black);
  font-size: min(3.5rem, 6vw);
}

.project {
  margin: 2rem auto;
  width: 90%;
  max-width: 84rem;
}

.project-content {
  flex: 0 1 100%;
}

.project-content .indent {
  margin-left: 0.5rem;
}

.project-content p {
  margin: 1.5rem 0;
}

.project-figure {
  flex: 32rem 0 0;
}

.project-figure img,
.project-figure video {
  max-width: 100%;
  box-shadow: var(--black) 0 0 1rem;
  user-select: none;
}

.project-split-figure-left {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3%;
}

.project-split-figure-right {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-flow: row-reverse;
  align-items: center;
  gap: 3%;
}

.project-title {
  font-size: min(2.5rem, 4vw);
}

.projects-text-large {
  text-align: center;
  font-size: 1.125em;
  margin: 2.5rem auto 3rem;
  width: 90%;
  max-width: 84rem;
}

.section-research {
  display: block;
  position: static;
  width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
  background-color: var(--print-magenta);

  animation: cycle-background-2 192s linear infinite;
  z-index: 100;
}

.research-label {
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;

  color: var(--black);
  font-size: min(3.5rem, 6vw);
}

.research-text {
  text-align: center;
  margin: 2.5rem auto 3rem;
  width: 90%;
  max-width: 84rem;
}

.section-links {
  display: block;
  position: static;
  width: 100vw;
  overflow: hidden;
  box-sizing: border-box;

  background-color: var(--print-yellow);

  animation: cycle-background-3 192s linear infinite;
  z-index: 100;
}

.links-label {
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-align: center;

  color: var(--black);
  font-size: min(3.5rem, 6vw);
}

.links-nav {
  margin: 0 auto 3rem;
  width: 80%;
  max-width: 72rem;
  text-align: center;
  font-size: 1.25em;
}

.links-nav-link {
  color: var(--black);
  transition: color 0.25s;
}

.links-nav-link:hover {
  text-decoration: none;
  color: rgb(127, 127, 127);
}

.links-nav-link:not(:first-child)::before {
  content: " ・ ";
}

.links-nav-link.links-nav-link.links-nav-link::after {
  content: none;
}

.section-footer {
  padding: 2rem 0;

  background-color: var(--black);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 300;
  text-align: center;
  z-index: 1000;
}

#hearts {
  animation: cycle-foreground 24s linear infinite;
  text-shadow: 0 0 0.25rem;
}

/* SAFARI */
@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
  .section-name {
    animation: none;
  }

  .section-name-background {
    filter: brightness(0.875);
  }

  .my-name-box {
    animation: none;
    opacity: 1;
  }
}

/* TABLET */
@media only screen and (max-width: 67.5rem) {
  .project-split-figure-left, .project-split-figure-right {
    box-sizing: border-box;
    padding: 0 6rem;
    flex-direction: column;
    flex-flow: column;
    gap: 2rem;
  }

  .project-figure {
    width: min(40rem, 80vw);
    flex-basis: auto;
  }

  .project-content {
    width: min(40rem, 80vw);
  }
}

/* PHONE */
@media only screen and (max-width: 40rem) {
  .scroll-down {
    font-size: 1rem;
    top: calc(100vh - 12rem);
  }
  
  .about-me-label, .projects-label, .research-label, .links-label {
    font-size: 2rem;
  }

  .about-me {
    font-size: 1.25rem;
    width: 85%;
  }

  .project-content, project-figure {
    width: 85vw;
  }

  .project-title {
    font-size: 1.75rem;
  }

  .projects-text-large {
    font-size: 1.25rem;
  }

  .links-nav-link:not(:first-child)::before {
    content: none;
  }

  .links-nav-link {
    font-size: 1.25rem;
    display: block;
    margin: 0.5rem 0;
  }
}