@import url("https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap");

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

body {
  font-family: "DM Sans", sans-serif;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.projects-list h2 {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  text-transform: none;
  color: #fff;
}

.projects-header-title {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.85rem);
  font-weight: 550;
  text-transform: uppercase;
  color: #acacac;
}

p,
a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "DM Mono", monospace;
  font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.85rem);
  font-weight: 550;
  line-height: 1;
  display: inline-block;
}

header nav,
footer {
  position: fixed;
  width: 100%;
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  z-index: 2;
}

header nav .logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header nav .logo img {
  width: 2rem;
  height: 2rem;
  filter: invert(1);
}

header nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

footer {
  bottom: 0;
}

.projects {
  position: relative;
  width: 100%;
  height: 100svh;
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2rem;
  overflow: hidden;
}

.projects-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.project-img-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
  will-change: clip-path;
  overflow: hidden;
}

.project-img-wrapper img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform, opacity;
}

.projects-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 0.5rem + 0.5vw, 1.25rem);
}

.projects-header .projects-header-title {
  color: #acacac;
}

.projects-hint {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #acacac;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.projects-list {
  position: relative;
  width: clamp(70%, 40rem, 100%);
  margin-bottom: clamp(4rem, 2rem + 5vw, 8rem);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.25rem, 0.5vw, 0.75rem);
  mix-blend-mode: difference;
  z-index: 2;
}

.project-name {
  position: relative;
  width: fit-content;
  cursor: pointer;
}

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

.project-name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.15rem;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms ease-out;
}

.project-name:hover::after,
.project-name.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 768px) {
  footer a,
  footer p {
    max-width: 45%;
  }

  footer p {
    text-align: right;
  }
}
