@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Oswald:wght@200..700&family=Outfit:wght@100..900&family=Petit+Formal+Script&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Sure, I could use a preprocessor and optimize this css but... For a portfolio this size I think its fine */
* {
  box-sizing: border-box;
}
body {
  background: #1e1e1e;
  margin: 0;
  font-family: "Outfit", sans-serif;
  color: #d4d4d4;
  font-size: 16px;
}

.mobile {
  display: none;
}

.logo {
  display: flex;
  justify-content: center;
}
.logo img {
  width: 70px;
  position: relative;
  top: -9px;
  left: 6px;
}
p {
  margin: 0 0 10px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 50px;
  background: rgba(30, 30, 30, 0.95);
  z-index: 5;
  box-shadow: 0px 2px 5px #ff8c00;
}

header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0px;
}

header nav ul {
  list-style: none;
  column-gap: 20px;
  margin: 0;
  padding: 0;
  display: flex;
}
header nav a {
  color: #ff8c00;
  text-decoration: none;
  transition: all 0.5s ease;
}
header nav a.active,
header nav a:hover {
  border-bottom: 1px solid #ff8c00;
  color: #b36b15;
}
footer {
  margin: 60px 0 45px;
}
#fractal-container {
  position: relative;
  z-index: 1;
}
#game-container,
#crossbow-game-container {
  position: relative;
  width: 100%;
  height: 500px;
  z-index: 2;
  overflow: hidden;
  border-radius: 10px;
  background: #1e1e1e;
  contain: layout style paint;
}
#game-container canvas,
#crossbow-game-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.orange-text {
  color: #ff8c00;
  font-weight: 600;
}

#intro,
#about,
#projects,
#contact {
  position: relative;
  z-index: 3;
}
#intro h2,
#about h2,
#projects h2,
#contact h2 {
  font-size: 40px;
}
#about h2 {
  margin-top: 0;
}

#intro h1 {
  margin-bottom: 0;
}

.emoji {
  font-size: 40px;
}
.animated-emoji {
  display: inline-block; /* add this so transform works properly */
  animation: wave 1s ease-in-out infinite;
}
#fractal_container {
  position: relative;
  width: 800px; /* Or whatever size you want */
  height: 600px;
  margin: 0 auto;
}
#intro {
  margin-top: -410px;
  margin-bottom: 210px;
  position: relative;
  z-index: 1;
  width: 500px;
  margin-left: auto;
  margin-right: auto;
  background: #1e1e1e70;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0px 0px 10px #515151;
  text-shadow: 0px 0px 10px #000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* for Safari */
}

#fractalCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.fullw * {
  width: 100%;
}
.tcent {
  text-align: center;
}
.tupper {
  text-transform: uppercase;
}
.note-text {
  font-size: 14px;
  color: darkgrey;
}
.mt20 {
  margin-top: 20px;
}
.mt30 {
  margin-top: 30px;
}
.mt60 {
  margin-top: 60px;
}
.mb30 {
  margin-bottom: 30px;
}
.mb60 {
  margin-bottom: 60px;
}
.mtb30 {
  margin-top: 30px;
  margin-bottom: 30px;
}
.mtb60 {
  margin-top: 60px;
  margin-bottom: 60px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 20px;
}

#intro {
  width: 100%;
  box-sizing: border-box;
}

.flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
}

.col.start {
  align-items: start;
}
.col.end {
  align-items: end;
}
.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.col50 {
  width: 50%;
}
.col33 {
  width: 33.33%;
}
.col60 {
  width: 60%;
}
.col40 {
  width: 40%;
}
.col70 {
  width: 70%;
}
.col30 {
  width: 30%;
}
.orange-border {
  position: relative;
  padding-left: 20px;
}
.orange-border::before {
  content: none;
}
.orange-border::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 7px;
  height: 100%;
  background: #ff9203;
  /* Subtle points at top and bottom */
  clip-path: polygon(
    0 0,
    /* top left */ 100% 8px,
    /* top right (gentle point) */ 100% 98%,
    /* bottom right (gentle point) */ 0 100% /* bottom left */
  );
  z-index: 1;
  pointer-events: none;
}

.orange-border-right {
  position: relative;
  padding-right: 20px;
}
.orange-border-right::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  background: #ff9203;
  /* Subtle points at top and bottom */
  clip-path: polygon(
    100% 0,
    /* top right */ 0 8px,
    /* top left (gentle point) */ 0 98%,
    /* bottom left (gentle point) */ 100% 100% /* bottom right */
  );
  z-index: 1;
  pointer-events: none;
}

.project-info p {
  padding: 10px;
  border: 1px solid darkorange;
  border-radius: 10px;
  box-shadow: 2px 2px 5px black;
}

.full-project h3 {
  margin: 0;
}

.text-box {
  background: #1e1e1e;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.code-box {
  background: #1e1e1e;
  border: 1px solid #3c3c3c;
  border-radius: 8px;
  width: 450px;
  height: 250px;
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: relative;
  margin-bottom: 20px;
}

.code-box .code-content {
  /* transform: skewY(-3deg); */
  white-space: pre-wrap; /* preserve indentation */
  font-size: 15px;
  line-height: 1.5;
  font-family: "JetBrains Mono", monospace;
}

.keyword {
  color: #569cd6;
}
.string {
  color: #ce9178;
}
.comment {
  color: #6a9955;
}
.function {
  color: #dcdcaa;
}

.code-segment .output-text {
  margin-top: 40px;
  font-size: 20px;
  color: #00ff88;
  opacity: 0;
  white-space: pre-wrap;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
}
.code-segment .animated-char {
  display: inline-block; /* important for transform */
}
.shape-container {
  position: fixed;
  width: 480px;
  height: 400px;
  overflow: hidden;
  right: -120px;
  bottom: -100px;
  z-index: 0;
}
.shape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 180px;
  height: 480px;
  transform: rotate(45deg) scaleY(0);
  transform-origin: bottom;
  border-radius: 5px;
  background-image: linear-gradient(180deg, #fa0 0%, #ff640a 100%);
  animation: pulse_scale 2s ease-out forwards;
}

.shape-container a {
  position: absolute;
  left: 20px;
  top: 200px;
  z-index: 2;
  transform: rotate(-45deg);
  color: #ff7d06;
  display: block;
  text-decoration: none;
  background: #1e1e1e;
  padding: 10px;
  opacity: 0;
  animation: fade_in 1s ease forwards;
  animation-delay: 2s;
  text-shadow: 0px 0px 1px #d75414;
  width: 100%;
  text-align: center;
}

.shiny-divider {
  position: relative;
  height: 6px;
  background: #ff9203;
  overflow: hidden;
  width: 40%;
  margin-left: auto;
  margin-right: auto;
}

.shiny-divider::before {
  content: "";
  position: absolute;
  top: 0;
  left: -200%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgb(164, 65, 4),
    transparent
  );
  animation: shine-divider 2s linear infinite;
}

/* Pointed ends container */
.shiny-divider-points {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  pointer-events: none;
}

/* Left triangle */
.shiny-divider-points::before,
.shiny-divider-points::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
}

.shiny-divider-points::before {
  left: 0;
  border-right: 10px solid transparent;
  border-bottom: 6px solid #1e1e1e;
}

.shiny-divider-points::after {
  right: 0px;
  border-left: 10px solid transparent;
  border-bottom: 6px solid #1e1e1e;
}

.project {
  width: 90%;
  margin: 20px auto;
  position: relative;
}

.project-title-wrapper {
  transform: skew(-30deg);
  background-color: #313131;
  padding: 10px 20px;
  transition: background-color 0.3s;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
}

.project-title {
  transform: skew(30deg); /* counter-skew the text */
  color: #ff8c00;
  margin: 0;
  text-align: center;
}

.project:hover .project-title-wrapper {
  background-color: #ffa733;
}

.project-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 1s ease;
  color: #fff;
  padding: 0 20px;
  margin-top: 20px;
}

.project:hover .project-title {
  color: white;
}
.project:hover .project-content {
  max-height: 500px; /* enough to show content */
}

.project-content video {
  width: 100%;
  height: auto;
  margin-bottom: 15px;
  border: 1px solid #ffa733;
  box-shadow: 0px 0px 3px #ffa733;
  margin-top: 10px;
  border-radius: 5px;
}
.project-content p {
  margin-bottom: 16px;
  text-align: center;
}
.project-content button {
  display: block;
  width: 100%;
  padding: 10px;
  background: #313131;
  border: none;
  border-radius: 10px;
  box-shadow: 0 0 5px #ffa733;
  margin-bottom: 10px;
  cursor: pointer;
  color: #ffa733;
  transition: all 0.3s ease;
  border: 1px solid #ffa733;
  text-transform: uppercase;
  font-weight: 600;
}

.project-content button:hover {
  background: #ffa733;
  color: #fff;
}

.orange-theme-form {
  width: 100%;
  margin: 0 auto;
  background: #1e1e1e;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.form-input {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.form-input label {
  color: #ff9203;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-input textarea {
  resize: vertical;
}

.form-input input,
.form-input select,
.form-input textarea {
  font-family: "Outfit", sans-serif;
  background: #2b2b2b;
  border: 1px solid #444;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input input:focus,
.form-input select:focus,
.form-input textarea:focus {
  border-color: #ff9203;
  box-shadow: 0 0 0 3px rgba(255, 146, 3, 0.2);
  outline: none;
}

.submit-button {
  background: #ff9203;
  color: #1e1e1e;
  border: none;
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
  float: right;
}

.submit-button:hover {
  background: #ffa52b;
  transform: translateY(-2px);
}

.honeypot {
  display: none;
}

.glow-box-wrapper {
  padding: 1px;
  position: relative;
  width: 80%;
  margin: 30px auto;
  transition: transform 0.2s ease-out;
  left: 0;
  top: 0;
}

.glow-box {
  position: relative;
  background: #1a1a1a;
  border-radius: 16px;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.neon-outline {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(120deg, #d7ad14, #d75414, #d71414);
  background-size: 300% 300%;
  animation: move-glow 6s ease infinite;
  filter: blur(6px) brightness(0.6);
  transition: filter 0.3s ease;
}

.glow-box-wrapper:hover .neon-outline {
  filter: blur(10px) brightness(1.5);
}
#hover-area.width100 {
  width: 100%;
}

.ajax-response {
  padding-top: 30px;
  text-align: center;
  clear: both;
}
.ajax-response .success {
  color: #0cb10c;
}
.ajax-response .error {
  color: #bd0f0f;
}

.contact-content {
  text-align: center;
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content h3 {
  color: #ff9203;
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.contact-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #ccc;
}

.email-button {
  display: inline-block;
  background: #ff9203;
  color: #1e1e1e;
  text-decoration: none;
  padding: 16px 32px;
  font-size: 18px;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.email-button:hover {
  background: #ffa52b;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 146, 3, 0.3);
  color: #1e1e1e;
  text-decoration: none;
}

.email-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.email-button:hover:before {
  left: 100%;
}

/* Hover Direction Overlay */
.hover-direction {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  z-index: 2;
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.glow-box-wrapper:hover .hover-direction {
  opacity: 1;
}

.aos-disable-animation {
  transform: none !important;
  opacity: 1 !important;
  transition: none !important;
}

.modal-overlay {
  cursor: pointer;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: absolute;
  margin: 0 auto;
  width: 90%;
  background: #1e1e1e;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 11;
  visibility: hidden;
  left: 0;
  right: 0;
  top: 0;
}

.modal.active {
  top: 60px;
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
}

.modal-close {
  position: absolute;
  top: -60px;
  right: -30px;
  background: none;
  color: white;
  font-size: 60px;
  border: none;
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: transform 0.2s ease;
  z-index: 12;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal > h2:first-of-type {
  margin-top: 0;
  text-shadow: 0px 2px 3px black;
}

.modal iframe {
  width: 100%;
  min-height: 80vh;
  border: none;
  position: relative;
  z-index: 10;
  border-radius: 10px;
}

@keyframes shine-divider {
  0% {
    left: -200%;
  }
  100% {
    left: 100%;
  }
}

@keyframes shine-border {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(100%) rotate(25deg);
  }
}

@keyframes pulse_scale {
  0% {
    transform: rotate(45deg) scaleY(0);
  }
  100% {
    transform: rotate(45deg) scaleY(1);
  }
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  25% {
    transform: rotate(-10deg) translateX(-5px);
  }
  50% {
    transform: rotate(0deg) translateY(0);
  }
  75% {
    transform: rotate(-10deg) translateX(-5px);
  }
}

@keyframes fade_in {
  to {
    opacity: 1;
  }
}

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

.animated-char {
  display: inline-block;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
