html {
  scroll-behavior: auto !important;
}

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

#station-nav {
  display: None;
}

@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);
  }
  35% {
    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%;
  }
}
@keyframes bg-animation {
  0% {
    background-position: left;
  }
  100% {
    background-position: right;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-image: radial-gradient(rgb(0, 91, 107) 10%, rgb(47, 8, 66) 70%, rgb(3, 3, 3) 100%);
  color: white;
  overflow-x: hidden;
  width: 100%;
  margin: 0px;
  line-height: 1.6;
}

header {
  height: 90px;
  background: linear-gradient(-45deg, rgb(47, 8, 66), rgb(0, 91, 107), #16213e);
  animation: bg-animation 3s infinite alternate;
  background-size: 400%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  border-bottom: 3px solid rgb(245, 222, 179);
  position: fixed;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 0 60px 20px rgba(0, 0, 0, 0.662);
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  header {
    justify-content: center;
  }
}
header .logo_content {
  animation: fallin 0.7s ease-in forwards;
  display: flex;
  align-items: center;
  margin-right: 30px;
}
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;
  animation: bounce-title 0.8s ease-in-out infinite;
  transition: transform 0.02s;
}
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: 760px) {
  header .navi1 ul {
    display: none;
  }
}
header .navi1 ul li a {
  color: rgb(245, 222, 179);
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s;
}
header .navi1 ul li a:hover {
  color: rgb(0, 0, 0);
  text-shadow: 0 0 10px rgb(245, 222, 179);
}
header .nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 4vw, 50px);
}
header .nav-link {
  /* Using 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;
  height: 2px;
  background: cyan;
  transition: width 0.3s ease-in-out; /* The smooth animation */
}
header {
  /* Hover State */
}
header .nav-link:hover::after {
  width: 100%;
}

@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;
  }
}
main {
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero {
  min-height: calc(100vh - 90px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bg-animation 3s infinite alternate;
  background: linear-gradient(-45deg, rgba(47, 8, 66, 0.3), rgba(0, 91, 107, 0.3), rgba(22, 33, 62, 0.3));
  background-size: 400%;
  text-align: center;
  border-bottom: 3px solid rgb(245, 222, 179);
}
@media (max-width: 803px) {
  .hero {
    padding: 10px 1%;
    gap: 20px;
  }
}
@media (max-width: 420px) {
  .hero {
    padding: 10px 1%;
    gap: 20px;
  }
}
.hero .hero_text {
  max-width: 800px;
  width: 100%;
  border: 2px solid cyan;
}
.hero .hero_text h1 {
  font-size: 2.5rem;
  color: white;
  line-height: 1.2;
  margin-bottom: 10px;
  padding: 15px 0;
}
.hero .hero_text p {
  font-size: 0.9rem;
  color: #ddd;
  margin-bottom: 40px;
  font-family: "Courier New", monospace;
  word-spacing: 1px;
  line-height: 30px;
}
.hero .hero_text .hero_buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.hero .hero_text .hero_buttons .btn-primary {
  background-color: rgb(245, 222, 179);
  color: rgb(47, 8, 66);
  padding: 15px 30px;
  font-weight: bold;
  border: 2px solid rgb(245, 222, 179);
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
  transition: transform 0.2s;
}
.hero .hero_text .hero_buttons .btn-primary:hover {
  transform: translate(-2px, -2px);
}
.hero .hero_text .hero_buttons .btn-secondary {
  background-color: transparent;
  color: rgb(245, 222, 179);
  padding: 15px 30px;
  border: 2px solid rgb(245, 222, 179);
  box-shadow: 8px 8px 0px 0px rgb(0, 0, 0);
}
.hero .hero_text .hero_buttons .btn-secondary:hover {
  background-color: rgba(245, 222, 179, 0.1);
}

.abstract-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  border-radius: 2rem;
  padding: 2.5rem;
  max-width: 820px;
  margin: 5rem auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.abstract-card:hover {
  transform: translateY(-4px);
  transform: translateY(-4px) scale(1.05);
  border-radius: 0px;
  background: transparent;
  margin-top: 24vh;
  backdrop-filter: blur(50px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 30px cyan, 0 0 0 9999px rgba(0, 0, 0, 0.829);
  transition: backdrop-filter 5s ease, margin-top 2s ease, transform 5s ease, width 2s ease, height 2s ease, box-shadow 3s ease, border-radius 5s ease;
}
.abstract-card h1.glitch {
  font-family: "Courier New", monospace;
  font-size: 2rem;
  color: wheat;
  text-shadow: 0 0 5px cyan;
  position: relative;
  margin-bottom: 1.5rem;
}
@media (max-width: 760px) {
  .abstract-card h1.glitch {
    animation: none;
  }
}
.abstract-card h1.glitch::before, .abstract-card h1.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: wheat;
}
.abstract-card h1.glitch::before {
  animation: glitch 2s infinite;
  clip-path: inset(0 0 50% 0);
  text-shadow: 2px 0 red;
}
.abstract-card h1.glitch::after {
  animation: glitch 2s infinite reverse;
  clip-path: inset(50% 0 0 0);
  text-shadow: -2px 0 blue;
}
@media (max-width: 760px) {
  .abstract-card h1.glitch::before, .abstract-card h1.glitch::after {
    animation: none;
    content: none;
  }
}
.abstract-card .abstract-full p {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #ddd;
  margin-bottom: 20px;
}
.abstract-card .katex {
  color: #e0f2fe;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}
.abstract-card .abstract-toggle {
  margin-top: 2.5rem;
  background: transparent;
  border: 1px solid wheat;
  color: wheat;
  padding: 0.7rem 1.5rem;
  border-radius: 100px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}
.abstract-card .abstract-toggle:hover {
  background: rgba(245, 222, 179, 0.1);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}
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.85;
  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: 100%; /* Now it will perfectly match the 250px of the container */
  height: 100%;
  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: 760px) {
  .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: 760px) {
  .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;
  }
}