:root {
  --main: #333333;
  --secondary: #43505571;
  --accent1: #fd305c;
  --accent2: #95dae9;
  --accent1T: #fd305c88;
  --accent2T: #95dae988;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: var(--main);
  color: white;
  scroll-behavior: smooth;
  font-family: "Source Code Pro";
  overflow-x: clip;
  z-index: 999;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(0, 0, 0, 0.05) 25%,
      rgba(0, 0, 0, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(0, 0, 0, 0.05) 75%,
      rgba(0, 0, 0, 0.05) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(0, 0, 0, 0.05) 25%,
      rgba(0, 0, 0, 0.05) 26%,
      transparent 27%,
      transparent 74%,
      rgba(0, 0, 0, 0.05) 75%,
      rgba(0, 0, 0, 0.05) 76%,
      transparent 77%,
      transparent
    );
  background-size: 50px 50px;
}

.browser-message {
  display: none;
  text-align: center;
  padding: 100% 10px;
  font-size: 16px;
}

@media screen and (max-width: 600px) {
  body {
    overflow: hidden;
  }

  body * {
    display: none;
  }

  .browser-message {
    display: block;
  }
}

.bg {
  position: absolute;
  z-index: 0;
  border-radius: 10px;
}

.fg {
  position: absolute;
  z-index: 100;
  border-radius: 10px;
}

#shape1 {
  width: 400px;
  height: 400px;
  top: 80%;
  left: 80%;
}

#shape2 {
  top: 75%;
  left: 30%;
  width: 200px;
  height: 200px;
}

#shape3 {
  top: 20%;
  left: 50%;
  width: 100px;
  height: 100px;
}

#shape4 {
  top: 30%;
  left: -6%;
  width: 200px;
  height: 200px;
}

#shape5 {
  top: 50%;
  left: 80%;
  width: 50px;
  height: 50px;
}

#shape6 {
  top: 90%;
  left: 50%;
  width: 50px;
  height: 50px;
}

#shape7 {
  top: 30%;
  left: 5%;
  width: 300px;
  height: 300px;
}

#shape8 {
  top: 50%;
  left: 40%;
  width: 50px;
  height: 50px;
}

#shape9 {
  top: 60%;
  left: 80%;
  width: 100px;
  height: 100px;
}

#shape10 {
  top: 20%;
  left: 30%;
  width: 200px;
  height: 200px;
}

#shape11 {
  top: 70%;
  left: 70%;
  width: 50px;
  height: 50px;
}

#shape12 {
  top: 40%;
  left: 90%;
  width: 50px;
  height: 50px;
}

#shape13 {
  top: 40%;
  left: 40%;
  width: 200px;
  height: 200px;
}

::-webkit-scrollbar {
  display: none;
}

* {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: white;
  font-family: "Dela Gothic One";
  letter-spacing: 2px;
}

h1 {
  font-family: "Dela Gothic One";
  font-size: 36px;
  letter-spacing: 3px;
  position: relative;
}

nav {
  position: fixed;
  box-sizing: border-box;
  top: 0;
  left: 90%;
  width: 10%;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

nav .blob {
  transition: transform 0.3s ease-in-out;
  transform: scale(0); /* default size */
}

.blob.grow {
  transform: scale(1); /* grown size */
}

.blob.shrink {
  transform: scale(0); /* shrunk size */
}

section {
  position: relative;
  width: 100%;
  height: 100vh;
}

.main {
  display: flex;
  flex-direction: column;
}

#nav {
  flex: 3;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  z-index: 999;
}

#nav div {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#links {
  display: flex !important;
  align-items: flex-start !important;
}

#socials {
  display: flex !important;
  align-items: flex-end !important;
}

#email,
#project {
  position: relative;
}

#links a,
#socials a {
  padding: 0 5px;
  border-radius: 3px;
  transition: all 0.2s ease-in-out;
}

#socials a:hover {
  padding: 0 5px;
  background-color: var(--accent1);
  color: var(--main);
}

#links a:hover {
  padding: 0 5px;
  background-color: var(--accent2);
  color: var(--main);
}

#project::after {
  content: "";
  display: block;
  position: absolute;
  left: 5px;
  right: -500px;
  bottom: -12px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent2) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
}

#email::after {
  content: "";
  display: block;
  position: absolute;
  left: -500px;
  right: 5px;
  bottom: -12px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent1) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
}

#name {
  display: flex;
  flex-direction: row !important;
  position: relative;
}

#name h1 {
  text-align: center;
}

.blob {
  height: 80px;
  width: 80px;
}

.splash {
  max-width: 100%;
  flex: 7;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-10%);
  pointer-events: none;
}

#slogan {
  flex: 2;
  transform: translate(40%, -80%);
  position: relative;
}

/* distort on scroll */
.glitch {
  font-size: 48px;
  color: var(--accent1);
  position: relative;
  display: inline-block;
  --glitch-width: 0px;
  --glitch-height: 0px;
  --glitch-transX: 0px;
  --glitch-transY: 0px;
  --glitch-rotate: 0deg;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(50% - var(--glitch-height) / 2),
    0 calc(50% - var(--glitch-height) / 2),
    0 calc(50% + var(--glitch-height) / 2),
    100% calc(50% + var(--glitch-height) / 2),
    100% 100%,
    0 100%
  );
}

.glitch::before {
  color: var(--accent2);
  transform: translate(var(--glitch-transX), var(--glitch-transY))
    rotate(var(--glitch-rotate));
}

.glitch::after {
  color: white;
  transform: translate(
      calc(-1 * var(--glitch-transX)),
      calc(-1 * var(--glitch-transY))
    )
    rotate(calc(-1 * var(--glitch-rotate)));
}

strong {
  --letter-spacing: 17px;
  letter-spacing: var(--letter-spacing);
}
/* distort on scroll */

.image {
  flex: 4;
  z-index: 1;
}

#intro {
  flex: 2;
  transform: translate(-40%, 40%);
  position: relative;
}

#intro b {
  font-size: 20px;
}

#slogan::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: -50%;
  bottom: -20px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent1) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
  z-index: -1;
}

#intro > p:first-child {
  position: relative;
}

#intro > p:first-child::after {
  content: "";
  display: block;
  position: absolute;
  left: -50%;
  right: 5px;
  bottom: -20px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent2) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
  z-index: -1;
}

/* loader */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--main);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blob-loader {
  transform-origin: center center;
  animation: scaleBlob 2s infinite;
}

@keyframes scaleBlob {
  0%,
  100% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
}

/* Project sections */
.projects {
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.heading {
  max-width: fit-content;
}

.heading::after {
  content: "";
  display: block;
  position: absolute;
  left: -200px;
  right: 0;
  bottom: -20px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent1) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
  z-index: -1;
}

.wrapper {
  flex: 1;
  display: flex;
}

.preview {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview img {
  border-radius: 10px;
  max-width: 50%;
  z-index: 1;
}

.description {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projectLink {
  width: 100px;
  height: auto;
  float: right;
  transform: translate(20px, 10px);
}

.description .line {
  max-width: 70%;
  position: relative;
}

.description .line::after {
  content: "";
  display: block;
  position: absolute;
  left: -500px;
  right: 0;
  bottom: -20px;
  height: 1px;
  background-image: linear-gradient(
    to right,
    var(--accent2) 50%,
    transparent 50%
  );
  background-size: 5px 1px;
  z-index: -1;
}

.line {
  perspective: 1500px;
}

.card {
  height: fit-content;
  border: 1px solid transparent;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1.5px);
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.2s;
  transform-style: preserve-3d;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--accent1),
    transparent,
    transparent,
    transparent
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  display: none;
}

/* About sections */
#skillset {
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.skillset {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  position: relative;
  margin-top: 40px;
  border-radius: 10px;
  box-shadow: inset 0 0 10px 5px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1.5px);
}

.blob {
  position: relative;
  overflow: visible; /* Ensure particles are visible outside the SVG */
}

.particle {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 230px;
  height: 90px;
  padding: 20px;
  border-radius: 5px;
  color: var(--main);
  backdrop-filter: blur(1px);
}

.particle > *:first-child {
  flex: 1;
  font-size: 35px;
}

.infoDiv {
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  letter-spacing: 1px;
}

.infoDiv > *:first-child {
  font-weight: bold;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spinOp {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

#contact {
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.contact {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact form {
  width: 25%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  margin-top: 20px;
  letter-spacing: 1px;
}

input,
textarea {
  background-color: rgba(255, 255, 255, 0);
  border: 1px solid transparent;
  box-shadow: inset 0 0 10px 5px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(1.5px);
  border-radius: 5px;
  padding: 10px 15px;
  color: white;
  font-family: "Source Code Pro";
  font-size: 16px;
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(2px);
}

textarea {
  resize: none;
  height: 150px;
}

/* input and textarea selected; border is set to accent2 */
input:hover,
textarea:hover {
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: none;
  /* color: rgb(149, 218, 233); */
  /* 253, 48, 92 */
}

input:focus,
textarea:focus {
  outline: none;
  border: 1px solid transparent;
  box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.2);
}

input[type="submit"],
#toggleButton {
  background-color: var(--accent1);
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 1px;
  width: fit-content;
  margin: 20px auto;
  color: var(--main);
  padding: 10px 15px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  z-index: 999;
}

input[type="submit"]:hover,
#toggleButton:hover {
  background-color: var(--accent2);
  color: var(--main);
}

#toggleButton {
  margin: 20px;
  background-color: var(--accent1);
}

#toggleButton:hover {
  background-color: var(--accent2);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s;
}

.toast-error {
  background-color: #f44336;
}

.toast-success {
  background-color: #4caf50;
}

.toast-show {
  opacity: 1;
}
