html { 
  font-size: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Syne', sans-serif;
  background-color: #000000;
  color: aliceblue;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
}

#mesh-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* HERO section */
.hero {
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h2 {
  font-size: 60px !important;
}

.hero p {
  font-size: 35px;
  margin-top: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 400;
}

.btn {
  margin-top: 10px;
  color: #ffffff;
  background: transparent;
  border-radius: 60px;
  font-size: 20px;
  padding: 20px;
  text-decoration: none;
  border: 1px solid #ffffff31;
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  cursor: pointer;
  position: relative;
}

.btn::after {
  content: "→";
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.3s ease;
  transform: rotate(-60deg);
}

.btn:hover::after {
  transform: rotate(0deg);
}

.animate-text {
  display: inline-block;
  font-size: 2rem;
  white-space: pre;
}

.animate-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  margin-top: 40px;
  margin-bottom: 100px;
  max-width: calc(260px * 5);
}

.gallery a {
  position: relative;
  display: inline-block;
  width: 260px;
  height: 380px;
  overflow: hidden;
}

.gallery img {
  width: 260px;
  height: 380px;
  object-fit: cover;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1.4s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.gallery img.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery .overlay-text {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  line-height: 1.6;
  padding: 0px;
  border-radius: 8px;
}

.gallery a:hover img {
  background-color: black;
  filter: brightness(0);
}

.gallery a:hover .overlay-text {
  opacity: 1;
}

/* NAVBAR */
.hero {
  position: relative;
  z-index: 1;
}

.navbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border: 1px solid #ffffff00;
}

.logo {
  height: 40px;
  margin-right: 15px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar h1 {
  color: rgb(255, 255, 255);
  font-size: 20px;
  margin: 0;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
  justify-content: center;
}

.nav-links {
  z-index: 20;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar a {
  position: relative;
  display: inline-block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.863);
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: color 0.2s ease;
  line-height: 1.2;
}

.navbar a::after {
  content: attr(data-hover);
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-align: center;
  color: #a8ff00;
}

.navbar a:hover {
  color: #fff;
}

.navbar a:hover::after {
  transform: translateY(0);
  opacity: 1;
}

.navbar a span {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar a:hover span {
  transform: translateY(-100%);
  opacity: 0;
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 2rem;
  user-select: none;
}

@media (min-width: 769px) {
  .nav-links {
    display: flex;
  }
}

@media (max-width: 768px) {
  /* Hide menu by default */
  .nav-links {
    display: none;
    flex-direction: column;
    justify-content: center; /* vertically center */
    align-items: center;     /* horizontally center */
    gap: 30px;

    /* Full screen overlay */
    position: fixed;
    inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0 */
    width: 100%;
    height: 100vh; /* fallback for older browsers */
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    overflow-y: auto;

    /* Safe area for notched devices */
    padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
  }

  /* Use dynamic viewport height when available to fix mobile address bar jump */
  @supports (height: 100dvh) {
    .nav-links {
      height: 100dvh;
    }
  }

  /* Show overlay when toggled */
  .nav-links.active {
    display: flex;
  }

  /* Keep hamburger on top */
  .hamburger {
    display: block;
    position: relative;
    z-index: 1000;
    font-size: 2rem;
    cursor: pointer;
  }
}

/* PROJECT GALLERY */
.project-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 30px;
}

.project-gallery img {
  display: block;
  margin: 20px auto;
  width: 100%;
  height: auto;
}

.project-heading {
  text-align: center;
  font-size: 2rem;
  margin: 10px 0 5px;
}

.project-subtitle {
  text-align: center;
  font-size: 1.2rem;
  margin: 0;
  color: #aaa;
}

.project-year {
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  margin: 5px 0 20px;
  color: #aaa;
}

.container {
  margin-top: 50px;
  display: flex;
  height: 300px;
  width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 60px;
}

.box {
  background-color: transparent;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  cursor: pointer;
  width: 300px;
  height: 100%;
  padding: 30px;
  box-sizing: border-box;
  border: 1px solid #ffffff17;
  transition: width 0.4s ease, background-color 0.4s ease;
  user-select: none;
  overflow: hidden;
}

.box.default-open {
  width: 600px;
}

.container:hover .box {
  width: 300px;
}

.container:hover .box:hover {
  width: 600px;
  background-color: #ffffff15;
}

.icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.box h2 {
  margin: 0 0 10px;
  font-size: 24px;
  text-align: center;
}

.box p {
  opacity: 0;
  margin-top: 10px;
  pointer-events: none;
  line-height: 1.6;
  transition: opacity 0.2s ease;
}

.ID-card {
  position: relative;
  width: fit-content;
  margin: 20px auto;
  transform-style: preserve-3d;
  transition: transform 0.2s ease;
  overflow: hidden;
  border-radius: 16px;
  animation: cardFall 1s ease-out forwards;
  z-index: 1;
}

.ID-card.resetting {
  transition: transform 0.6s ease;
}

.ID-card img {
  display: block;
  width: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
}

.glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #c6ff545d, transparent 80%);
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

@keyframes fallAndBounce {
  0% {
    transform: translateY(-400px) rotateZ(6deg);
    opacity: 0;
  }
  50% {
    transform: translateY(60px) rotateZ(-4deg);
    opacity: 1;
  }
  70% {
    transform: translateY(-30px) rotateZ(3deg);
  }
  85% {
    transform: translateY(15px) rotateZ(-2deg);
  }
  100% {
    transform: translateY(0) rotateZ(0deg);
  }
}

.fall-animate {
  animation: fallAndBounce 1.0s ease-out;
}

/* ABOUT SECTION */
.about {
  text-align: center;
  margin: 50px 20px;
}

.about h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about p {
  font-size: 1.6rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* CONTACT FORM */
.contact-icon {
  margin-top: 10px;
  font-size: 24px;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
  margin-bottom:30px;
}
.contact-icon:hover {
  color: #a8ff00;
}

.contact-form {
  max-width: 500px;
  margin: 0px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 10px;
}

.contact-form label {
  font-weight: bold;
  text-align: left;
  display: block;
  color:#a8ff00;
  margin-bottom: 0px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: 1px solid #ffffff27;
  background-color:#11111100;
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  color: white;
  width: 100%;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #969696;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.contact-form button {
  padding: 12px;
  border: none;
  width: 200px;
  margin: 0px auto 0 auto;
  border-radius: 8px;
  background-color: #a8ff00;
  color: rgb(0, 0, 0);
  font-family: 'Syne', sans-serif;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: #bbff32;
  color:#000000;
}

.contact-intro {
  line-height: 1.6;
  color: #ffffff98;
  text-decoration: none;
  font-weight: bold;
}

.contact-intro a {
  color: #ffffffd2;
  text-decoration: none;
  margin-bottom: 10px;
  font-weight: bold;
  text-decoration: underline;
}

.contact-intro a:hover {
  text-decoration: underline;
  color:#a8ff00;
}

.contact-intro .disclaimer {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: #ffffffd2;
  font-style: italic;
}

/* MEDIA QUERIES */
@media (max-width: 1024px) {
  .hero h2 {
    font-size: 45px !important;
  }

  .hero p {
    font-size: 25px;
  }

  .gallery {
    max-width: calc(200px * 4);
  }

  .gallery a {
    width: 200px;
    height: 300px;
  }

  .gallery img {
    width: 200px;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .hero h2 {
    font-size: 35px !important;
  }

  .hero p {
    font-size: 18px;
  }

  .gallery {
    max-width: calc(150px * 3);
  }

  .gallery a {
    width: 150px;
    height: 225px;
  }

  .gallery img {
    width: 150px;
    height: 225px;
  }

  .container {
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .box {
    width: 90%;
    height: auto;
  }
}
