/* =====================
   GLOBAL SMOOTH SCROLL
   ===================== */
html {
  scroll-behavior: smooth; /* This handles the smooth click scrolling */
}

canvas#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 600vh;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}

#scroll-driver {
  height: 550vh;
  width: 1px;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: white;
  width: 100%;
  margin: 0px;
  line-height: 1.6;
  background: transparent;
  background-color: #16213e;
  z-index: 10;
}

@keyframes bg-animation {
  0% {
    background-position: left;
  }
  100% {
    background-position: right;
  }
}
@keyframes fallin {
  from {
    transform: translate(-20px, -20px);
    opacity: 0.3;
  }
  to {
    transform: translate(0, 0);
    opacity: 1;
  }
}
@keyframes fallin_down {
  from {
    transform: translateY(-30px);
    opacity: 0.3;
  }
  to {
    transform: translate(0, 0);
    opacity: 1;
  }
}
@keyframes fallin_invers {
  from {
    transform: translate(20px, -20px);
    opacity: 0;
  }
  to {
    transform: translate(0, 0);
    opacity: 1;
  }
}
@keyframes bounce-cta {
  0%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-4px);
  }
}
@keyframes bounce-title {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  75% {
    transform: rotate(-2deg);
  }
}
@keyframes happy-jump {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(4px, -4px) rotate(2deg);
  }
  50% {
    transform: translate(4px, 4px) rotate(0deg);
  }
  75% {
    transform: translate(-4px, 4px) rotate(-2deg);
  }
  100% {
    transform: translate(-4px, -4px) rotate(0deg);
  }
}
@keyframes corner-dance {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(5px, -3px);
  }
  50% {
    transform: translate(0, 3px);
  }
  75% {
    transform: translate(-5px, -3px);
  }
  100% {
    transform: translate(0, 0);
  }
}
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.attention-button {
  display: inline-block;
  padding: 10px 10px;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-family: "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: whitesmoke;
  border-radius: 100px;
  border: 2px solid rgb(245, 222, 179);
  box-shadow: 2px 3px 3px cyan;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(135deg, rgb(245, 222, 179), rgb(0, 91, 107), #04aa6d, #16213e, rgb(245, 222, 179));
  background-size: 300% 300%;
  animation: bounce-cta 1.8s ease-in-out infinite, gradient-shift 4s ease infinite;
}
.attention-button:hover {
  animation-play-state: paused, running;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(4, 170, 109, 0.6);
}
.attention-button:active {
  transform: scale(0.96);
}

header {
  height: 90px;
  opacity: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  border-bottom: 3px solid rgb(245, 222, 179);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 0 60px 20px rgba(0, 0, 0, 0.662);
  background: linear-gradient(-45deg, rgb(47, 8, 66), rgb(0, 91, 107), #16213e);
  animation: bg-animation 3s infinite alternate;
  background-size: 400%;
}
header .logo_content {
  display: flex;
  align-items: center;
  animation: fallin 0.7s ease-in forwards;
}
header .logo_content img {
  margin-right: 25px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.223px solid teal;
  box-shadow: 5px 4px 5px cyan;
}
header .logo_content img:hover {
  box-shadow: 5px 4px 5px wheat;
  width: 80px;
  height: 80px;
  border: 2.223px solid black;
  transition: box-shadow 1s ease, border 1s ease, width 0.5s ease, height 0.5s ease;
}
header .logo_content .brand-text h1 {
  font-family: "Courier New", monospace;
  color: rgb(245, 222, 179);
  font-size: 1.5rem;
  margin-bottom: 0;
}
header .logo_content .brand-text .subtitle {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
}
header .logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
header .navi1 ul {
  animation: fallin_invers 0.7s ease-in forwards;
  display: flex;
  gap: 50px;
  width: 100%;
}
@media (max-width: 900px) {
  header .navi1 ul {
    display: none;
  }
}
header .navi1 ul li a {
  color: wheat;
  font-weight: bold;
  font-size: 1.2rem;
  transition: color 0.3s;
}
header .navi1 ul li a:hover {
  color: whitesmoke;
  text-shadow: 0 0 10px cyan;
}
header .nav-link {
  /* Using your Wheat color instead of undefined var */
  color: rgb(245, 222, 179);
  font-weight: 500;
  position: relative; /* Essential for the underline to stick to the text */
  padding: 5px 0;
  transition: color 0.3s;
}
header {
  /* The Underline Effect */
}
header .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0; /* Start hidden */
  height: 1px;
  background: cyan;
  transition: width 0.3s ease-in-out; /* The smooth animation */
}
header {
  /* Hover State */
}
header .nav-link:hover::after {
  width: 100%;
}

main {
  opacity: 1;
}

.Intro {
  height: 100vh;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  animation: bg-animation 3s infinite alternate;
  background: linear-gradient(-45deg, rgba(47, 8, 66, 0.6), rgba(0, 91, 107, 0.6), rgba(22, 33, 62, 0.6));
  background-size: 400%;
  backdrop-filter: blur(2px);
  border-radius: 20px;
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.4);
  margin-top: 15vh;
  z-index: 20;
  opacity: 1;
}
@media (max-width: 760px) {
  .Intro {
    margin-top: 15vh;
    height: 80vh;
    width: 100%;
    max-width: 100%;
  }
}
.Intro h1 {
  font-size: 2.5rem;
}
@media (max-width: 760px) {
  .Intro h1 {
    font-size: 1.4rem;
  }
}
.Intro h1 {
  color: wheat;
  text-shadow: 0 0 5px cyan;
  animation: fallin_down 0.7s ease-in forwards;
  margin-top: 30px;
  line-height: 1.2;
}
.Intro p {
  font-size: 1.2rem;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
}
.Intro .Intro-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1% 2%;
  gap: 10px;
}
.Intro .Intro-content iframe {
  width: 112vh;
  height: 55vh;
  align-items: center;
  /* This tells the poster (and video) how to fit inside the box */
  object-fit: cover; /* Use 'contain' instead if you don't want any cropping */
  border-radius: 150px;
  border: 2px solid black;
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  margin-top: 2px;
  padding: 1px;
}
.Intro .Intro-content iframe:hover {
  position: relative;
  z-index: 50;
  transform: translateY(-4px) scale(1.05);
  border-radius: 0px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 255, 255, 0.25), 0 0 0 9999px rgba(0, 0, 0, 0.85);
  transition: transform 2s ease, box-shadow 1s ease, border-radius 3s ease;
}
@media (max-width: 760px) {
  .Intro .Intro-content iframe {
    width: 51vh;
    height: 25vh;
    border-radius: 160px;
    box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
    border: 2px solid black;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1px;
    object-fit: cover;
  }
}

.hero {
  height: 550vh;
  width: 100%;
  max-width: 96%;
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
  left: 2%;
}
@media (max-width: 760px) {
  .hero {
    height: 370vh;
  }
}
.hero h2 {
  font-size: 2.5rem;
}
@media (max-width: 760px) {
  .hero h2 {
    font-size: 1.8rem;
  }
}
.hero h2 {
  color: rgb(245, 222, 179);
  margin-bottom: 10px;
  margin-top: 20px;
  line-height: 1.2;
}
.hero h2 {
  font-size: 2.5rem;
}
@media (max-width: 760px) {
  .hero h2 {
    font-size: 1.8rem;
  }
}
.hero h2 {
  color: rgb(245, 222, 179);
  margin-bottom: 10px;
  line-height: 1.2;
}
.hero p {
  font-size: 1.2rem;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 2px;
  font-family: "Courier New", monospace;
}
.hero {
  background-color: rgba(22, 33, 62, 0.55);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 10px, transparent 10px, transparent 20px);
  backdrop-filter: blur(2px);
  background-size: 20px 20px; /* Determines the size of the grid squares */
  backdrop-filter: blur(2px);
  border: 2px solid wheat;
  border-radius: 20px;
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.4);
  margin-top: 80px;
  margin-bottom: 10px;
  z-index: 20;
  opacity: 1;
}
.hero .hero_content {
  justify-content: space-between;
  align-items: center;
  padding: 0% 5%;
  z-index: 2;
  animation: fallin_down 0.7s ease-in forwards;
  display: flex;
  flex-direction: column;
}
.hero .hero_content video {
  width: 100%;
  max-width: 100%; /* Controls the maximum size of the video AND the poster */
  height: 76vh;
  /* This tells the poster (and video) how to fit inside the box */
  object-fit: cover; /* Use 'contain' instead if you don't want any cropping */
  border-radius: 60px;
  border: 2px solid black;
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 1px;
}
@media (max-width: 760px) {
  .hero .hero_content video {
    width: 100%;
    max-width: 100%;
    height: 25vh;
    border-radius: 0px;
    border: 2px solid black;
    box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1px;
    object-fit: cover;
  }
}
.hero .hero_content iframe {
  width: 150vh;
  height: 80vh;
  /* This tells the poster (and video) how to fit inside the box */
  object-fit: cover; /* Use 'contain' instead if you don't want any cropping */
  border-radius: 60px;
  border: 2px solid black;
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 1px;
}
.hero .hero_content iframe:hover {
  position: relative;
  z-index: 50;
  transform: translateY(-4px) scale(1.05);
  border-radius: 0px;
  transition: transform 2s ease, box-shadow 1s ease, border-radius 3s ease;
}
@media (max-width: 760px) {
  .hero .hero_content iframe {
    width: 100%;
    max-width: 100%;
    height: 25vh;
    border-radius: 0px;
    border: 2px solid black;
    box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1px;
    object-fit: cover;
  }
}
.hero .hero_content img {
  width: 100%;
  max-width: 1000px;
  height: 70vh;
  border-radius: 10px;
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  border: 2px solid black;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 1px;
}
@media (max-width: 760px) {
  .hero .hero_content img {
    width: 100%;
    max-width: 1000px;
    height: 25vh;
    border-radius: 0px;
    box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
    border: 2px solid black;
    border-radius: 9px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1px;
  }
}
.hero .hero_text {
  max-width: 500px;
  padding: 0 20px;
  z-index: 2;
  animation: fallin_down 0.7s ease-in forwards;
}
.hero .hero_text h1 {
  font-size: 1.9rem;
}
@media (max-width: 760px) {
  .hero .hero_text h1 {
    font-size: 1.5rem;
  }
}
.hero .hero_text h1 {
  color: rgb(245, 222, 179);
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero .hero_text p {
  font-size: 1.2rem;
  color: #ddd;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
}

.Outlook-Content {
  height: 230vh;
  width: 100%;
  max-width: 96%;
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
  left: 2%;
}
@media (max-width: 760px) {
  .Outlook-Content {
    height: 120vh;
  }
}
.Outlook-Content h1 {
  font-size: 2.5rem;
}
@media (max-width: 760px) {
  .Outlook-Content h1 {
    font-size: 1.8rem;
  }
}
.Outlook-Content h1 {
  color: rgb(245, 222, 179);
  margin-bottom: 10px;
  margin-top: 20px;
  line-height: 1.2;
}
.Outlook-Content h2 {
  font-size: 2.5rem;
}
@media (max-width: 760px) {
  .Outlook-Content h2 {
    font-size: 1.8rem;
  }
}
.Outlook-Content h2 {
  color: rgb(245, 222, 179);
  margin-bottom: 10px;
  line-height: 1.2;
}
.Outlook-Content p {
  font-size: 1.2rem;
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
}
.Outlook-Content {
  background-color: rgba(22, 33, 62, 0.55);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 10px, transparent 10px, transparent 20px);
  backdrop-filter: blur(2px);
  border: 2px solid wheat;
  border-radius: 12px;
  box-shadow: 0 80px 32px rgba(0, 0, 0, 0.4);
  margin-top: 140px;
  margin-bottom: 50px;
  z-index: 20;
  opacity: 1;
}
.Outlook-Content .Outlook-floor {
  justify-content: space-between;
  align-items: center;
  padding: 0% 5%;
  z-index: 2;
  animation: fallin_down 0.7s ease-in forwards;
  display: flex;
  flex-direction: column;
}
.Outlook-Content .Outlook-floor video {
  width: 100%;
  max-width: 1000px;
  height: auto;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid rgb(245, 222, 179);
  margin-top: 20px;
  padding: 1px;
  margin-bottom: 20px;
}
.Outlook-Content .Outlook-floor img {
  width: 100%;
  max-width: 1000px;
  height: 78vh;
  border-radius: 10px;
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  border: 2px solid black;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 1px;
}
@media (max-width: 760px) {
  .Outlook-Content .Outlook-floor img {
    width: 100%;
    max-width: 1000px;
    height: 20vh;
    border-radius: 0px;
    box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
    border: 2px solid black;
    border-radius: 9px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 1px;
  }
}

/* ===================== */
/* Interactive SECTION */
/* ===================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact {
  padding: 60px 0;
  border-bottom: 3px solid wheat;
  animation: bg-animation 3s infinite alternate;
  background: linear-gradient(-45deg, rgb(47, 8, 66), rgb(0, 91, 107), #16213e);
}

.contact-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent-green);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 500;
}

.form-input, .form-textarea {
  padding: 12px 15px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-light);
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-green);
}

/* ===================== */
/* RESPONSIVE STYLES */
/* ===================== */
@media (max-width: 992px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2rem;
  }
  .about-content {
    grid-template-columns: 1fr;
  }
  .contact-content {
    grid-template-columns: 1fr;
  }
  .timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item:nth-child(even) {
    left: 0;
  }
  .timeline-item::after {
    left: 21px;
  }
  .timeline-item:nth-child(even)::after {
    left: 21px;
  }
}
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    right: -100%;
    flex-direction: column;
    background: var(--primary-blue);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    gap: 0;
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-item {
    margin: 15px 0;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
footer {
  background: linear-gradient(-45deg, rgb(47, 8, 66) 5%, rgb(0, 91, 107), #16213e);
  background-size: 400%;
  animation: bg-animation 3s infinite alternate;
  padding-block: 20px;
  text-align: center;
  color: wheat;
  font-weight: bold;
  width: 100%;
  opacity: 0.95;
  z-index: 5;
  border-top: 3px solid wheat;
}
footer .socials {
  margin-top: 10px;
}
footer .socials a {
  color: rgb(245, 222, 179);
  font-size: 1.5rem;
  margin: 0 10px;
}

.footerimg {
  width: 100%;
  max-width: 298px;
  height: 170px;
  border-radius: 7px;
  box-shadow: 15px 5px 15px black;
  /* The Video Setup */
}

/* 1. The Container: Control all your sizing right here! */
.hover-video-card-footer {
  position: relative;
  width: 100%;
  height: 180px; /* Match the image height */
  max-width: 298px;
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 4px 4px 0px 0px rgb(0, 0, 0);
  transition: transform 0.3s ease-in-out;
  /* 2. The Thumbnail Image */
}
.hover-video-card-footer .footerimg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hover-video-card-footer {
  /* 3. The Hidden Video */
}
.hover-video-card-footer .hover-video-footer {
  position: absolute;
  top: 0%;
  left: 0%;
  width: 50vh;
  height: 30vh;
  object-fit: cover;
  opacity: 0; /* Properly hidden by default */
  transition: opacity 0.4s ease-in-out;
  z-index: 2;
  pointer-events: none; /* Shield is UP */
}
.hover-video-card-footer {
  /* 4. THE MAGIC HOVER STATE (This fixes the controls!) */
}
.hover-video-card-footer:hover {
  transform: scale(1.05); /* Optional: small pop up effect */
  z-index: 10;
}
.hover-video-card-footer:hover .hover-video-footer {
  opacity: 1; /* Video fades in */
  pointer-events: auto; /* Shield is DOWN! You can click full screen now */
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 20px;
  gap: 30px;
}

/* ===================== */
/* MEDIA QUERIES */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .research-card {
    flex-direction: column;
  }
  header {
    padding: 0 20px;
  }
  .navi1 {
    display: none;
  }
}
@media (max-width: 1030px) {
  .brand-text .subtitle {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
  }
}
/* ===================== */
/* RESPONSIVE STYLES */
/* ===================== */
@media (max-width: 992px) {
  h1 {
    font-size: 3rem;
  }
  h2 {
    font-size: 2rem;
  }
  .about-content {
    grid-template-columns: 1fr;
  }
  .contact-content {
    grid-template-columns: 1fr;
  }
  .timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item:nth-child(even) {
    left: 0;
  }
  .timeline-item::after {
    left: 21px;
  }
  .timeline-item:nth-child(even)::after {
    left: 21px;
  }
}
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    right: -100%;
    flex-direction: column;
    background: var(--primary-blue);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    gap: 0;
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-item {
    margin: 15px 0;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}