/* GLOBAL */

:root {
  --bg-body: hsl(0, 0%, 8%);
  --bg-body2: hsl(0, 0%, 14%);
  --accent: hsl(153, 71%, 59%);
  /* #4ce19e */
  --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,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-sizing: inherit;
}

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

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text1);
  font-size: var(--fs-18);
  line-height: 1.56;
  /* padding-bottom: 25rem; */
}

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

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

h1,
h2,
h3 {
  line-height: 1;
}

.header-xl {
  font-size: 2.5rem;
  font-size: clamp(2.5rem, 0.7rem + 7.68vw, 5.5rem);
  letter-spacing: -0.028em;
  line-height: 1.1;
}

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

a {
  transition: color var(--transition);
}

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

input:invalid,
textarea:invalid {
  outline-color: var(--invalid);
}

a.underline,
button {
  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;
}

a:hover {
  color: var(--accent);
}

img,
svg {
  display: block;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wrapper {
  width: calc(100% - 2rem);
  max-width: var(--container);
  margin-inline: auto;
}

/* 600px */
@media (min-width: 37.5em) {
  .wrapper {
    width: calc(100% - 3.75rem);
  }
}

/* UTILITY */

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

/* HEADER */

.header {
  position: relative;
  z-index: 1;
  margin-block-start: 20px;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 20px 25px;
}

.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%;
}

.header-social>svg>path {
  transition: fill var(--transition);
}

.header-social:hover>svg>path {
  fill: var(--accent);
}

@media (min-width: 37.5em) {
  .header {
    margin-block-start: 30px;
    /* margin-block-end: 90px; */
  }

  .header-nav {
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 32px;
  }

  .header-home {
    flex: 0 1 auto;
    margin-inline-end: auto;
  }
}

@media (min-width: 62.5em) {
  .header {
    margin-block-start: 40px;
    margin-block-end: 127px;
  }

  .header-nav {
    padding-right: 30px;
  }
}

/*  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;
  /* 8.125rem; */
  z-index: -1;
  /* width: 33.125rem; */
  height: auto;
}

.hero-circle {
  position: relative;
  top: 171px;
  margin-bottom: -129px;
  translate: calc(100vw - 64px - 16px);
}

.hero-text {
  position: relative;
  text-align: center;
  margin-block-start: 400px;
}

.hero-headline {
  margin-block-end: 24px;
}

.hero-headline>br {
  display: none;
}

h1>span {
  background-image: -webkit-linear-gradient(to right,
      var(--accent) 75%,
      transparent 75%);
  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-description {
  margin-block-end: 24px;
}

@media (min-width: 37.5em) {
  .hero {
    position: relative;
    margin-block-start: -62px;
  }

  .hero-wrapper {
    padding-bottom: 60px;
  }

  .hero-content {
    display: flex;
    align-items: center;
  }

  .hero-content picture {
    order: 2;
  }

  .hero-image {
    position: relative;
    width: 42vw;
    max-width: 445px;
    /* width: 322px; */
    height: auto;
    left: auto;
    right: 0;
    translate: 0;
  }

  .hero-rings {
    top: 90px;
    right: auto;
    left: 0;
    translate: -50%;
  }

  .hero-circle {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 190px;
    translate: 50%;
    z-index: 1;
  }

  .hero-text {
    /* width: 62vw; */
    margin-block-start: 90px;
    margin-right: -30px;
    flex: 1 0 58vw;
    text-align: left;
    z-index: 1;
  }

  .hero-headline {
    margin-block-end: 60px;
  }

  .hero-headline>br {
    display: inline-block;
  }

  .hero-description {
    /* width: 70%; */
    margin-block-end: 34px;
  }
}

@media (min-width: 62.5em) {
  .hero {
    margin-block-start: 0px;
  }

  .hero-wrapper {
    position: relative;
    padding-bottom: 100px;
  }

  .hero-content {
    align-items: flex-start;
  }

  .hero-content picture {
    margin-left: -80px;
  }

  .hero-image {
    margin-block-start: -199px;
  }

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

  .hero-circle {
    top: 322px;
    right: 445px;
  }

  .hero-text {
    margin-block-start: 0;
    margin-right: 0;
    flex: 1;
  }

  .hero-headline {
    margin-block-end: 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: 0;
  left: 50%;
  translate: 0 50%;
}

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

  .skills-item {
    text-align: left;
  }

  .skills-rings {
    translate: 40% 50%;
  }
}

@media (min-width: 62.5em) {
  .skills-wrapper {
    grid-template-columns: repeat(3, 1fr);
    gap: 58px 30px;
    padding-block-start: 72px;
  }

  .skills-rings {
    translate: -40% 50%;
    left: 100%;
  }
}

/* PROJECTS */

.projects-wrapper {
  padding-block: 140px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.projects-headline {
  grid-column: 1 / span 2;
  margin-block-end: 0;
}

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

.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: center;
  gap: 12px;
  margin-block-end: 20px;
  text-transform: uppercase;
}

.projects-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

  .projects-contact {
    justify-self: end;
  }

  .projects-item {
    grid-column: span 1;
  }

  .projects-headline,
  .projects-contact {
    grid-column: span 1;
  }

  .projects-contact {
    align-self: center;
  }

  .projects-tags,
  .projects-links {
    display: block;
  }

  .projects-tags span {
    margin-inline-end: 18px;
  }

  .projects-links a {
    margin-inline-end: 30px;
  }

  .project-links {
    display: block;
  }
}

@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-picture {
    position: relative;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

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

  .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-image {
    width: 100%;
    height: auto;
  }

  .projects-links {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    justify-self: center;
    align-self: center;
    z-index: 1;
    opacity: 0;
    transition: opacity 400ms ease-in-out;
  }

  .projects-links:hover~.projects-picture::after {
    opacity: 0.5;
  }

  .projects-tags {
    margin-block-end: 0;
  }
}

/* CONTACT */

.contact {
  position: relative;
}

.contact-wrapper {
  padding-block: 84px;
}

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

.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>*::placeholder {
  color: var(--text1);
  opacity: 0.5;
  text-transform: uppercase;
}

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

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

.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%;
  }
}

/* 999.98px */
@media (max-width: 62.49875em) {
  .contact-wrapper {
    max-width: 27.8rem;
  }

  .contact-text {
    text-align: center;
  }
}

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

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

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

/* --------------------------------------------- MY CODE NEED TO CLEAN --------------------------------------------- */
.hero-img {
  position: relative;
  /* height: 421.2px;
  width: 400px; */
}

.hero-img-mask-circle1,
.hero-img-mask-circle2 {
  z-index: 1;
  position: absolute;
  background-color: var(--bg-body);
}

.hero-img-mask-circle1 {
  left: -51px;
  top: 240px;
  width: 56.575px;
  transform: translate(43.2px, -46.6px);
  height: 142.8px;
}

.hero-img-mask-circle2 {
  left: 313px;
  top: 287px;
  height: 174.106px;
  transform: translate(0px, -92.1882px);
  width: 91.9965px;
}

/* ANIMATION code */
.hero-img-container {
  position: relative;
  width: 400px;
  height: 400px;
}

/* Image styling */
/* .hero-img-image-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    mix-blend-mode: lighten;
    opacity: 0;
    animation: fadeInImage 2.4s ease-in-out forwards;
} */
.hero-img-image-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  mix-blend-mode: lighten;
  opacity: 2;
  /* Fully visible */
}

.hero-img-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* Circle animation styling */
.hero-img-circle-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.hero-img-animated-circle {
  fill: transparent;
  /* stroke: #00ff99; */
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 15 120 25 25;
  transform-origin: center;
  animation: rotateCircle 20s linear infinite, dashAnimation 20s linear infinite;
}

.hero-img-bottom-circle {
  fill: none;
  stroke: var(--accent, black);
  /* Default color is black */
  stroke-width: 7;
  stroke-linecap: round;
}

/* Keyframes for rotating the circle */
@keyframes rotateCircle {
  0% {
    transform: rotate(120deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Keyframes for changing dasharray */
@keyframes dashAnimation {
  0% {
    stroke-dasharray: 15 120 25 25;
  }

  50% {
    stroke-dasharray: 16 25 92 72;
  }

  100% {
    stroke-dasharray: 4 250 22 22;
  }
}

.header-name {
  color: white;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

.header-name #name {
  color: var(--accent);
}

.header-name:hover {
  transition: 0.5s;
  color: var(--accent);
}

/* MOBILE */
@media (max-width: 37.5em) {
  .header-name {
    font-size: 2rem;
  }

  .hero-rings {
    right: 280px;
  }

  .skills-rings {
    left: 280px;
  }

  .hero-img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 125px;
  }

  .hero-img-container {
    position: relative;
    width: 350px;
    height: 350px;
  }

  .hero-img-mask-circle1 {
    height: 144.4px;
  }

  .hero-img-mask-circle2 {
    left: 274px;
    top: 248px;
  }
}

/* Head line */
.headline-container {
  position: relative;
}

.faded-headline {
  position: absolute;
  top: 25px;
  opacity: 0.08;
  background: linear-gradient(to bottom, #14141400, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.projects-image {
  border-radius: 15px;
}

/* TOP SKILL */
.top-skills {
  grid-column: span 0;
}

.top-skills-h2 {
  font-size: 2.5rem;
  text-align: center;
}

.mobile-skill {
  text-decoration: underline var(--accent);
}

@media (min-width: 600px) {
  .top-skills {
    grid-column: span 3;
  }

  .mobile-skill {
    text-decoration: none;
  }

  .top-skills-h2 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    margin: 0;
  }

  .line {
    width: 60px;
    height: 2px;
    margin-left: 10px;
    background-color: var(--accent);
  }
}

/* SERVICES */
.services {
  position: relative;
}

.services-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: 40px;
}

.top-services-h2 {
  font-size: 2.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mobile-service {
  text-decoration: underline var(--accent);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 24px;
}

.service-item {
  background: var(--bg-body2);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(76, 225, 158, 0.08);
}

.service-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 32px rgba(76, 225, 158, 0.12);
  border-color: var(--accent);
}

.service-icon {
  width: 54px;
  height: 54px;
  font-size: 2.5rem;
  margin-bottom: 1.1rem;
  filter: grayscale(1) brightness(1.2);
  opacity: 0.85;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.service-description {
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.services-rings {
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: 0 50%;
}

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 32px;
  }

  .top-services-h2 {
    font-size: 2rem;
  }

  .services-rings {
    translate: 40% 50%;
  }
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 36px;
  }

  .services-rings {
    translate: -40% 50%;
    left: 100%;
  }
}