@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,600;0,700;1,300&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  /* border: 1px solid red; */
  outline: none;
  font-family: "Poppins", sans-serif;
}

:root {
  --bg-color: #1f242d;
  --secound-bg-color: #323946;
  --text-color: #fff;
  --main-color: #0ef;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
}

section {
  min-height: 100vh;
  padding: 2rem 9% 2rem;
}

.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.4rem 9%;
  background: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.header.sticky {
  border-bottom: 0.1rem solid rgba(0, 0, 0, 0.2);
}

.logo img {
  max-width: 10rem;
}

.navbar {
  display: flex;
  gap: 4rem;
}

.navbar a {
  font-size: 1.7rem;
  color: var(--text-color);
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
}

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

.home-content h3 {
  font-size: 3.2rem;
  font-weight: 700;
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 2rem;
}

span {
  color: var(--main-color);
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.3;
}

.home-img img {
  width: 40vw;
  height: 40vw;
  animation: floatImage 4s ease-in-out infinite;
}

.home-content p {
  font-size: 1.6rem;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--main-color);
  margin: 3rem 1.5rem 3rem 0;
  transition: 0.5s ease;
}

.social-media a:hover {
  background: var(--main-color);
  color: var(--secound-bg-color);
  box-shadow: 0 0 1rem var(--main-color);
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background: var(--main-color);
  border-radius: 4rem;
  box-shadow: 0 0 .8rem var(--main-color);
  font-size: 1.6rem;
  color: rgba(0, 0, 0, 0.846);
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.5s ease;
}

.btn:hover {
  box-shadow: none;
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.4rem;
  background: var(--secound-bg-color);
}

.heading {
  text-align: center;
  font-size: 4.5rem;
}

.about-img {
  position: relative;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img img {
  width: 20vw;
  height: 20vw;
  object-fit: contain;
  border-radius: 50%;
  border: 0.2rem solid var(--main-color);
  background-color: rgba(0, 0, 0, 0.352);
  margin: 1.5rem;
}

.about-img .circle-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border-left: 0.5rem solid var(--main-color);
  border-right: 0.5rem solid var(--main-color);
  border-top: 0.2rem solid transparent;
  border-bottom: 0.2rem solid transparent;
  animation: borderSpinner 5s linear infinite;
}

.about-content h2 {
  text-align: left;
  line-height: 1.2;
}

.about-content h3 {
  font-size: 2.6rem;
}

.about-content p {
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
}

.about-section {
  display: flex;
  align-items: center;
  gap: 4rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-work h1 {
  font-size: 3rem;
  margin-bottom: 1.2rem;
}

.about-work ol {
  position: relative;
  border-left: 4px solid var(--text-color);
}

.about-work li {
  list-style: none;
}

.about-work li h2,
.about-work li p {
  font-size: 1.5rem;
  padding-left: 1.7rem;
  /* padding-top: 2rem; */
}

.about-work-fill {
  display: block;
  position: absolute;
  left: -14px;
  height: 24px;
  width: 24px;
  justify-content: center;
  align-items: center;
}

.about-study h1 {
  font-size: 3rem;
  margin-bottom: 1.2rem;
}

.about-study ol {
  position: relative;
  border-left: 4px solid var(--text-color);
}

.about-study li {
  list-style: none;
}

.about-study li h2,
.about-study li p {
  font-size: 1.5rem;
  padding-left: 1.7rem;
  /* padding-top: 2rem; */
}

.about-study-fill {
  display: block;
  position: absolute;
  left: -14px;
  height: 24px;
  width: 24px;
  justify-content: center;
  align-items: center;
}

.icon-study {
  background: var(--text-color);
  color: var(--bg-color);
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.icon-work {
  background: var(--text-color);
  color: var(--bg-color);
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.skill h2 {
  margin-bottom: 5rem;
}

.skill-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.skill-container .skill-box {
  flex: 0 1 200px;
  /* background: var(--secound-bg-color); */
  border: none;
  padding: 2rem 2rem 5rem;
  border-radius: 2rem;
  text-align: center;
  border: 0.2rem solid var(--bg-color);
  transition: 0.5s ease;
  /* min-height: 224px; */
}

.skill-container .skill-box:hover {
  /* border-color: var(--main-color); */
  transform: scale(1.05);
}

.skill-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.skill-box img {
  width: 96px;
  height: 96px;
}

.skill-box h3 {
  font-size: 1.8rem;
}

.project {
  background: var(--secound-bg-color);
}

.project h2 {
  margin-bottom: 4rem;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 2rem;
}

.project-container .project-box {
  position: relative;
  border-radius: 2rem;
  box-shadow: 0 0 1rem var(--bg-color);
  overflow: hidden;
  display: flex;
}

.project-box img {
  width: 100%;
  height: 312px;
  object-fit: fill;
  transition: 0.5s ease;
  background-color: rgba(0, 0, 0, 0.544);
}

.project-box:hover img {
  transform: scale(1.1);
}

.project-box .project-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.4), var(--bg-color));
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 0 4rem;
  transform: translateY(100%);
  transition: all 0.5s ease;
}

.project-box:hover .project-layer {
  transform: translateY(0);
}

.project-layer h4 {
  font-size: 3rem;
}

.project-layer p {
  font-size: 1.6rem;
  margin: 0.3rem 0 1rem;
}

.project-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  background: var(--text-color);
  border-radius: 50%;
}

.project-layer a i {
  font-size: 2rem;
  color: var(--secound-bg-color);
}

.achieve h2 {
  margin-bottom: 2.4rem;
}

.achieve-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  justify-content: center;
}

.achieve-box {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  background: var(--secound-bg-color);
  padding: 24px;
  border-radius: 1rem;
  width: 300px;
  min-height: 230px;
  max-width: 300px;
}

.achieve-box a {
  text-decoration: none;
  padding: 4px;
}

.achieve-box h2 {
  padding-top: 4px;
  padding-bottom: 12px;
  margin: 0;
}

.achieve-box p {
  font-size: 1.2rem;
}

.achieve-box p.from {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0 0 4px 0;
}

.achieve-box a i:hover{
  background: var(--bg-color);
}

.achieve-box a i {
  font-size: 2.2rem;
  color: var(--text-color);
}

.achieve-info img{
  width: 5rem;
  height: 5rem;
}

.contact h2 {
  margin-bottom: 3rem;
}

.alert {
  font-size: 2rem;
  text-align: center;
  display: none;
}

.btn-close {
  background: transparent;
  font-size: 3rem;
  color: var(--text-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.5s ease;
}

.btn-close:hover {
  transform: scale(1.2);
}

.contact {
  background: var(--secound-bg-color);
}

.contact form {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  padding: 1.5rem;
  font-size: 1.6rem;
  background: var(--bg-color);
  border-radius: 0.8rem;
  margin: 0.7rem 0;
  color: var(--text-color);
}

.contact form .input-box input {
  width: 49%;
}

.contact form textarea {
  resize: none;
  width: 100%;
}

.contact form .btn {
  margin-top: 2rem;
  cursor: pointer;
}

#to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  height: 5rem;
  width: 5rem;
  padding: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  border: 2px solid var(--main-color);
  background: var(--bg-color);
  color: var(--main-color);
  display: block;
}

#to-top:hover {
  background: var(--main-color);
  color: var(--text-color);
}

.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 9%;
  /* background: var(--secound-bg-color); */
}

.footer-text p {
  font-size: 1.6rem;
}

/* breakpoints responsive */

@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }

  section {
    padding: 10rem 3% 2rem;
  }

  .skill {
    padding-bottom: 7rem;
  }

  .project {
    padding-bottom: 7rem;
  }

  .contact {
    min-height: auto;
  }

  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background-color: var(--bg-color);
    border-top: 0.1 solit rgba(0, 0, 0, 0.2);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    display: none;
  }

  .navbar.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
  }

  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 3rem 0;
  }

  .home {
    flex-direction: column;
  }

  .home-content h3 {
    font-size: 2.6rem;
  }

  .home-content h1 {
    font-size: 5rem;
  }

  .home-img img {
    width: 70vh;
    margin-top: 4rem;
  }

  .about {
    flex-direction: column;
  }

  .about img {
    width: 70vh;
  }

  .skill h2 {
    margin-bottom: 3rem;
  }

  .project h2 {
    margin-bottom: 3rem;
  }

  .project-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 617px) {
  .project-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }

  section {
    min-height: 100vh;
    padding: 16px;
  }

  .home {
    justify-content: start;
  }

  .home-content {
    margin-left: 1.2rem;
    margin-right: 1.2rem;
  }

  .about-content {
    margin: 2rem;
  }

  .skill-box {
    border: none;
  }

  .contact form {
    margin: 2rem;
  }

  .contact form .input-box input {
    width: 100%;
  }

  .home-img img {
    width: 100vw;
  }

  .about-img img {
    width: 50vw;
    height: 50vw;
  }

  .skill-container .skill-box {
    margin: auto;
  }

  .skill-box img {
    width: 30vw;
    height: 30vw;
  }

  .project-container .project-box {
    margin: 0 1rem 0 1rem;
  }
}

@media (max-width: 365px) {

  .footer {
    flex-direction: column;
  }

  .footer p {
    text-align: center;
    margin-top: 2rem;
  }
}

/* Animation */

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2.4rem);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes borderSpinner {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}