* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  scroll-behavior: smooth;
}

.page-container {
  width: 100%;
  min-height: 100vh; /* Full viewport height */
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.floating-equations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

.floating-equations span {
  position: absolute;
  color: #777;
  font-size: 2vh;
  font-family: 'Poppins', sans-serif;
  opacity: 0.8;
  animation: floatEquation var(--duration) linear forwards;
  transform: rotate(var(--rotation));
  text-shadow: 0 0 6px white;
}

@keyframes floatEquation {
  0% {
    transform: translate(0, 0) rotate(var(--rotation));
    opacity: 0;          /* start fully transparent */
  }
  20% {
    opacity: 0.6;        /* fade in to visible */
  }
  80% {
    opacity: 0.6;        /* stay visible */
    transform: translate(calc(var(--dx) * 0.8), calc(var(--dy) * 0.8)) rotate(var(--rotation)); /* move gradually */
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rotation));
    opacity: 0;          /* fade out at end */
  }
}

.content {
  flex: 1; /* Take up remaining space */
  background: #111;
}

/* --- Hamburger Icon --- */
.hamburger {
  display: none;
  position: relative;
  width: clamp(32px, 6vw, 64px);
  height: clamp(32px, 6vw, 64px);
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  position: absolute;
  width: 100%;
  height: clamp(3px, 0.5vw, 6px);
  background: white;
  border-radius: 2px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform-origin: center;
}

/* Top bar - move it a little below the top */
.hamburger span:nth-child(1) {
  top: 20%;
}

/* Middle bar stays centered */
.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

/* Bottom bar - move it a little above the bottom */
.hamburger span:nth-child(3) {
  bottom: 20%;
}

/* --- Animate into X --- */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: auto;
  top: 50%;
}

/* --- Responsive Styles --- */
@media (max-width: 1600px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    background-color: #222;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    margin: 60px 0;
  }
}

/* Navbar Styling */
.navbar {
  position: relative;
  background: #222;
  top: 0;
  left: 0;
  width: 100%;
  color: black;
  z-index: 1000;
}

.navbar .header {
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 3vw 100px 3vw;
  position: relative;
}

.logo a {
  display: flex;
  align-items: center;
  color: #ffffff;
  font-weight: bold;
  font-size: clamp(42px, 5vw, 72px);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
}

.nav-links {
  list-style: none;
  display: flex;
  font-family: "Poppins", sans-serif;
}

.nav-links li {
  margin: 0 30px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: clamp(24px, 8vw, 48px);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: rgb(126, 126, 126);
}

.wave-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: hidden;
  line-height: 0;
  z-index: 0;
}

svg {
  width: 100%;
  height: 100%;
  display: block;
}

.profile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 2rem 0; 
}

.profile img {
  margin: 20px;
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 50%;
  z-index: 999;
}

/* About Section Styling */
.about {
    color: #AAA;
    margin-top: 2vh;
    margin-bottom: 2vh;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1vh 4vw 1vh 4vw;
    font-family: "Poppins", sans-serif;
}

h1 {
  font-size: clamp(36px, 4vw, 52px);
}

.about .text {
    flex: 1;
    padding: 20px;
}

.about p {
    font-size: clamp(24px, 3vw, 36px);
    color: #AAA;
}

.highlighted-name {
    color: white;
}

/* Contact Styling */
.contact {
    margin: 120px auto;
    background-color: #222;
    color: white;
    border-radius: 40px;
    padding: 40px;
    width: clamp(128px, 80%, 780px);
    display: flex;
    position: relative;
    text-align: center;
    justify-content: center;
    font-size: clamp(36px, 6vw, 52px);
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    transition: color 1.0s, background 1.0s;
}

.contact:hover {
    background-color: white;
    color: #222;
}

.link-spanner {
    position: absolute; 
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.pageheader {
    padding-top: 120px;
    padding-bottom: 10px;
    font-size: clamp(36px, 8vw, 72px);
    color: white;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    text-align: center;
}

.filters {
    display: flex;
    justify-content: center;
}

#toggle-btn {
    padding: clamp(4px, 2vw, 10px) clamp(8px, 2vw, 20px);
    margin: clamp(1px, 1vw, 4px) clamp(1px, 1vw, 4px);
    border: 2px solid white;
    border-radius: 36px;
    background-color: #222;
    color: white;
    cursor: pointer;
    font-size: clamp(4px, 4vw, 36px);
    transition: background 0.3s, color 0.3s;
}

#toggle-btn:hover {
    background-color: white;
    color: #222; 
}

#toggle-btn.active {
    background-color: white;
    color: #222;
}

.item-list {
    margin-left: clamp(0px, 1vw, 20px);
    margin-right: clamp(0px, 1vw, 20px);
    padding-top: 20px;
    padding-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 100%, 700px), 1fr));
    grid-auto-rows: 1fr;
    list-style: none;
}

@keyframes wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    50% { transform: rotate(-1deg); }
    75% { transform: rotate(0.5deg); }
    100% { transform: rotate(0deg); }
}

.card {
    background: #222;
    margin: 10px;
    border-radius: 14px;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.card:hover {
    animation: wiggle 0.4s ease;
}

.card-title {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 48px);
    text-align: center;
    font-weight: bold;
    font-family: "Poppins", sans-serif;
    color: white;
}

.card-media {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 12px;
}

.card-tags {
    margin: 4px;
    font-size: clamp(18px, 2vw, 36px);
    font-weight: bold;
    color: white;
    font-family: "Poppins", sans-serif;
}

.card-description {
    font-size: clamp(16px, 2vw, 30px);
    color: #AAA;
    font-size: bold;
    font-family: "Poppins", sans-serif;
}

.responsive-iframe {
    position: relative;
    width: 100%;
    height: 0; /* Important for responsive height */
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 * 100) */
}

.responsive-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.footer {
  height: 100px;
  padding-top: 40px;
  padding-bottom: 80px;
  background: #222;
  color: #ffffff;
  font-size: clamp(12px, 4vw, 24px);
  text-align: center;
  font-weight: bold;
}
