* {
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

body {
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:url('https://p7h2gynp3b.ufs.sh/f/QwfPGNjwO1pr8uqjp0h2EDzBhpeb5C6ZtJNq4YRwKj7cuQAf') no-repeat center center fixed;  
    /* background: linear-gradient(to bottom right, #e25d04, #001bb4); */
    background-size: cover;
    padding-top: 80px; /* Adjusted for floating navbar: navbar height 60px + top offset 10px + 10px breathing room */
    color: #fff;
    /* Ensure smooth scrolling behavior */
    scroll-behavior: smooth;
    overflow-y: auto;
    /* Improve scroll performance */
    touch-action: pan-y; /* Allow vertical scrolling on touch devices */
}

.navbar {
    background: rgba(0, 0, 0, 0.50);
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    position: fixed;
    top: 10px; /* Offset from top for floating effect */
    left: 10px; /* Offset from left */
    right: 10px; /* Offset from right */
    width: auto; /* Let left/right offsets define width */ 
    max-width: calc(100vw - 20px); /* Full width minus left/right offsets */
    z-index: 999;
    transition: all 0.3s ease;
    border-radius: 25px; /* Rounded corners for floating effect */
    box-shadow: 0 4px 12px rgba(0,0,0,0.9); /* Shadow for floating effect */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    backdrop-filter: blur(5px);
    /* -webkit-backdrop-filter: blur(5px); */
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

.navbar-container {
    display: flex;
    justify-content: space-between;
    height: 60px;
  width: 100%;
  max-width: 100%;
    margin: 0 auto;
    padding: 0 50px;
}

.navbar-logo {
    color: #fff;
    justify-self: start; /* On desktop, logo is on the left */
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    display: flex;
    align-items: center;
    opacity: 100%;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    text-align: center;
}

.nav-item {
    height: 60px;
}

.nav-links {
    color: #fff;
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0 1rem;
    height: 100%;
    transition: all 0.2s ease-in-out; /* Fluid animation for links */
}

.nav-links:hover {
    color: #7fffd4; /* Aqua blue for hover */
    transform: scale(1.1); /* Slight zoom on hover */
}

/* .menu-icon is defined lower in the media query */

@media screen and (max-width: 960px) {
  .navbar-container {
    padding: 0 20px; /* Standard padding */
    justify-content: center; /* Center logo when menu icon is absolute */
  }

  .nav-menu {
    display: flex;
    flex-direction: column;
    max-width: fit-content;
    height: fit-content;
    max-height: 50vh;
    /* height: calc(100vh - 85px - 10px); Full height - (navbar top+height+gap) - bottom offset */
    position: absolute;
    top: 75px; /* navbar top (10px) + navbar height (60px) + gap (5px) */
    left: -100%; /* Hidden off-screen initially */
    right: 10px; /* Defines width with left:10px when active */
    opacity: 0; /* Hidden by default */
    visibility: hidden; /* Not interactive when hidden */
    transition: opacity 0.5s ease, left 0.5s ease, visibility 0s linear 0.5s; /* Delay visibility change on hide */
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px; /* Rounded corners for floating effect */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Shadow for floating effect */
    padding: 10px 0; /* Add some padding inside the menu */
    z-index: 998; /* Below main navbar (999) but above page content */
  }

  .nav-menu.active {
    left: 20%;
    transform: translateX(-50%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, left 0.5s ease, visibility 0s linear 0s; /* Visibility active immediately on show */
    /* z-index is inherited or can be re-stated if needed, 998 is fine */
    max-width: fit-content;
    height: fit-content;
    max-height: 50vh;
  }

  .nav-item {
    width: 100%;
    height: 100%;;
    font-size: 1.5em;
    padding: .5em;
    margin: 0;
  }

  .nav-links {
    text-align: center;
    /* padding: 2rem; */
    /* width: 100%; */
    display: table;
  }

  .nav-links:hover {
    color: #7fffd4;
    transform: scale(1.05); /* Slightly less zoom on mobile */
  }

  .menu-icon {
    display: block; /* Show hamburger icon */
    position: absolute;
    top: 50%; /* Vertically center relative to navbar */
    left: 25px; /* Position from left (navbar-container padding + a bit more) */
    transform: translateY(-50%); /* Fine-tune vertical centering */
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1000; /* Ensure it's above other navbar content if overlapping */
  }

  .menu-icon .bar {
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
  }

  .menu-icon.active .bar:nth-child(2) {
    opacity: 0; /* Middle bar disappears */
  }

  .menu-icon.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* Top bar rotates */
  }

  .menu-icon.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* Bottom bar rotates */
  }
}

.container {
  background: white;
  padding: 3rem 4rem;
  border-radius: 8px; /* Standardized rounded corners */
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Enhanced shadow for floating */
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  margin-top: 20px; /* Add space below the floating navbar */
}

h1 {
  color: #2d3748;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 4px; /* Standardized rounded corners */
  font-size: 1rem;
  outline: none;
}

input:focus {
  border-color: #667eea;
}

button {
  width: 100%;
  background: #667eea;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px; /* Standardized rounded corners */
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #5a67d8;
}

.hidden {
  display: none;
}

#greeting {
  margin-top: 1rem;
  color: #2d3748;
  font-size: 1.25rem;
  white-space: pre-line;
}


/* Hero Section (skills and bio) */
.hero-section {
  /* background: rgba(0, 0, 0, 0.75); */
  padding: 2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto; /* Center horizontally */
}
/* End of hero */

/* Content Sections */
.content-section {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 1300px;
  max-width: 100vw;
  /* margin: 2rem 1rem; Increased margin for better section separation */
  min-height: auto; /* Remove fixed height to prevent magnetism */
  backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}

.content-section h2 {
  color: #fff;
  margin-bottom: 2rem;
  font-size: 2.5rem;
      /* FiraSans */
    font-family: 'Fira Sans', sans-serif;
}



.content-section p {
  font-size: 1.4rem;
  line-height: 1.6;
}


.skills-section {
  padding: 2rem 2rem;
  text-align: center;
  flex-direction: column;
  margin: 2rem 1rem; /* Increased margin for better section separation */
}

.columns-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 0;
  align-items: flex-start;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.skill-dropdown {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  /* Ensure scrolling works over skill dropdowns */
  touch-action: pan-y; /* Allow vertical scrolling on touch devices */
}

.skill-dropdown:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.skill-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
}

.skill-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.skill-header.active {
  background: rgba(127, 255, 212, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #7fffd4;
  min-width: 30px;
}

.skill-header h3 {
  flex: 1;
  margin: 0;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.dropdown-arrow {
  font-size: 0.9rem;
  color: #7fffd4;
  transition: transform 0.3s ease;
}

.skill-header.active .dropdown-arrow {
  transform: rotate(180deg);
}

.skill-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  padding: 0;
}

.skill-content.active {
  max-height: 300px;
  padding: 1.5rem;
}

.skill-description {
  margin-bottom: 1rem;
}

/* Mobile centering and overflow fixes */
@media screen and (max-width: 600px) {
  /* html, body {
    overflow-x: hidden; /* ensure no horizontal scrolling */
  } */

  body {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .navbar {
    left: 10px;
    right: 10px;
  }

  .navbar-container {
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
  }

  .container,
  .content-section,
  .hero-section {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
  }

  .columns-container {
    flex-direction: column;
    align-items: center;
  }
}

.skill-description p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.skill-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: rgba(127, 255, 212, 0.2);
  color: #7fffd4;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(127, 255, 212, 0.3);
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: rgba(127, 255, 212, 0.3);
  transform: translateY(-1px);
}

/* Education Section as Separate Card */
.education-section-wrapper {
  padding: 2rem 2rem;
  text-align: center;
  flex-direction: column;
  margin: 2rem 1rem;
}

.education-container {
  display: flex;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
}

.education-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
  max-width: 350px;
}

.education-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.education-card-header {
  display: flex;
  align-items: center;
  padding: 1rem 0rem;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.education-card-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.education-card-header.active {
  background: rgba(127, 255, 212, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.education-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #7fffd4;
  min-width: 30px;
}

.education-card-header h3 {
  margin: 0;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.education-card-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  padding: 0 1.25rem;
}

.education-card-content.active {
  max-height: 300px;
  padding: 1rem 1.25rem;
}

.education-info {
  margin-bottom: 0.75rem;
}

.education-info p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.education-info p strong {
  color: #7fffd4;
  font-weight: 600;
}

.education-skills {
  margin-top: 0.75rem;
}

.education-skills > p {
  margin: 0 0 0.4rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #7fffd4;
  text-align: left;
}

.education-skills .skill-technologies {
  margin-top: 0.4rem;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Ensure portfolio cards have relative positioning for dropdown */

.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.portfolio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.portfolio-card-header {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  border-radius: 10px 10px 0 0;
  justify-content: space-between;
}

.video-toggle-btn {
  background: rgba(127, 255, 212, 0.2);
  border: 1px solid #7fffd4;
  border-radius: 50%;
  width: 1em;
  height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7fffd4;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-toggle-btn:hover {
  background: rgba(127, 255, 212, 0.3);
  transform: scale(1.1);
}

.video-toggle-btn.active {
  background: #7fffd4;
  color: #000;
}

.video-toggle-btn i {
  font-size: 0.9rem;
}

.link-button {
  background: rgba(127, 255, 212, 0.2);
  border: 1px solid #7fffd4;
  border-radius: 50%;
  width: 1em;
  height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7fffd4;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-card-icon {
  font-size: 2rem;
  margin-right: 1rem;
  color: #7fffd4;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-card-image {
  max-height: 5em;
  border-radius: 8px;
  object-fit: contain;
  margin-right: 1rem;
  width: 100px;
}

.portfolio-card h3 {
  flex: 1;
  margin: 0;
  text-align: left;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

.portfolio-card-content {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  flex-grow: 1;
  border-radius: 0 0 10px 10px;
}

.portfolio-card-description {
  margin-bottom: 1rem;
}

.portfolio-card-description p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.portfolio-card-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Video Player Dropdown Styling */
.portfolio-video-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.4);
}

.portfolio-video-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.video-player-container {
  position: relative;
  min-height: 200px;
}

.video-player-container iframe {
  width: 100%;
  height: 280px;
  border-radius: 8px;
  background: #000;
}

.video-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 1em;
  height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.video-close-btn:hover {
  background: rgba(255, 0, 0, 0.7);
  border-color: #ff0000;
  transform: scale(1.1);
}

.video-close-btn i {
  font-size: 0.8rem;
}

/* Ensure portfolio cards have relative positioning for dropdown */
.portfolio-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: visible; /* Changed from hidden to visible for dropdown */
  transition: all 0.3s ease;
  opacity: 0; /* Initially hidden for animation */
  transform: translateY(50px); /* Start slightly lower for animation */
  display: flex;
  flex-direction: column;
  position: relative; /* Added for dropdown positioning */
  /* Ensure scrolling works over portfolio cards */
  touch-action: pan-y; /* Allow vertical scrolling on touch devices */
  pointer-events: auto; /* Ensure pointer events work correctly */
}

/* End of Portfolio */


/* Biography Section */

.content-section  {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    /* margin: 3em, 10em; */
    box-shadow: 0 4px 12px rgba(0,0,0,10); /* Shadow for floating effect */
}

/* Biography Section */
.bio-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  max-width: 900px;
  text-align: center;
  padding: 2rem;
}

.bio-container p {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #fff;  
  margin: 1em;
}

.bio-image {
  max-width: 90vw;
  max-height: 30em;
  border-radius: 10%;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  scale: 1.0;
}

/* Responsive adjustments for content sections */
@media screen and (min-width: 950px) {

  .content-section {
    /* margin: 5em 8em; */
    border-radius: 25px;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    min-height: auto; /* Remove fixed height to prevent magnetism */

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .skills-section {
    flex-direction: column;
    max-width: 1050px;
    align-self: center;
  }

  .columns-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
  }

  .skills-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    max-width: 500px;
  }

  .education-section-wrapper {
    flex-direction: column;
    max-width: 40vw;
    align-self: center;
  }

  .education-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .bio-container {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  #biography {
    max-width: 1050px;
    align-self: center;
    margin-bottom: 3rem; /* Reduced from 10em to create more natural flow */
  }



}

@media screen and (max-width: 1079px) {

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
  }  .content-section {
    /* border-radius: 0px; */
    width: 95vw;
    min-height: auto; /* Remove fixed height to prevent magnetism */
    padding: 2rem 1rem;
    margin: 1rem 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }

  .skills-section {
    margin-top: 2rem;
  }

  .columns-container {
    flex-direction: column;
    gap: 1rem;
  }

  .education-section-wrapper {
    margin-top: 2rem;
  }

  .education-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .education-card {
    max-width: 100%;
    width: 100%;
  }

  .bio-container {
    padding: 0rem;
  }

  .bio-container h2 {
    font-size: 2rem;
    margin: 0;
    padding: 0;
  }

  .bio-image {
    scale: 0.8;
  }

  .horizontal-layout {
    flex-direction: column;
    align-self: center;
    max-width: 90vw;
  }

}

/* End of Biography Section */

/* Portfolio Section */

.portfolio-section {
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0; /* Add margin for better section separation */
}

.portfolio-section h2 {
  color: #fff;
  margin-bottom: 2rem;
  font-size: 2.5rem;
      /* FiraSans */
    font-family: 'Fira Sans', sans-serif;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.horizontal-layout {
  display: flex;
  max-width: 85vw;
  align-self: center;
}
