/*GLOBAL */
:root {
    --bg-body: hsl(0, 0%, 8%);
    --bg-body2: hsl(0, 0%, 14%);
    --accent: hsl(183, 100%, 57%);
    --text1: hsl(0, 0%, 100%);
    --text2: hsl(0, 0%, 85%);
    --invalid: hsl(7, 100%, 68%);
    --fs-18: 1.125rem;
    --fs-88: 5.5rem;
    --fs-72: 4.5rem;
    --fs-40: 2.5rem;
    --fs-48: 3rem;
    --fs-36: 2.25rem;
    --fs-32: 2rem;
    --fs-24: 1.5rem;
    --fs-20: 1.25rem;
    --container: 69.375rem;
    --transition: 250ms ease-in-out;
  }

html {
  box-sizing: border-box;
  font-size: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body,
input,
textarea,
button {
  font-family: 'Space Grotesk', sans-serif;
}

#main{
  overflow: hidden;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg-body);
  color: var(--text1);
  font-size: var(--fs-18);
}

.bg-less-dark {
  background-color: var(--bg-body2);
}

h1, h2, h3, p {
  margin-top: 0;
}

.header-xl {
  font-size: 2.1875rem;
  font-size: clamp(2.19rem, 0.2rem + 8.48vw, 5.5rem);
}

p {
  font-size: 1rem;
  font-size: clamp(1rem, 0.79rem + 0.89vw, 1.125rem);
  line-height: 1.5;
  color: var(--text2);
  
}
.header__social svg {
  display: block;
}

.header__social:hover > svg > path,
a:hover {
  color: var(--accent);
  transition: fill var(--transition), color var(--transition);
}

a:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.underline {
  display: inline-block;
  padding-bottom: 0.625rem;
  font-size: 1rem;
  line-height: 1.625;
  letter-spacing: 0.143em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text1);
  text-decoration: none;
  background-image: linear-gradient(
    to right,
    var(--accent) 75%,
    var(--accent) 75%
    );
  background-position: 0 2.1em;
  background-repeat: repeat-x;
  background-size: 8px 2px;
}

svg path:hover {
    fill:var(--accent);
    cursor: pointer;
  }
  
.wrapper {
    width: calc(100% - 2rem);
    max-width: var(--container);
    margin-inline: auto;
}

/* HEADER */
.header {
  margin-top: 20px;
}
.header__nav{
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 20px 25px;
    z-index: 1;
  }

  .header__home{
    font-size: 1.5rem;
    font-size: clamp(1.5rem, 1.02rem + 2.04vw, 2rem);
    line-height: 1;
    color: var(--text1);
    text-decoration: none;
    flex: 1 0 100%;
  }

  .visually-hidden {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  
  @media (min-width: 37.5em) {
    .header {
      margin-top: 30px;
    }
    .wrapper {
      width: calc(100% - 3.75rem);
    }

    .header {
      margin-block-start: 30px; /* Align items vertically */
    }
  
    .header__nav {
      align-items: center;
      gap: 32px;
      margin-bottom: 90px;
    }
  
    .header__home {
      flex: 1; /* Occupy remaining space */
      text-align: left; /* Align text to the left within the container */
    }

  }

  @media (min-width: 62.5em) {
    .header__nav {margin-right: 30px;
    }
  }

  /* UTILITY */
  .bottom-border {
    border-bottom: 1px solid var(--text2);
  }

  /* HERO */
  .hero{
    
  }
  .hero__wrapper{
    padding-bottom: 80px;
  }

  .hero__image {
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50%;
    width: 174px;
    height: auto;
  }

  .hero__rings {
    position: absolute;
    right: 50%;
    top: 130px;
    z-index: -1;
    height: auto;
  }
  /*
  .hero__circle {
    position: absolute;
    top: 254px;
    right: 0;
    translate: 50%;
  }*/

  h1 > span {
    background-image: linear-gradient(
    to right,
    var(--accent) 75%,
    var(--accent) 75%
    );
    background-position: 0 1.18em;
    background-repeat: repeat-x;
    background-size: 8px 4px;
  }
  
  .hero__text{
    position: relative;
    text-align: center;
    margin-top: 335px;
  }
  .hero__headline {
    margin-bottom: 24px;
  }
  .hero__headline > br {
    display: none;
  }
  
  .hero__description {
    margin-bottom: 24px;
  }

  .hero__contact {

  }

  @media (min-width: 37.5em) {
    .hero__wrapper{
      padding-bottom: 60px;
    }

    .hero__content {
      display: flex;
      overflow-x: hidden;
      align-items: flex-end;
    }

    .hero__content picture {
      order: 2;
      margin-left: -100px;
    }

    .hero__image{
      width: 20.125rem;
      height: auto;
      left: auto;
      right: 0;
      translate: 0%;
    }

    .hero__rings {
      top: 93px;
    }
    .hero__text {
      width: 63vw;
      text-align: left;
      margin-top: 0;
      z-index: 1;
    }

    .hero__headline {
      margin-bottom: 33px;
    }

    .hero__headline > br {
      display: inline-block;
    }

    .hero__description {
    margin-bottom: 34px;
  }
  }

  @media (min-width: 62.5em) {
    #main{
      overflow: visible;
    }

    .hero{
      margin-top: 0px;
    }
    .hero__wrapper{
      position: relative;
      padding-bottom: 140px;
    }

    .hero__content {
      align-items: flex-start;
    }

    .hero__image {
      margin-block-start: -154px;
      width: 445px;
    }

    .hero__rings {
      top: 0px;
      translate: -50% -50%;
    }

    .hero__headline {
      margin-bottom: 43px;
    }

    .hero__headline > br {
      display: none;
    }

    .hero__description {
      width: 38ch;
      margin-block-end: 66px;
    }
  }

  /* SKILLS */
  
    .skills {
      position: relative;
    }

    .skills__wrapper {
      display: grid;
      grid-template-columns: 1fr;
      gap: 24px;
      padding-block: 40px;
    }

    .skills__item {
      text-align: center;
    }

    .skills__title {
      font-size: 2rem;
      font-size: clamp(2rem, 0.33rem + 7.11vw, 3rem);
      line-height: 1.17;
      margin-block-end: 2px;
    }

    .skills__description {
      margin-block-end: 0;
    }

    .skills__rings {
      position: absolute;
      bottom: -154px;
      left: 50%;
      translate: 0 50%;
      z-index: -1;
      height: auto;
    }

    @media (min-width: 37.5em) {
      .skills__wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 52px 24px;
        padding-block: 52px;
      }

      .skills__item {
        text-align: left;
      }
      
      .skills__rings {
        translate: 40% 50%;
      }
    }

    @media (min-width: 62.5em) {

      .skills{
        overflow: hidden;
      }

      .skills__wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 58px 30px;
        padding-block: 72px;
      }

      .skills__rings {
        translate: -40% 50%;
        left: 100%;
        margin-bottom: 235px;
      }
    }

/* PROJECTS */

 .projects {

 }

.projects__wrapper {
  padding-block: 80px;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.projects__headline {
  margin-block-end: 0;
  margin-bottom: 40px;
}

.projects__item {
  grid-column: 1/ span 2;
}

.projects__picture {
  display: block;
  margin-block-end: 20px;
}

.projects__image {
  width: 100%;
  height: auto;
}

.projects__name {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  margin-block-end: 7px;
}

.projects__tags {
  display: flex;
  justify-content: left;
  gap: 12px;
  margin-block-end: 20px;
  text-transform: uppercase;
}

.projects__links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}

@media (min-width: 37.5em) {
  .projects__grid {
    gap: 60px 24px;
    justify-items: start;
    text-align: left;
  }

  .projects__item {
    grid-column: span 1;
  }
}

@media (min-width: 62.5em) {
  .projects__grid {
    gap: 70px 30px;
  }
  .projects__item {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
  }
  
  .projects__item picture {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  .projects__image picture {
    width: 100%;
    height: auto;
   
  }
  .projects__picture {
    position: relative;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    z-index: -1;
  }

  .projects__picture::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 98.8%;
    top: 0;
    background-color: hsl(0, 0%, 0%);
    opacity: 0;
    transition: opacity 150ms ease-in-out;
    right: 0;
  }

  .projects__item:hover .projects__picture::after {
    opacity: 0.5;
  }
  .projects__item:hover .projects__links {
    opacity: 1;
  }
  
  .projects__item:focus-within .projects__links {
    opacity: 1;
  }

  .projects__item:focus-within .projects__picture::after {
    opacity: 0.5;
  }

  .projects__links {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    justify-self: center;
    opacity: 0;
  }
  .projects__tags {
    margin-block-end: 0;
  }
}

/* CONTACT */

.contact {
  position: relative;
}

.contact__wrapper {
  padding-block: 84px;
}

.contact__text {
  text-align: center;
  max-width: 27.8rem;
  margin-inline: auto;
}

.contact__headline {
  margin-block-end: var(--fs-20);
}

.contact__form{
  max-width: 27.8rem;
  margin-inline: auto;
}

.contact__control {
  position: relative;
  margin-block-end: 16px;
}

.contact__control input,
.contact__control textarea {
  width: 100%;
  padding-block: 16px;
  padding-inline: 24px;
  border: none;
  border-bottom: 1px solid var(--text1);
  background: transparent;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--text1);
}

.contact__control input:focus-visible,
.contact__control textarea:focus-visible {
  outline: none;
  outline-offset: 1px;
  border-bottom-color: var(--accent); 
}

.contact__control input:invalid,
.contact__control textarea:invalid {
  outline-color: 1px solid var(--text1);
}

.contact__control ::placeholder {
  color: var(--text1);
  opacity: 0.5;
  text-transform: uppercase;
}

.contact__control.align-right {
  display: flex;
  justify-content: flex-end;
}

.contact__control textarea {
  margin-block-end: 32px;
}

.contact__control button {
  background-color: transparent;
  border: none;
}

.contact__invalid-icon {
  display: none;
  width: var(--fs-24);
  height: var(--fs-24);
  position: absolute;
  top: 50%;
  right: 0;
  translate: -50% -50%;
}

.contact input:focus-visible:invalid ~ .contact__invalid-icon,
.contact textarea:focus-visible:invalid ~ .contact__invalid-icon {
  display: inline-block;
}

.contact textarea:focus-visible:invalid ~ .contact__invalid-icon {
  top: 1.2rem;
  right: 1.5rem;
  translate: none;
}

.contact__rings {
  position: absolute;
  left: 0;
  bottom: 97px;
  translate: -75%;
}

@media (min-width: 37.5em) {
  .contact__rings {
    bottom: 47px;
    translate: -75%;
  }
}

@media (min-width: 62.5em) {
  .contact__wrapper {
    display: grid;
    grid-template-columns: repeat(2, 27.8rem);
    justify-content: space-between;
  }

  .contact__headline {
    margin-block-end: var(--fs-36);
  }

  .contact__rings {
    translate: -40%;
  }
}

footer {
  padding-block: 40px 40px;
}

@media (min-width: 37.5em) {
  footer {
    padding-block: 30px;
  }

  .footer__nav{
    margin-bottom: 0;
  }
}

@media (min-width: 62.5em) {
  footer {
    padding-block: 47px 92px;
  }
}