/* ================
    G L O B A L
================ */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  font-family: 'Lato', sans-serif;
  --nav-color: #252422;
  --main-color: #251a2f;
  --wilmxre-color: linear-gradient(0deg, rgba(231, 182, 131, 1) 0%, rgba(227, 166, 117, 1) 100%);
  --work-color: linear-gradient(0deg, rgba(235, 197, 143, 1) 0%, rgba(231, 182, 131, 1) 100%);
  --about-color: linear-gradient(0deg, rgba(238, 209, 154, 1) 0%, rgba(235, 197, 143, 1) 100%);
  --contact-color: linear-gradient(0deg, rgba(242, 223, 166, 1) 0%, rgba(238, 209, 154, 1) 100%);
  --hero-letter: #653E54;
  --text-shadow: rgb(2, 1, 34, .5);
  --work-item-size: min(235px, 20vw);
  --vh-full: 100vh;
}

body {
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-rows: repeat(4, var(--vh-full));
  overflow: hidden;
  scroll-behavior: smooth;
  background-color: rgba(238, 209, 154, 1);
}

html[data-theme="dark"] {
  --main-color: #F2DFA6;
  --wilmxre-color: #212121;
  --work-color: #212121;
  --about-color: #212121;
  --contact-color: #212121;
  --hero-letter: #9D6381;
  --text-shadow: ;
}

/* ========================
    N A V I G A T I O N
======================== */
nav {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  position: fixed;
  width: 90px;
  height: var(--vh-full);
  align-items: center;
  justify-items: center;
  background-color: var(--nav-color);
  z-index: 900;
  user-select: none;
}

nav a {
  text-decoration: none;
  transform: rotate(-90deg);
  padding: 2px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgb(240, 240, 240, .5);
  transition: all 300ms linear;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
}

nav a:hover,
nav a.active {
  color: #ffffff;
}


.nav-collapsed,
.links {
  display: none;
}

/* =====================
    D A R K  M O D E
===================== */

.dark-mode {
  position: fixed;
  top: 50px;
  right: 50px;
  z-index: 800;
}

.theme-switch {
  display: inline-block;
  height: 34px;
  position: relative;
  width: 60px;
}

.theme-switch input {
  display: none;
}

.slider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background-color: #333;
  cursor: pointer;
  transition: 0.4s;
}

.slider:before {
  content: "";
  position: absolute;
  background-color: #F2DFA6;
  bottom: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  transition: 0.4s;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #F2DFA6;
}

input:checked+.slider::before {
  left: -4px;
  background-color: transparent;
  box-shadow: 8px 0px 0px 0px #333;
}

input:checked+.slider:before {
  transform: translateX(26px);
}

/* ====================
    S E C T I O N S
==================== */

/* ====================
    W I L M X R E
==================== */
#wilmxre {
  background: rgb(231, 182, 131);
  background: var(--wilmxre-color);
  display: grid;
  grid-area: 1 / 2 / 2 / -1;
}

#wilmxre .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 80%;
  margin: 0 auto;
  user-select: none;
  padding: 4rem
}

/* Introduction --> */

#wilmxre h2 {
  @import url('https://fonts.googleapis.com/css2?family=Anonymous+Pro&display=swap');
  font-family: 'Anonymous Pro', monospace;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  letter-spacing: 0.125rem;
  word-spacing: -.3rem;
  overflow: hidden;
  color: var(--main-color);
}

.hello::after {
  content: "|";
  display: inline-block;
  width: 3px;
  animation: blink 1000ms infinite;
}

/* <-- Introduction */

/* Name --> */

#wilmxre .hero-letters {
  display: flex;
  gap: 20px;
  color: var(--main-color);
  letter-spacing: -.1em;
  font-size: clamp(3rem, 10vw, 6rem);
}

.hero-letters .letter {
  color: var(--main-color);
  transition: color .2s;
  font-weight: 700;
  display: inline-block;
  transition: transform 600ms ease;
  cursor: pointer;
}

.hero-letters .letter:hover {
  color: var(--hero-letter);
  transition: color 400ms;
  transform: translateY(-10px);
  transition: transform 400ms ease;
}

/* <-- Name */

/* Description --> */

#wilmxre h3>span:hover {
  background-color: var(--main-color);
  color: transparent;
  text-shadow: 2px 2px 3px var(--text-shadow);
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
}

#wilmxre h3 {
  color: var(--main-color);
  font-size: clamp(1.4rem, 4vw, 2.5rem);
}

/* <-- Description */


#wilmxre p {
  width: 85%;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-top: 24px;
  font-weight: 300;
  letter-spacing: .0625rem;
  color: var(--main-color);
}

/* ============
    W O R K
============ */
#work {
  background: rgb(235, 197, 143);
  background: var(--work-color);
  grid-area: 2 / 2 / 3 / -1;
  z-index: 20;
  /* hero name stays hidden on animation */
}

#work .container {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(16rem, 1fr));
  gap: 2rem;
  margin: 0 auto;
  padding: 2rem;
  width: 80%;
  min-height: var(--vh-full);
  align-content: space-evenly;
  justify-items: center;
}

#work .work-item {
  list-style: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #ffffff;
  font-size: clamp(1rem, 1vw, 1.2rem);
  text-align: center;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: var(--work-item-size);
  height: var(--work-item-size);
  border-radius: 20px;
}

#work .element-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 300ms;
}

#work .img-element {
  width: var(--work-item-size);
  height: var(--work-item-size);
  object-fit: cover;
  border-radius: 20px;
  z-index: 8;
}

#work .text-element {
  background-color: #ffffff;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  color: #010114;
  position: absolute;
  text-align: center;
  line-height: 5rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  animation:
    scale-down-center 300ms cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  z-index: 10;
}

#work .element-wrapper:hover>.text-element {
  animation:
    scale-up-center 300ms cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

#work .element-wrapper:hover {
  transform: scale(1.2);
}

#work .element-wrapper:hover>.overlay {
  background-color: rgba(0, 0, 0, 0.6);
  width: var(--work-item-size);
  height: var(--work-item-size);
  position: absolute;
  z-index: 9;
}

/* ==============
   A B O U T
============== */
#about {
  background: rgb(238, 209, 154);
  background: var(--about-color);
  display: grid;
  grid-area: 3 / 2 / 4 / -1;
  z-index: 30;
}

#about .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 80%;
  margin: 0 auto;
  user-select: none;
  padding: 4rem;
  color: var(--main-color);
}

#about .container h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 1.5rem;
}

#about .container p {
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  padding: 0 0 24px;
  margin-right: calc(15vw - 100px);
}

#about a,
#contact a {
  all: unset;
  cursor: pointer;
}

#about a:hover,
#contact a:hover {
  text-decoration: underline;
}

/* ==================
    C O N T A C T
================== */
#contact {
  background: rgb(242, 223, 166);
  background: var(--contact-color);
  display: grid;
  grid-area: 4 / 2 / 5 / -1;
  z-index: 30;
}

#contact .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: var(--vh-full);
  width: 80%;
  margin: 0 auto;
  padding: 4rem;
  color: var(--main-color);
}

#contact h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
}

#contact span {
  padding: 6px 0;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
}

#cv {
  display: grid;
  grid-area: 5 / 2 / 6 / -1;
}

/* ==========================
    B R E A K P O I N T S
========================== */

@media only screen and (max-width: 850px) {

  /* global */
  :root {
    --work-item-size: max(180px, 25vw);
  }

  nav a {
    transform: rotate(0deg);
  }

  .dark-mode {
    zoom: 90%;
    top: 50px;
    right: 140px;
  }

  /* wilmxre */
  #wilmxre {
    grid-area: 1 / 1 / 2 / -1;
  }

  #wilmxre .container {
    width: 90%;
  }

  #wilmxre .container {
    gap: 5px;
  }

  #wilmxre .hero-letters {
    /* flex-direction: column; */
    gap: 16px;
    line-height: .9;
  }

  #wilmxre p {
    width: 100%;
  }

  /* work */
  #work {
    grid-area: 2 / 1 / 3 / -1;
  }

  /* about */
  #about {
    grid-area: 3 / 1 / 4 /-1;
  }

  /* contact */
  #contact {
    grid-area: 4 / 1 / 5 / -1;
  }

  /* nav */
  .hamburger {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    grid-auto-flow: column;
    background-color: rgb(37, 36, 34, .95);
  }

  .nav-collapsed {
    display: block;
    position: fixed;
    top: 37.5px;
    right: 50px;
    z-index: 901;
    cursor: pointer;
  }

  path {
    fill: var(--main-color);
  }
}

@media only screen and (max-width: 500px) {

  html {
    height: 100%;
  }

  body {
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - calc(100vh - 100%))
  }

  .hamburger a {
    font-size: 1.05rem;
    transition: none;
  }

  .nav-collapsed,
  .dark-mode {
    zoom: 80%;
  }

  .nav-collapsed {
    top: 45px;
  }

  #wilmxre .container .hello {
    font-size: 1.1rem;
  }

  #wilmxre .container .letter {
    font-size: 2.4rem;
  }

  #wilmxre .container h3 {
    font-size: 1.4rem;
    margin-top: 5px;
  }

  #wilmxre .container p {
    font-size: 1rem;
  }

  #wilmxre .container,
  #work .container,
  #contact .container,
  #about .container {
    width: 90%;
    padding-left: 2rem;
  }

  #wilmxre .container {
    padding: 0 0 0 2rem;
  }

  #about .container h2 {
    font-size: 2rem;
  }

  #about .container p {
    font-size: .9rem;
  }


  #contact .container h2 {
    font-size: 1.35rem;
  }

  #contact .container span {
    font-size: 1rem;
  }
}