@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --header-height: 3.5rem;
  --footer-height: 1.5rem;
  --primary-color: rgb(47, 83, 181);
  --primary-color-light: rgba(47, 83, 181);
  --primary-color-dark: rgb(37, 55, 103, 1);

  --title-color: rgba(222, 222, 222, 1);
  --font-color: rgba(176, 176, 176, 1);
  --background-color: rgba(11, 13, 14, 1);
  --container-color: rgba(18, 21, 22, 1);
  --border-color: rgba(51, 51, 51, 1);

  --body-font: "Jost", sans-serif;
  --big-font-size: 3rem;
  --h1-font-size: 2.5rem;
  --h2-font-size: 2.25rem;
  --h3-font-size: 1.5rem;
  --larger-font-size: 1.25rem;
  --large-font-size: 1.125rem;
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

input,
textarea,
button,
body {
  font-family: var(--body-font);
  font-size: var(--bigger-font-size);
}

body {
  background-color: var(--background-color);
  color: var(--font-color);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 6rem;
}

.section-title {
  font-size: var(--h1-font-size);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.title-center {
  text-align: center;
  margin-bottom: 3rem;
  width: auto;
  position: relative;
}

.underline {
  position: relative;
}

.underline::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  width: 20rem;
  height: 2px;
  left: calc(50% - 10rem);
  background-color: var(--primary-color);
  transform-origin: 50% 50%;
  transform: scaleX(0);
  transition: transform 0.5s ease;
  /* margin-top: 2.5rem; */
}

.underline:hover::after {
  transform: scaleX(1);
}

.section-title::before {
  content: attr(data-title);
  color: var(--primary-color);
  display: block;
  font-size: var(--large-font-size);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

input,
textarea,
button {
  border: none;
  outline: none;
  background-color: transparent;
}

input[type="checkbox"],
input[type="radio"] {
  display: none;
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: 600;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Header */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-color);
  z-index: 1000;
  box-shadow: 0 3px 9px rgba(0, 0%, 0%, 0.05);
}

.placeholder {
  height: calc(var(--header-height) + 2.75rem);
}

/* Nav */

.nav,
.nav-list {
  display: flex;
}

.nav {
  align-items: center;
  justify-content: space-between;
  height: calc(var(--header-height) + 2.25rem);
}

.nav-logo {
  font-size: var(--h2-font-size);
  /* font-weight: 700; */
  color: var(--primary-color);
}

.nav-logo:hover {
  color: var(--primary-color-dark);
}

.nav-list {
  column-gap: 1.5rem;
}

.nav-link {
  color: var(--title-color);
  transition: all 0.3s ease;
}

.nav-toggle {
  display: none;
}

.active-link,
.nav-link:hover {
  color: var(--primary-color);
}

/* Home */

.home {
  background-color: var(--container-color);
  padding-block: 9rem 3rem;
}

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

.home-small {
  font-size: var(--large-font-size);
  font-weight: 600;
  letter-spacing: 1px;
}

.home-title {
  font-size: var(--big-font-size);
  line-height: 1.4;
}

.home-title span {
  font-weight: 300;
}

.typed {
  font-size: 0.8em;
}

.cursor {
  font-size: 1.2em;
}

.blinking {
  -webkit-animation: blink 0.5s infinite;
  animation: blink 0.5s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.home-desc {
  margin-block: 1.5rem 3rem;
}

/* Home Image */

.home-img {
  width: 400px;
}

.home-img-container {
  margin-inline: auto 2rem;
  position: relative;
}

.home-img-container::before,
.home-img-container::after {
  content: "";
  position: absolute;
  inset: 0;
  /* width: 100%;
    height: 100%; */
  /* border: 2px solid var(--primary-color); */
  /* transition: all 0.5s ease; */
}

.home-img-container::before {
  background-color: var(--primary-color-light);
  animation: animate-before 8s ease-in-out infinite;
}

.home-img-container::after {
  /* top: 5%;
    left: 5%;
    width: 90%;
    height: 90%; */
  background-color: var(--primary-color-dark);
}

.home-img-container::after,
.home-img {
  animation: animate-after 8s ease-in-out infinite;
}

@keyframes animate-before {
  0% {
    border-radius: 47% 53% 76% 24% / 28% 59% 41% 72%;
  }
  25% {
    border-radius: 31% 69% 36% 64% / 62% 61% 39% 38%;
  }
  50% {
    border-radius: 68% 32% 74% 26% / 25% 33% 67% 75%;
  }
}

.home-img {
  width: 400px;
}

.home-img-container {
  margin-inline: auto 2rem;
  position: relative;
}

.home-img-container::before,
.home-img-container::after {
  content: "";
  position: absolute;
  inset: 0;
  /* width: 100%;
    height: 100%; */
  /* border: 2px solid var(--primary-color); */
  /* transition: all 0.5s ease; */
}

.home-img-container::before {
  background-color: var(--primary-color-light);
  animation: animate-before 8s ease-in-out infinite;
}

.home-img-container::after {
  /* top: 5%;
    left: 5%;
    width: 90%;
    height: 90%; */
  background-color: var(--primary-color-dark);
}

.home-img-container::after,
.home-img {
  animation: animate-after 8s ease-in-out infinite;
}

@keyframes animate-before {
  0% {
    border-radius: 47% 53% 76% 24% / 28% 59% 41% 72%;
  }
  25% {
    border-radius: 31% 69% 36% 64% / 62% 61% 39% 38%;
  }
  50% {
    border-radius: 68% 32% 74% 26% / 25% 33% 67% 75%;
  }
  75% {
    border-radius: 31% 69% 36% 64% / 62% 61% 39% 38%;
  }
  100% {
    border-radius: 47% 53% 76% 24% / 28% 59% 41% 72%;
  }
}

@keyframes animate-after {
  0% {
    border-radius: 26% 74% 74% 26% / 60% 56% 44% 40%;
  }
  25% {
    border-radius: 49% 51% 31% 69% / 73% 51% 49% 27%;
  }
  50% {
    border-radius: 48% 52% 58% 42% / 35% 52% 48% 65%;
  }
  75% {
    border-radius: 49% 51% 31% 69% / 73% 51% 49% 27%;
  }
  100% {
    border-radius: 26% 74% 74% 26% / 60% 56% 44% 40%;
  }
}

.home-img {
  position: relative;
  z-index: 10;
  vertical-align: middle;
}

/* Button */

.home-btn {
  display: flex;
  column-gap: 1rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: white;
  margin: 0.5rem 0;
  padding: 1rem 2rem;
  font-size: var(--large-font-size);
  border-radius: 0.5rem;
  transition: all 0.5s ease;
}

.btn-transparent {
  background-color: transparent;
  color: var(--primary-color);
}

.btn:hover {
  background-color: var(--primary-color-dark);
  color: var(--background-color);
  /* border-color: var(--primary-color-dark); */
}

.btn-transparent:hover {
  color: var(--primary-color);
  color: var(--background-color);
}

/* About */

.about-container {
  grid-template-columns: 4fr 8fr;
  align-items: center;
}

.about-img-container {
  position: relative;
  height: 400px;
}

.about-img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.about-img:nth-child(1) {
  clip-path: polygon(0 0, 0 32%, 28% 0);
  transform: translateY(-1.25rem);
}

.about-img:nth-child(2) {
  clip-path: polygon(28% 0, 90% 0, 17% 100%, 0 100%, 0 32%);
  transform: translateY(-0.75rem);
}

.about-img:nth-child(3) {
  clip-path: polygon(90% 0, 100% 0, 100% 65%, 74% 100%, 17% 100%);
  transform: translateY(-0.25rem);
}

.about-img:nth-child(4) {
  clip-path: polygon(100% 65%, 74% 100%, 100% 100%);
  transform: translateY(0.25rem);
}

.about-img-container:hover .about-img {
  transform: translateY(0);
}

.about-desc {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.about-data {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  margin-bottom: 3rem;
}

.data-item {
  display: flex;
  column-gap: 0.75rem;
  align-items: baseline;
}

.data-title {
  font-weight: 600;
  font-size: var(--larger-font-size);
}

.about-link {
  color: var(--primary-color-light);
}

.about-bottom,
.about-links {
  display: flex;
  align-items: center;
}

.about-bottom {
  column-gap: 3rem;
}

.about-links {
  column-gap: 1.5rem;
}

.about-links::before {
  content: "";
  display: inline-block;
  width: 8rem;
  height: 2px;
}

.about-link {
  color: var(--font-color);
  transition: all 0.3s ease;
}

.about-link:hover {
  color: var(--primary-color);
}

/* Qualifications */

.qualifications {
  background-color: var(--container-color);
}

.resume-container {
  grid-template-columns: repeat(2, 1fr);
  /* grid-template-rows: repeat(auto-fit, minmax(300px, 1fr)); */
}

.resume-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.resume-heading {
  font-size: var(--h3-font-size);
  padding-bottom: 2rem;
  text-align: center;
}

.resume-heading,
.resume-item {
  border-bottom: 2px solid var(--border-color);
}

.resume-item:not(:first-child) {
  border-right: 2px solid var(--border-color);
}

.resume-item {
  position: relative;
  height: fit-content;
  /* height: 280px; */
}

.resume-header {
  /* height: 7em; */
  padding: 2rem 1.5rem;
}

.resume-subtitle {
  cursor: pointer;
  font-size: var(--larger-font-size);
}

.resume-icon {
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  font-size: var(--h2-font-size);
  height: 48px;
  width: 48px;
  border-radius: 50%;
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  z-index: 10;
  line-height: 1.1em;
  text-align: center;
}

.resume-content {
  padding-inline: 1.5rem 3rem;
  position: relative;
  z-index: 10;
}

.resume-date-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resume-title {
  font-size: var(--h3-font-size);
  /* height: 3em; */
  display: flex;
  align-self: baseline;
  /* font-weight: 600; */
}

.resume-date {
  display: flex;
  align-self: baseline;
  color: var(--title-color);
  font-size: var(--large-font-size);
  min-width: -webkit-fill-available;
  min-width: -moz-fit-content;
  min-width: fit-content;
  /* -moz-fit-content: fit-content;
    min-width: -webkit-fill-available; */
}

.resume-desc {
  margin-block: 1.25rem 2rem;
}

/* Expertise */

.expertise-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.expertise-item {
  background-color: var(--container-color);
  border: 1px solid var(--container-color);
  border-radius: 0.5rem;
  padding: 2.5rem 1.8rem;
  transition: all 0.5s ease;
  position: relative;
}

.expertise-item:hover {
  border-color: var(--border-color);
  background-color: var(--background-color);
  transform: scale(1.02);
}

.expertise-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

.expertise-title {
  font-size: var(--h3-font-size);
  margin-block: 1.5rem 1rem;
}

.type-icon {
  position: absolute;
  top: 1rem;
  right: 2.5rem;
  color: var(--title-color);
  font-size: 4rem;
  opacity: 0.07;
}

/* Skills */

.skills {
  background-color: var(--container-color);
}

.skills-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  row-gap: 4rem;
}

.skills-item {
  display: flex;
  flex-direction: column;

  /* justify-content: space-between; */
}

.skills-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skills-title,
.skills-desc {
  padding: 0 1.5rem;
}

.skills-name {
  font-size: var(--larger-font-size);
}

.skills-no {
  font-size: var(--large-font-size);
  color: var(--title-color);
  font-weight: 600;
}

.skills-desc {
  margin: 1rem 0.8rem;
}

.skills-bar,
.skills-percentage {
  height: 2px;
  transform-origin: left;
}

.skills-bar {
  margin-top: auto;
  background-color: var(--border-color);
  transition: all 1s ease-in-out;
  transform: scaleX(0);
  /* animation: animate-bars 1s ease-in-out forwards; */
  /* animation-timeline: view() calc(view() + 1s); */
  /* animation-range-start: contain; */
}

.skills-bar.animate {
  transform: scaleX(1);
}

.skills-percentage {
  background-color: var(--primary-color);
  position: relative;
  transform: scaleX(0);
  transition: all 0.5s 1s ease-in-out;
  /* animation: animate-bars .5s 1s ease-in-out forwards; */
  /* animation-timeline: view() calc(view() + 1s); */
  /* animation-range-start: contain; */
}

.skills-bar.animate .skills-percentage {
  transform: scaleX(1);
}

.skills-percentage span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: var(--container-color);
  border: 2px solid var(--border-color);
  position: absolute;
  top: -0.75rem;
  right: 0;
}

@keyframes animate-bars {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

/* Projects */

.project-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  border-radius: 1rem;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-details {
  text-align: center;
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(7px);
  color: white;
  opacity: 0;
}

.project-title {
  font-size: var(--h3-font-size);
  margin-block: 1.5rem 0;
}

.prject-desc {
  font-size: var(--large-font-size);
  margin-block: 1rem;
}

.project-title,
.prject-desc,
.project-link {
  transition: all 0.3s ease;
  transform: translateY(1.75rem);
}

.project-link {
  font-size: var(--large-font-size);
  background-color: black;
  padding: 0.5rem;
  margin-block: 1rem;
  border-radius: 30px;
  width: 10rem;
}

.project-link:hover {
  background-color: white;
  color: black;
}

.project-img,
.project-details {
  transition: all 0.3s ease-in-out;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-card:hover .project-details {
  opacity: 1;
}

.project-card:hover .project-title,
.project-card:hover .prject-desc,
.project-card:hover .project-link {
  transform: translateY(0);
}

/* Contact */

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

.contact-container {
  grid-template-columns: 5fr 7fr;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  column-gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item i {
  font-size: var(--h3-font-size);
  color: var(--primary-color);
  display: flex;
  align-self: center;
  justify-self: center;
  transition: all 0.3s ease;
}

.contact-item i:hover {
  color: var(--primary-color-dark);
}

.contact-info {
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
}

.contact-title {
  font-size: var(--large-font-size);
  margin-bottom: 1rem;
}

.contact-data {
  transition: all 0.3s ease;
}

.contact-data:hover {
  color: var(--primary-color);
  cursor: pointer;
}

.form-heading {
  font-size: var(--h3-font-size);
  margin-bottom: 2rem;
  text-align: center;
}

.input-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.5rem;
}

.input-control {
  color: var(--title-color);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  padding: 1rem 0.75rem;
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}

textarea {
  resize: none;
  height: 300px;
}

.contact-btn {
  float: right;
}

/* Footer */

.footer {
  background-color: var(--background-color);
  padding-block: 1.5rem;
  text-align: center;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
}

.footer-links {
  display: flex;
  column-gap: 1.5rem;
}

.footer-link {
  color: var(--font-color);
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

/* Media Queries */

@media screen and (max-width=1200px) {
  :root {
    --big-font-size: 2.5rem;
    --h1-font-size: 2rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --larger-font-size: 1.1rem;
    --large-font-size: 1rem;
  }

  .container {
    max-width: 960px;
  }

  .home-img {
    width: 340px;
  }

  .about-img-container {
    height: 320px;
  }

  .resume-icon {
    line-height: 1.4em;
  }

  .expertise-icon {
    font-size: 1.5rem;
  }

  .type-icon {
    font-size: 3rem;
  }

  .expertise-title {
    font-size: var(--h2-font-size);
  }

  .style-switcher-colors .color {
    width: 24px;
    height: 24px;
  }

  .style-switcher-toggler,
  .style-switcher-themes {
    width: 40rem;
    height: 40rem;
  }

  .style-switcher-toggler {
    top: 10%;
  }

  .style-switcher-themes {
    bottom: 10%;
  }
}

@media screen and (max-width: 992px) {
  .container {
    max-width: 720px;
  }

  .home-container,
  .about-container,
  .resume-container,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .home-content {
    order: 1;
  }

  .home-img-container {
    margin-inline: auto;
    width: 300px;
  }

  .about-container,
  .contact-container {
    row-gap: 2rem;
  }

  .about-img-container {
    height: 280px;
  }

  .about-img:not(:first-child) {
    display: none;
  }

  .about-img:first-child {
    clip-path: initial;
    transform: initial;
    left: 50%;
    transform: translateX(-50%);
  }

  .about-img-container:hover .about-img {
    transform: scale(1.05);
  }

  .expertise-icon {
    font-size: 1.25rem;
  }

  .type-icon {
    font-size: 2.5rem;
  }

  .style-switcher-colors .color {
    width: 20px;
    height: 20px;
  }

  .style-switcher-toggler,
  .style-switcher-themes {
    width: 30rem;
    height: 30rem;
  }

  .style-switcher-toggler {
    top: 10%;
  }

  .style-switcher-themes {
    bottom: 10%;
  }
}

@media screen and (max-width: 768px) {
  .container {
    max-width: 560px;
  }

  .nav {
    height: calc(var(--header-height) + 1rem);
  }

  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    width: 15rem;
    background-color: var(--background-color);
    opacity: 0;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 3px 9px rgba(0, 0%, 0%, 0.05);
    overflow: hidden;
    max-height: 500px;
    transition: all 0.3s ease;
    transform: scaleY(0);
    transform-origin: top;
  }

  .nav-toggle {
    display: block;
    color: var(--font-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
  }

  .nav-toggle:hover {
    color: var(--primary-color);
  }

  #nav-toggler:checked ~ .nav-list {
    /* max-height: 500px; */
    padding: 1.75rem;
    transform: scaleY(1);
    opacity: 1;
  }

  #nav-toggler:checked ~ .nav-toggle {
    transform: rotate(90deg);
  }
}

@media screen and (max-width: 576px) {
  :root {
    --big-font-size: 2rem;
    --h1-font-size: 1.75rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --larger-font-size: 1rem;
    --large-font-size: 0.875rem;
  }

  .section {
    padding-block: 4rem;
  }

  .home {
    padding-block: 6rem 1.5rem;
  }

  .container {
    max-width: 90%;
  }

  .about-container,
  .contact-container {
    max-width: 100%;
    row-gap: 1.5rem;
  }

  .input-group {
    grid-template-columns: 1fr;
  }

  .home {
    text-align: center;
  }

  .home-img-container {
    width: 250px;
  }

  .about {
    text-align: center;
  }

  .about-data {
    grid-template-columns: 1fr;
  }

  .data-item {
    justify-content: center;
  }

  .about-bottom {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-links::before {
    display: none;
  }

  .resume-icon {
    font-size: 2.2rem;
  }

  .expertise-container,
  .skills-container,
  .project-container {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media screen and (max-width: 450px) {
  .home-container {
    max-width: 95%;
  }

  .home-img-container {
    width: 220px;
    max-width: 90%;
  }
}
