/** ======== GLOBAL STYLES ======== **/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  pointer-events: none;
}

/** ======== ROOT VARIABLES ======== **/
:root {
  --primary-color: #1e4378;
  --secondary-color: #a7b3c9;
  --accent-color: #4a7bc9;
  --text-color: #fff;
}

/** ======== BASE ======== **/
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  line-height: 1.6;
  background-color: #0a1938;
  overflow-x: clip;
  scroll-behavior: smooth;
}

/** ======== ANIMATIONS ======== **/
.fade-up {
  animation-fill-mode: forwards;
  animation-name: fadeInUp;
  animation-duration: 3s;
}

#dynamic-role {
  transition: opacity 0.5s ease-in-out;
}

.fade-out {
  opacity: 0;
}

.fade-in {
  opacity: 1;
}

.hero-wrapper-three {
  background: linear-gradient(#0e1e42, #01050d);
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  overflow-x: hidden;
  flex-direction: column;
}

.gallery-container {
  display: flex;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-item {
  border: 2px solid #bdbbbb;
  border-radius: 16px;
  display: flex;
  margin-left: -22px;
  overflow: hidden;
  height: 200px;
  width: 160px;
  transition: 0.5s;
}
.img-fluid {
  filter: brightness(0.8);
  height: auto;
  transition: 0.5s;
}

.gallery-item:first-child {
  margin-left: 0;
}

.gallery-item:nth-child(odd) {
  transform: rotate(-3deg) translateY(20px);
  transform: rotate(-3deg) translateY(20px);
}

.gallery-item:nth-child(even) {
  transform: rotate(3deg);
  transform: rotate(3deg);
}

@media (min-width: 630px) {
  .gallery-item {
    width: 200px;
    height: 280px;
  }
}
.gallery-item:hover {
  border: 2px solid #d68910;
}

.img-fluid:hover {
  filter: brightness(1);
}

.gallery-item:nth-child(odd):hover {
  transform: rotate(3deg);
}

.gallery-item:nth-child(even):hover {
  transform: rotate(-3deg);
}

hr {
  border: 1px solid #d68910;
  width: 60%;
  margin: 0 auto;
  margin-top: 100px;
  filter: opacity(0.5);
}

.wallpaper-name {
  margin-top: 50px;
  background: linear-gradient(#01050d, #0e1e42);
}

.name-me {
  text-align: center;
  margin-top: -2px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40vh;
  margin-top: -50px;
}

.name-me span {
  text-align: center;
  font-size: 120px;
  color: #bdbbbb;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 5px;
  opacity: 0.2;
  transition: 0.5s;
  flex-direction: column;
}

.name-me span:hover {
  color: #d68910;
  cursor: pointer;
  opacity: 0.9;
}

@media (max-width: 850px) {
  .name-me span {
    text-align: center;
    font-size: 90px;
    color: #bdbbbb;
    letter-spacing: 5px;
    opacity: 0.2;
    transition: 0.5s;
    flex-direction: column;
  }
  .name-me {
    text-align: center;
    line-height: 60px;
  }
}

@media (max-width: 400px) {
  .name-me span {
    text-align: center;
    font-size: 60px;
    color: #bdbbbb;
    font-family: "Anton", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 5px;
    opacity: 0.2;
    transition: 0.5s;
    margin-top: -40px;
    flex-direction: column;
  }
  .name-me {
    margin-top: -100px;
    line-height: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
  }
}

footer {
  text-align: center;
  background: linear-gradient(#0e1e42, #01050d);
  width: 100%;
  min-height: 10vh;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer span {
  color: #bdbbbb;
  opacity: 0.5;
  font-size: 18px;
  font-family: "Signika Negative", sans-serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}

@media (max-width: 850px) {
  footer {
    padding: 10px;
    background-color: #0b1938;
    width: 100%;
  }

  footer span {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  footer {
    padding: 10px;
  }

  footer span {
    opacity: 0.5;
    font-size: 12px;
  }
}

@media (max-width: 310px) {
  footer {
    padding: 10px;
  }

  footer span {
    opacity: 0.5;
    font-size: 10px;
  }
}

/** ======== LOADER ======== **/

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.5s ease;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    #0e1e42,
    #01050d,
    var(--accent-color)
  );
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/** ======== AI BOT LOADER ======== **/
.ai-bot {
  scale: 4.2;
  width: 34px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  animation: blink 2.4s ease infinite,
    move-head 4.2s
      linear(
        0 0%,
        0 2.27%,
        0.02 4.53%,
        0.04 6.8%,
        0.06 9.07%,
        0.1 11.33%,
        0.14 13.6%,
        0.25 18.15%,
        0.39 22.7%,
        0.56 27.25%,
        0.77 31.8%,
        1 36.35%,
        0.89 40.9%,
        0.85 43.18%,
        0.81 45.45%,
        0.79 47.72%,
        0.77 50%,
        0.75 52.27%,
        0.75 54.55%,
        0.75 56.82%,
        0.77 59.1%,
        0.79 61.38%,
        0.81 63.65%,
        0.85 65.93%,
        0.89 68.2%,
        1 72.7%,
        0.97 74.98%,
        0.95 77.25%,
        0.94 79.53%,
        0.94 81.8%,
        0.94 84.08%,
        0.95 86.35%,
        0.97 88.63%,
        1 90.9%,
        0.99 93.18%,
        0.98 95.45%,
        0.99 97.73%,
        1 100%
      )
      infinite,
    mouth 1.2s ease-in infinite;
}

.ai-bot .head {
  background: linear-gradient(
    var(--text-color) 80%,
    color-mix(in srgb, var(--text-color), black 30%),
    var(--text-color)
  );
  border-radius: 0.375rem;
  position: absolute;
  width: 28px;
  height: 20px;
}

.ai-bot .head:before,
.ai-bot .head:after {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 2px;
  height: 8px;
  background: var(--text-color);
  border-radius: 2px 0 0 2px;
  scale: var(--ealw, 1) 1;
}

.ai-bot .head:after {
  right: -4px;
  left: unset;
  border-radius: 0 2px 2px 0;
  scale: var(--earw, 1) 1;
}

.ai-bot .face {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  inset: 0 3px;
  background: var(--primary-color);
  translate: var(--fx) 0;
  border-radius: 4px;
  padding: 4px 4px 2px 4px;
  gap: 3px;
}

.ai-bot .face:before {
  content: "";
  background: var(--text-color);
  position: absolute;
  height: 1px;
  width: 10px;
  top: -2px;
  border-radius: 2px 2px 0 0;
  mask: radial-gradient(circle at 50% 100%, transparent 45%, black 45%);
}

.ai-bot .eyes {
  display: flex;
  height: 8px;
  gap: 6px;
}

.ai-bot .eyes:before,
.ai-bot .eyes:after {
  content: "";
  width: 5px;
  height: 8px;
  scale: 1 var(--elh);
  filter: drop-shadow(0 0 2px var(--secondary-color));
  background: repeating-linear-gradient(
      to bottom,
      var(--text-color),
      var(--text-color) 0.25px,
      transparent 0.25px,
      transparent 0.6px
    ),
    linear-gradient(to bottom, var(--accent-color), transparent 60%),
    var(--secondary-color);
  border-radius: 1px;
  translate: var(--erx) 0;
}

.ai-bot .eyes:after {
  scale: 1 var(--erh);
  translate: var(--erx) 0;
}

.ai-bot .mouth {
  width: 10px;
  height: 2px;
  background: var(--secondary-color);
  border-radius: 0 0 1px 1px;
  filter: drop-shadow(0 0 2px var(--secondary-color));
  scale: var(--mw, 1) var(--mh, 1);
}

/** ======== CUSTOM PROPERTIES ======== **/
@layer properties {
  @property --elh {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
  @property --erx {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
  }
  @property --fx {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
  }
  @property --ealw {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
  @property --earw {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
  @property --erh {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
  @property --mh {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
  @property --mw {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
  }
}

/** ======== ANIMATIONS ======== **/
@layer animations {
  @keyframes blink {
    from,
    10%,
    to {
      --elh: 1;
      --erh: 1;
    }
    2% {
      --elh: 0.2;
    }
    8% {
      --erh: 0.1;
    }
  }

  @keyframes mouth {
    from,
    30%,
    70%,
    to {
      --mh: 1;
      --mw: 1;
    }
    20% {
      --mh: 0.5;
    }
    60% {
      --mw: 0.7;
    }
  }

  @keyframes move-head {
    from,
    20%,
    40%,
    to {
      --erx: 0%;
      --fx: 0%;
      --ealw: 1;
      --earw: 1;
    }
    10% {
      --erx: 20%;
      --fx: 10%;
      --ealw: 1.5;
      --earw: 0.5;
    }
    30% {
      --erx: -20%;
      --fx: -10%;
      --ealw: 0.5;
      --earw: 1.5;
    }
  }
}

/** ======== RESPONSIVE ADJUSTMENTS ======== **/

@media screen and (max-width: 600px) and (min-width: 201px) {
  .ai-bot {
    transform: scale(0.72);
    transform-origin: center center;
    margin: 0 auto;
    display: block;
    position: relative;
    left: 0;
    top: 0;
  }
  .ai-bot .head {
    margin-left: 1.5px;
  }
}

@media screen and (max-width: 200px) {
  .ai-bot {
    transform: scale(0.6);
    transform-origin: center center;
    margin: 0 auto;
    display: block;
    position: relative;
    left: 0;
    top: 0;
  }
}
