:root {
  /* --primary-color: rgb(83, 172, 192); */
  --primary-color: rgb(71, 132, 146);
  --primary-color-rgb: 71, 132, 146;
  --star1-color: #56b7c6;
  --star2-color: #45848e;
  --primary-linear: linear-gradient(180deg, #51a2b2 0%, #3a6876 100%);
  --background-color: #f5f5f5;
  --text-color: #1a1e22;
  --subtext-color: #1a1e22e4;
  --title-font: "ClashDisplay-Variable";
  --text-font: "Switzer-Variable";
  --border-color: rgba(0, 0, 0, 0.3);
  --gold-color-rgb: rgb(194, 167, 13);
  --gold-color-rgb: 194, 167, 13;
}

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

*:focus {
  outline: none;
}

body {
  font-family: var(--text-font);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--title-font);
}

span,
p {
  font-family: var(--text-font);
}

a {
  font-family: var(--title-font);
  text-decoration: none;
  color: #000;
  font-weight: 600;
  transition: color 300ms;
}

a:hover,
a:focus {
  color: var(--primary-color);
}

a.btn-def {
  height: fit-content;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0) 100%
    ),
    var(--btn-color, #05457a);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 10px;
  transition:
    box-shadow 300ms,
    color 300ms;
  cursor: pointer;
}

a.btn-def:hover,
a.btn-def:focus {
  color: #fff;
  box-shadow: 0px 0px 30px -10px var(--btn-color, #05457a);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(/images/bg.png);
  z-index: -1;
  opacity: 0.8;
}

footer {
  display: none;
  text-align: center;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: rgba(var(--primary-color-rgb), 0.4);
  filter: brightness(0.5);
  font-size: small;
}

section {
  --section-height: calc(100dvh - 2cm);
  min-height: var(--section-height);
  width: 100%;
  margin: 0 1.4cm;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

section .bg div:nth-of-type(1)::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -32px;
  height: 130%;
  width: 100px;
  background: #ff000042;
  rotate: 30deg;
  border-radius: 15px;
  border: 1px solid rgb(0 0 0);
  z-index: -1;
  border-bottom-left-radius: 0;
}

section .content {
  border-radius: 25px;
}

section > .content {
  background-color: #fff;
  border: 1px solid var(--border-color);
  min-height: var(--section-height);
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

section.title-left > .content {
  --w-ms1: 290px;
  --w-ms2: 90px;
  mask-image:
    linear-gradient(black 0 0), linear-gradient(black 0 0),
    url(/images/mask-top-left.png);
  mask-position:
    100% 0px,
    bottom center,
    0 0;
  mask-size:
    calc(100% - var(--w-ms1) + 1px) var(--w-ms2),
    122% calc(100% - var(--w-ms2) + 1px),
    var(--w-ms1) var(--w-ms2);
  mask-repeat: no-repeat;
}

section.title-left > .title {
  position: absolute;
  top: 0;
  left: 8px;

  filter: drop-shadow(2px 2px 2px rgb(var(--primary-color-rgb), 0.5));
  background-image: var(--primary-linear);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

section.title-left-ss > .content {
  border-top-left-radius: unset;
  border-top-right-radius: unset;
  border-top-left-radius: 15px;
}

section.title-left-ss > .sectionstyle > .title {
  top: 0;
  width: 100%;
  text-align: left;
  padding: 0 20px;
}

section.title-left-ss > .sectionstyle {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-rows: 1fr;
  gap: calc(0.8cm + 3vw);
  /* overflow: hidden; */
  position: relative;
  width: 100%;
}

section.title-left-ss > .sectionstyle::before {
  content: "";
  position: absolute;
  top: calc(2cm + -7px);
  left: 10%;
  right: 40%;
  width: 50%;
  height: 2cm;
  background-color: #fff;
  z-index: 2;
}

section.title-left-ss > .sectionstyle .ss {
  background-color: #fff;
  border-right: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  width: 100%;
  height: 1.8cm;
  border-top-right-radius: 15px;
  border-top-left-radius: 10px;
  position: relative;
}

section.title-left-ss > .sectionstyle .ss::before {
  content: "";
  position: absolute;
  top: 19px;
  left: -48px;
  width: 3cm;
  height: 3cm;
  background-color: #fff;
  border: 1px solid var(--border-color);
  transform: rotate(45deg);
  border-radius: 10px;
  border-top-right-radius: 3cm;
  mask-image: radial-gradient(
    circle at center left,
    black 54px,
    transparent 0cm
  );
  mask-repeat: no-repeat;
  z-index: 1;
}

section.title-left-ss > .sectionstyle .ss::after {
  content: "";
  position: absolute;
  top: 35px;
  left: 0;
  width: 100%;
  height: 2cm;
  background-color: #fff;
  z-index: 1;
}

section .title {
  font-size: 3rem;
  line-height: normal;
  font-weight: 500;
  letter-spacing: 0.64px;
  z-index: 10;
}

/* Main Section */

section .me {
  position: relative;
  overflow: hidden;
  width: 50%;
  max-width: 450px;
  background-image: var(--primary-linear);
  min-height: 650px;
  border-right: 1px solid var(--border-color);
  padding-top: 1cm;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}

section .me * {
  z-index: 100;
}

section .me .avatar::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 20px;
  background-image: var(--avatar-url);
  background-size: cover;
  background-position: center;
  translate: -20px -20px;
  z-index: 1;
  box-shadow: inset 0 0 20px -4px rgba(0, 0, 0, 0.6);
}

section .me .avatar {
  width: 220px;
  height: 220px;
  border: 5px solid rgba(251, 248, 239, 0.5);
  border-radius: 25px;
  z-index: 2;
}

section .me .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  color: #fff;
  line-height: 40px;
}

section .me .info p:nth-of-type(1) {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
}

section .me .info p:nth-of-type(2) {
  font-size: 2.7rem;
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

section .me .info p:nth-of-type(3) {
  font-size: 1.52rem;
  font-weight: 400;
  letter-spacing: 1px;
}

section .me .links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

section .me .links img {
  height: 25px;
  width: 25px;
}

section .me .links a {
  background: #fff;
  border-radius: 20px;
  padding: 7px;
  width: 39px;
  height: 39px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  overflow: hidden;
  transition:
    350ms width,
    350ms color;
}

section .me .links a span {
  background-image: var(--primary-linear);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

section .me .email {
  position: absolute;
  margin: 20px;
  bottom: 0;
  left: 0;
  color: #fff;
  letter-spacing: 1px;
  font-size: 1rem;
  font-weight: 400;
  border-bottom-color: #fff;
  border-bottom-width: 2px;
  border-bottom-style: solid;
  border-image: repeating-linear-gradient(
      88deg,
      #fff 0 4px,
      transparent 4px 8px
    )
    100% 1;
  font-family: var(--text-font);
  line-height: 35px;
}

section .me .star1 {
  position: absolute;
  top: -70px;
  right: -62px;
  width: 380px;
  height: 380px;
  z-index: 0;
  fill: var(--star1-color);
}

section .me .star2 {
  position: absolute;
  bottom: -45px;
  left: -55px;
  width: 290px;
  height: 290px;
  z-index: 0;
  fill: var(--star2-color);
}

section .aboutme {
  width: 100%;
  padding: 20px 30px;
}

.bg-effect {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  z-index: 1;
}

.bg-effect::before {
  z-index: -1;
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 350px;
  height: 250px;
  background-color: var(--bg-effect-color, rgb(218, 237, 255));
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
}

.bg-effect::after {
  z-index: -1;
  content: "";
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 350px;
  height: 250px;
  background-color: var(--bg-effect-color, rgb(218, 237, 255));
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.8;
}

/* Main Buttons */

#sec-buttons {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
}

#sec-buttons button:nth-of-type(1) {
  grid-column: 1 / span 2;
}

#sec-buttons button {
  position: relative;
  --size: calc(2vw + 50px);
  appearance: none;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: transparent;
  border: 3px solid rgb(var(--primary-color-rgb), 0.5);
  border-radius: 15px;
  background-color: #d8edff1a;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s ease;
}

#sec-buttons button:hover,
#sec-buttons button:focus {
  border-color: rgb(var(--primary-color-rgb), 0.8);
  box-shadow: inset 0 0 20px -5px rgb(var(--primary-color-rgb), 0.5);
}

#sec-buttons button:hover#page-Achievements,
#sec-buttons button:focus#page-Achievements {
  border-color: rgba(var(--gold-color-rgb), 0.8);
  box-shadow: inset 0 0 20px -5px rgb(var(--gold-color-rgb), 0.5);
}

#sec-buttons button:hover::after,
#sec-buttons button:focus::after {
  animation: mb-hover-after 3s infinite forwards;
}
#sec-buttons button:hover::before,
#sec-buttons button:focus::before {
  animation: mb-hover-before 3s infinite forwards;
}

@keyframes mb-hover-after {
  0% {
    right: unset;
    left: calc(100% + 30px);
    width: 10cm;
  }
  24.9% {
    height: 0px;
  }
  25% {
    width: 0px;
    left: -30px;
    bottom: unset;
    top: calc(100% + 30px);
    height: 10cm;
  }
  49.9% {
    width: 0px;
  }
  50% {
    height: 0px;
    top: -30px;
    left: unset;
    right: calc(100% + 30px);
    width: 10cm;
  }
  74.9% {
    height: 0px;
  }
  75% {
    width: 0px;
    right: -30px;
    top: unset;
    bottom: calc(100% + 30px);
    height: 10cm;
  }
  100% {
    height: 0px;
    bottom: -30px;
  }
}
@keyframes mb-hover-before {
  0% {
    left: unset;
    right: calc(100% + 30px);
    width: 10cm;
  }
  24.9% {
    height: 0px;
  }
  25% {
    width: 0px;
    right: -30px;
    top: unset;
    bottom: calc(100% + 30px);
    height: 10cm;
  }
  49.9% {
    width: 0px;
  }
  50% {
    height: 0px;
    bottom: -30px;
    right: unset;
    left: calc(100% + 30px);
    width: 10cm;
  }
  74.9% {
    height: 0px;
  }
  75% {
    width: 0px;
    left: -30px;
    bottom: unset;
    top: calc(100% + 30px);
    height: 10cm;
  }
  100% {
    height: 0px;
    top: -30px;
  }
}

#sec-buttons button::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  width: 0px;
  height: 0px;
  border-radius: 50%;
  box-shadow:
    0 0 0px 20px var(--primary-color),
    0 0 0px 40px var(--primary-color),
    0 0 0px 60px var(--primary-color),
    0 0 0px 80px var(--primary-color);
  filter: blur(50px) brightness(1.3);
  transform: translateZ(0);
  z-index: -1;
}

#sec-buttons button::after {
  content: "";
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 0px;
  height: 0px;
  border-radius: 50%;
  box-shadow:
    0 0 0px 20px var(--primary-color),
    0 0 0px 40px var(--primary-color),
    0 0 0px 60px var(--primary-color),
    0 0 0px 80px var(--primary-color);
  filter: blur(50px) brightness(1.1);
  transform: translateZ(0);
  z-index: -1;
}

#sec-buttons button#page-Achievements::after,
#sec-buttons button#page-Achievements::before {
  --primary-color: rgba(var(--gold-color-rgb), 0.5);
}

#sec-buttons button#page-Achievements {
  border-color: rgba(var(--gold-color-rgb), 0.5);
}

#sec-buttons button .images {
  position: relative;
  height: calc(var(--size) * 1.5);
  width: calc(var(--size) * 3);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sec-buttons button .images div {
  position: absolute;
  top: 0;
  left: 0;

  height: calc(var(--size) * 1.5);
  width: calc(var(--size) * 3);
  background-image: var(--url);
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  border: 2px solid var(--primary-color);
  box-shadow: 0px 0px 15px -5px rgba(0, 0, 0, 0.3);
  transition: all 1s ease;
}

#sec-buttons button .images div:nth-of-type(1) {
  translate: min(calc(-15px - 2vw), -30px) 0;
}
#sec-buttons button .images div:nth-of-type(2) {
  translate: 0px 0;
  z-index: 10;
}
#sec-buttons button .images div:nth-of-type(3) {
  translate: max(calc(15px + 2vw), 30px) 0;
}

#sec-buttons button .images div:not(.selected) {
  filter: blur(1px);
  transform: scale(0.8);
  opacity: 0.8;
}

#sec-buttons button svg,
#sec-buttons button img,
#sec-buttons button div {
  filter: drop-shadow(2px 2px 2px rgb(var(--primary-color-rgb), 0.5));
}
#sec-buttons button p {
  text-shadow: 0 0 10px rgb(var(--primary-color-rgb), 0.5);
}

#sec-buttons button svg {
  height: var(--size);
  width: var(--size);
  stroke: var(--primary-color);
}

#sec-buttons button img {
  height: calc(var(--size) * 2);
  width: calc(var(--size) * 2);
}

#sec-buttons button .title {
  margin-top: 10px;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-color);
  width: max-content;
}

@media (max-width: 1224px) {
  section .aboutme {
    width: 100%;
    padding: 20px;
  }
  section {
    margin: 0 1cm;
  }
}

@media (max-width: 1124px) {
  .projects,
  .certificates {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 1024px) {
  section .me {
    width: 100%;
  }
  section > .content {
    flex-direction: column;
  }
  section .me {
    max-width: unset;
  }
  section {
    margin: 1cm 1.4cm;
  }
}

@media (max-width: 768px) {
  section {
    margin: 1cm 0.4cm;
  }
  section .title {
    font-size: 2.4rem;
  }
  section.title-left > .content {
    --w-ms1: 240px;
    --w-ms2: 75px;
  }
  #sec-buttons {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  /* Page - Services */
  .services ul,
  .services .service-title a {
    display: none !important;
  }
  .services .service > a {
    display: block !important;
  }
  .services .service {
    display: flex !important;
    flex-direction: column !important;
  }

  .achievements .achievement .text span {
    padding-bottom: unset !important;
  }
  .achievements .achievement .text p {
    font-size: large !important;
  }
}

@media (max-width: 624px) {
  .projects,
  .certificates {
    grid-template-columns: repeat(1, 1fr) !important;
  }
  .projects .project .image,
  .certificates .certificate .image {
    height: 120px !important;
  }
}

@media (max-width: 480px) {
  section {
    margin: 0.4cm 0.4cm;
  }
  #sec-buttons {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
  #sec-buttons button .title {
    font-size: large;
  }
  .services {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Custom Scrollbar style */

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-linear);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: content-box;
}
