@import url("https://rsms.me/inter/inter.css");
@import url("https://rsms.me/inter/inter-display.css");

body {
  --accent: #ff5588;

  --gap: 100px;
  
  box-sizing: border-box;
  padding: var(--gap);
  margin: 0;
  font-family: "InterDisplay var", "Inter var", Inter;
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "opsz" 32;
  color: #111;
}

h1 {
  font-size: 96px;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 75px;
  line-height: 1;
  letter-spacing: -0.02em;
}

h1.title--main {
  font-size: 72px;
  letter-spacing: -0.02em;
  line-height: initial;
}

p {
  font-size: 48px;
  line-height: 150%;
  margin-top: 2em;
  color: #888;
}

a {
  color: inherit;
  text-decoration: none;
}

main a[href^="http"]:not(.not-hyperlink):after {
  content: "↗";
  opacity: 0.5;
}

nav {
  display: flex;
  gap: 50px;
  margin-bottom: var(--gap);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle {
  display: none;
}

.nav-pages {
  display: flex;
  flex: 1;
  gap: 50px;
}

.nav-socials {
  display: flex;
  gap: 25px;
  color: var(--accent);
}

#projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap) 50px;
  height: fit-content;
}

/* Main cards */

#main-cards {
  display: grid;
  gap: 25px;
}

#main-cards > * {
  background: #555;
  border-radius: 20px;
  padding: var(--gap);
  color: white;
}

#main-cards > * h2 {
  font-size: 32px;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 0;
  margin-bottom: 50px;
}

#main-cards > * p {
  color: white;
  margin: 0;
}

#main-cards > * ul {
  display: grid;
  padding: 0;
  margin: 0;
}

#main-cards > * li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 48px;
  line-height: 150%;
}

#main-cards > * li *:last-child {
  opacity: 0.5;
}

#favourites {
  background: #f58;
}

#hobbies {
  background: #4af;
}

#experience {
  background: #96f;
}

/* Projects */

.project {
  --img: grey;
  
  display: flex;
  flex-direction: column-reverse;
  gap: 25px;
}

.project-card {
  display: flex;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--img) center/cover;
  transition: 0.25s;
  width: 100%;
  transform: scale(1);
}

.project:hover .project-card-image {
  transform: scale(1.15);
}

.project-header {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
}

.project-status {
  font-size: 20px;
  color: #888;
  margin: 0;
}

.project-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

@media only screen and (max-width: 960px) {
  body {
    --gap: 75px;
  }
  
  nav {
    flex-direction: column;
  }

  nav.open {
    position: fixed;
    gap: 50px;
    inset: 0;
    background: white;
    padding: var(--gap);
    margin-bottom: 0;
    z-index: 2;
  }
  
  nav.open ~ * {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-pages, .nav-socials {
    display: none;
  }
  
  .nav-pages {
    display: none;
    flex-direction: column;
    gap: 15px;
    font-size: 32px;
  }
  
  nav.open .nav-pages,
  nav.open .nav-socials {
    display: flex;
  }

  nav .nav-toggle svg {
    transform-box: fill-box;
    transition: 1s;
  }
  
  nav .nav-toggle svg path {
    transform: rotate(0);
    transform-origin: calc(50% + 3px) calc(50% + 3px);
  }
  
  nav.open .nav-toggle svg path:first-child {
    transform: rotate(45deg);
  }
  
  nav.open .nav-toggle svg path:last-child {
    transform: rotate(45deg);
  }

  #projects {
    grid-template-columns: auto;
  }

  h1 {
    font-size: 64px;
  }

  h1.title--main {
    font-size: 48px;
  }

  #main-cards > * h2 {
    font-size: 24px;
    margin-bottom: 25px;
  }

  p, #main-cards > * li {
    font-size: 36px;
  }

  #main-cards > * li *:last-child {
    display: none;
  }
}

@media only screen and (max-width: 780px) {
  body {
    --gap: 50px;
    
    padding: 50px;
  }

  h1 {
    font-size: 48px;
  }

  h1.title--main {
    font-size: 36px;
  }

  #main-cards > * h2 {
    font-size: 18px;
    margin-bottom: 25px;
  }

  p, #main-cards > * li {
    font-size: 24px;
  }
}