/***** RESET *********************************************/
*,
::after,
::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
::-moz-selection {
  background: var(--base-color);
  color: var(--second-color);
}
::selection {
  background: var(--base-color);
  color: var(--second-color);
}
ul {
  list-style: none;
}
a {
  color: var(--body-color);
  text-decoration: none;
}
img {
  width: 100%;
  height: auto;
}
.d-none {
  display: none;
}

/***** VARIABLES ***********************************************/
:root {
  /* colors */
  /* HSL color mode */
  --hue: 158;
  --base-color: hsl(var(--hue), 100%, 40%);
  --second-color: hsl(0, 0%, 100%);
  --body-color: hsl(0, 0%, 80%);
  --bg-color: hsl(0, 0%, 11%);

  /* fonts */
  --title-font: 'Montserrat', sans-serif;
  --body-font: 'Rubik', sans-serif;

  /* font-size */
  --body-fz: 1rem;
  --title-fz: 1.625rem;
  --subtitle-fz: 1.25rem;
  --fz-xs: 0.75rem;
  --fz-md: 0.875rem;
  --fz-lg: 1.25rem;
  --fz-xl: 1.625rem;
  --fz-xxl: 2.25rem;

  --transition: all 0.5s ease 0s;
}

/***** GENERAL **********************************/
/* html {
  scroll-behavior: smooth;
} */
body::-webkit-scrollbar {
  width: 0.5rem;
}
body::-webkit-scrollbar-thumb {
  background-color: var(--body-color);
  border-radius: 0.5rem;
}
body.blur main {
  filter: blur(0.25rem) brightness(0.7);
  transition: var(--transition);
}
body {
  position: relative;
  font: 300 var(--body-fz) var(--body-font);
  line-height: 1.5rem;
  color: var(--body-color);
  background-color: var(--bg-color);
}
h1,
h2,
h3,
h4 {
  font-family: var(--title-font);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
h1 {
  font-size: clamp(2.25rem, 7vw, 3.375rem);
  font-weight: 800;
}
h2 {
  font-size: var(--title-fz);
  font-weight: 800;
  color: var(--base-color);
}
h2.title {
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  position: relative;
  margin: 0.625rem 0 2.5rem;
  width: 100%;
  white-space: nowrap;
}
h2.title:after {
  content: '';
  display: block;
  position: relative;
  width: 100%;
  height: 0.0625rem;
  margin-left: 1.25rem;
  background-color: var(--body-color);
  opacity: 0.3;
}
h3 {
  font-size: var(--subtitle-fz);
  font-weight: 700;
  color: var(--base-color);
}
h4 {
  font-size: var(--body-fz);
  font-weight: 500;
  color: var(--second-color);
}
p {
  margin-bottom: 1rem;
}

.button {
  font: 500 1rem var(--body-font);
  color: var(--second-color);
  background-color: var(--base-color);
  display: inline-flex;
  align-items: center;
  padding: 1rem 3rem;
  margin-top: 1.25rem;
  border: 0.0625rem solid var(--base-color);
  border-radius: 0.5rem;
  transition: var(--transition);
}

.button:hover {
  background-color: transparent;
  border: 0.0625rem solid var(--base-color);
  color: var(--base-color);
}

/***** LAYOUT ************************************/
.container {
  width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-left: auto;
  margin-right: auto;
}
.grid {
  display: grid;
  gap: 2rem;
}
section {
  padding: 6.25rem 0;
}

/***** HEADER **********************************************/
#header {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  width: 100%;
  margin-bottom: 2rem;
  background-color: var(--bg-color);
  z-index: 100;
}
#header.scroll {
  box-shadow: 0 0 0.75rem rgba(0, 0, 0, 0.15);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
nav ul li {
  text-align: center;
}
nav ul li a {
  position: relative;
  color: var(--body-color);
  transition: color 0.2s;
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--second-color);
}
nav ul li a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 0.0625rem;
  left: 0;
  bottom: -0.5rem;
  background: var(--base-color);
  transform: scaleX(0);
  transition: transform .7s cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: right center;
}
nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
  transform: scaleX(1);
  transform-origin: left center;
}
nav .menu {
  visibility: hidden;
  opacity: 0;
  right: -20rem;
  transition: var(--transition);
}
nav .menu ul {
  display: none;
}

/* show menu */
nav.show .menu {
  visibility: visible;
  opacity: 1;
  position: fixed;
  top: 0;
  right: 0;
  display: grid;
  place-content: center;
  height: 100vh;
  width: 80vw;
  background-color: var(--bg-color);
}

nav.show .menu ul {
  display: grid;
}

nav.show ul.grid {
  gap: 4rem;
}

/* toggle menu */
.toggle {
  color: var(--base-color);
  font-size: 2rem;
  cursor: pointer;
}
nav .icon-close {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -1.5rem;
  right: 0.75rem;
  transition: var(--transition);
}
nav.show div.icon-close {
  visibility: visible;
  opacity: 1;
  top: 1.5rem;
}

/***** HERO *********************************/
.hero {
  color: var(--second-color);
  margin-top: 4.25rem;
  max-width: 20.75rem;
}
.hero p {
  color: var(--base-color);
}

/***** ABOUT ***********************************/

/***** SKILLS ************************************/
.skills ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(auto, auto));
  gap: 0.625rem 0.625rem;
  margin: 1.25rem 0 0;
  overflow: hidden;
  font-size: var(--fz-xs);
  color: var(--base-color);
  list-style: none;
  padding: 0;
}

.skills li::before {
  content: '▸';
  color: var(--body-color);
  padding-right: 0.625rem;
}

/***** WORKS ****************************************/
.works .grid {
  margin-bottom: 4rem;
  overflow: hidden;
}
.works .content-box {
  z-index: 2;
}
.works .img-box {
  position: relative;
  width: auto;
  max-width: 21.25rem;
}
.works .img-box img {
  border-radius: 0.5rem;
}
.works .img-box a {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  padding: 1.5rem 1.25rem 0;
  transform: translate3d(-50%, -50%, 0);
  transition: var(--transition);
}
.works .img-box a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0.5rem;
  right: 0;
  background-color: var(--base-color);
  opacity: 0.5;
  border-radius: 0.5rem;
  z-index: 3;
  transition: var(--transition);
}
.works .img-box a:hover::before {
  background-color: transparent;
}

.works .content-box .box {
  background-color: #4c4f54;
  border-radius: 0.625rem;
  padding: 1rem;
}
.works .content-box .box p {
  margin: 0;
  font-size: var(--fz-md);
}
.works .content-box a {
  display: inline-block;
  color: var(--base-color);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: var(--transition);
}
/* .works .content-box .box a:first-child {
    padding: 0;
    font-weight: 600;
} */
.works .content-box a:hover {
  color: var(--base-color);
}
.works .content-box a::before {
  position: absolute;
  content: '';
  width: 0;
  height: 0.0625rem;
  bottom: 0;
  left: 0;
  background: transparent;
  transition: var(--transition);
}
.works .content-box a:hover::before {
  width: 100%;
  background: var(--base-color);
}

/***** BUILT WORKS ****************************************/
.built-works ul {
  list-style: none;
}
.built-works ul li {
  padding: 0.5rem 0;
}
.built-works li span {
  font-size: var(--fz-xs);
}
.bw-link {
  display: block;
  border-bottom: 0.0625rem solid var(--body-color);
  text-decoration: none;
  position: relative;
  color: var(--body-color);
  font-size: var(--fz-lg);
  font-weight: 500;
}
.bw-link:hover {
  color: var(--second-color);
}
.bw-link:hover i {
  color: var(--base-color);
}

.bw-link:before {
  content: '';
  display: block;
  position: absolute;
  width: 0;
  bottom: -0.0625rem;
  height: 0.0625rem;
  background-color: var(--base-color);
  transition: var(--transition);
}
.bw-link:hover:before {
  width: 100%;
}
.bw-link i {
  position: absolute;
  right: 0;
  bottom: 0.375rem;
  font-size: 1.5rem;
}

/***** CONTACT *******************************************/
.contact .container.grid {
  overflow: hidden;
}
.contact-title {
  text-align: center;
}
.contact .button i {
  margin-left: 0.5rem;
}
.contact-list {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}
.contact ul {
  list-style: none;
  color: var(--second-color);
  padding: 0 1.25rem;
}
.contact ul:first-child {
  border-right: 0.0625rem solid var(--base-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact li {
  display: flex;
  place-items: center;
  padding: 0.625rem 0;
}
.contact li i {
  margin-right: 0.5rem;
  font-size: 1.125rem;
}
.contact li a {
  display: inline-flex;
  text-decoration: none;
  color: var(--second-color);
  transition: var(--transition);
}
.contact li a img {
  margin-right: 0.5rem;
  width: 1.125rem;
}
.contact li a:hover {
  color: var(--base-color);
}
.contact li a:hover i {
  color: var(--second-color);
}

/***** FOOTER ***********************************************/
footer p {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  font-size: var(--fz-xs);
}

/* Small devices (tablets, 576px and up) */
@media (min-width: 500px) {
  .hero {
    max-width: 28.75rem;
  }
  .works .text {
    width: 70%;
  }
  .works .content-box {
    width: 80%;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  h2 {
    font-size: var(--fz-xxl);
  }
  h2.title:after {
    width: 18.75rem;
  }
  h3 {
    font-size: var(--fz-xl);
  }
  h4 {
    font-size: var(--fz-lg);
  }
  .container.grid .grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    max-width: 37.5rem;
  }
  .skills ul {
    font-size: var(--fz-md);
  }
  .works .text {
    width: 60%;
  }
  .works .img-box {
    width: 40%;
  }
  .works .content-box {
    width: 60%;
  }
  .works .container .grid {
    display: flex;
    justify-content: flex-end;
    text-align: end;
  }
  .works .img-box {
    right: -4.375rem;
    max-width: 21.25rem;
  }
  .works .container .content .grid.flex-start {
    justify-content: flex-start;
  }
  .works .container .content .grid.flex-start .img-box {
    left: -4.375rem;
    order: 2;
  }
  .works .container .content .grid.flex-start .content-box {
    text-align: start;
    order: 1;
  }
  .built-works .collumn {
    width: 80%;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  #header .container {
    max-width: 100%;
  }
  nav .menu {
    opacity: 1;
    visibility: visible;
    top: 0;
  }
  nav .menu ul {
    display: flex;
    gap: 2rem;
  }
  nav .menu ul li a.title {
    font: 400 1rem var(--body-font);
    -webkit-font-smoothing: antialiased;
  }
  nav .menu ul li a.title.active {
    font-weight: bold;
    -webkit-font-smoothing: auto;
  }
  nav .icon-menu {
    display: none;
  }
  .works .text,
  .works .img-box,
  .works .content-box {
    width: 50%;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
@media (min-width: 1400px) {
  #header .container {
    max-width: 1320px;
  }
}
