@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables for easier theme management */
:root {
  --color-background: #1a1a1a;
  --color-secondary: #2d2d2d;
  --color-text: #f5f5f5;
  --color-text-muted: #b3b3b3;
  --color-highlight: #fed700;
  --color-highlight-secondary: #3498db;
  --color-success: #2ecc71;
  --color-border: rgba(255, 255, 255, 0.1);
  --font-primary: 'Lexend', sans-serif;
  --font-secondary: 'Poppins', sans-serif;
  --transition-speed: 0.3s;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--color-background);
  color: var(--color-text);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

a {
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-speed);
}

a:hover,
a:focus {
  color: var(--color-highlight);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

section {
  padding: 5rem 0;
  position: relative;
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-highlight);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-title .underline {
  height: 4px;
  width: 50px;
  background: var(--color-highlight);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.section-title p {
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  transition: all var(--transition-speed) ease;
  border: 2px solid var(--color-border);
  background-color: var(--color-secondary);
  color: var(--color-text);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
  color: var(--color-text);
}

.btn.active {
  background-color: var(--color-highlight);
  color: var(--color-background);
  border-color: var(--color-highlight);
}

.view-more-container {
  text-align: center;
  margin-top: 2rem;
}

.btn.view-more {
  background-color: transparent;
  border: 2px solid var(--color-highlight);
  color: var(--color-highlight);
}

.btn.view-more:hover {
  background-color: var(--color-highlight);
  color: var(--color-background);
}

/* Header Styles */
.header-area {
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(26, 26, 26, 0.9);
  transition: all var(--transition-speed) ease;
}

.header-area.sticky {
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
  font-size: 1.625rem;
  font-weight: 700;
}

.logo .fa-bolt {
  color: var(--color-highlight);
  font-size: 1.25rem;
  position: absolute;
  top: 60%;
  left: 100%;
  transform: translate(-50%, -50%);
}

.signature {
  width: 50px;
  height: 50px;
  margin-right: 1rem;
  border-radius: 50%;
  overflow: hidden;
  transition: transform var(--transition-speed) ease-in-out;
}

.signature:hover {
  transform: scale(1.2);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar li a {
  position: relative;
  padding: 0.5rem 0;
  font-weight: 500;
  text-transform: capitalize;
}

.navbar li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-highlight);
  transition: width var(--transition-speed) ease;
}

.navbar li a:hover::after,
.navbar li a.active::after {
  width: 100%;
}

.search-container {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  position: relative;
}

#search-form {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 250px;
  transition: max-width 0.4s ease-in-out;
  overflow: hidden;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#search-form:hover {
  max-width: 300px;
}

#search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 50px 0 0 50px;
  outline: none;
  font-size: 0.9rem;
  background-color: transparent;
  color: var(--color-text);
  transition: all var(--transition-speed) ease-in-out;
}

#search-input:focus {
  box-shadow: 0 0 0 3px rgba(254, 215, 0, 0.2);
}

#search-form button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: var(--color-highlight);
  color: var(--color-background);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 0 50px 50px 0;
  transition: background-color var(--transition-speed) ease-in-out;
}

#search-form button:hover {
  background-color: #e6c200;
}

#search-recommendations {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--color-secondary);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--box-shadow);
  z-index: 10;
  display: none;
}

.menu_icon {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
}

/* Home Section */
.FirstElement {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 8rem;
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 10px solid var(--color-secondary);
  box-shadow: var(--box-shadow);
  position: relative;
  z-index: 1;
}

.profile-photo::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--color-highlight), transparent);
  z-index: -1;
  opacity: 0.6;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.profile-photo img:hover {
  transform: scale(1.1);
}

.profile-text {
  max-width: 600px;
  display: flex;
  flex-direction: column;
}

.profile-text h5 {
  color: var(--color-text);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.profile-text h1 {
  color: var(--color-highlight);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-family: var(--font-secondary);
}

.profile-text p {
  color: var(--color-text);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: justify;
}

.btn-group {
  margin-bottom: 2rem;
}

.btn-group .btn {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.social {
  display: flex;
  gap: 1.5rem;
}

.social a {
  position: relative;
  text-decoration: none;
}

.social i {
  color: var(--color-text);
  font-size: 2rem;
  transition: color var(--transition-speed) ease, transform 0.5s ease;
  will-change: transform;
}

.social i:hover {
  color: var(--color-highlight);
  transform: rotate(360deg);
}

.social a::after {
  content: attr(title);
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-highlight);
  color: var(--color-background);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed), transform var(--transition-speed);
  white-space: nowrap;
  z-index: 10;
}

.social a:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* Animated Background */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.animated-bg span {
  position: absolute;
  display: block;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.05);
  animation: move 25s linear infinite;
  bottom: -150px;
}

.animated-bg span:nth-child(1) {
  left: 25%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
}

.animated-bg span:nth-child(2) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 12s;
}

.animated-bg span:nth-child(3) {
  left: 70%;
  width: 20px;
  height: 20px;
  animation-delay: 4s;
}

.animated-bg span:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 0s;
  animation-duration: 18s;
}

.animated-bg span:nth-child(5) {
  left: 65%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
}

.animated-bg span:nth-child(6) {
  left: 75%;
  width: 110px;
  height: 110px;
  animation-delay: 3s;
}

@keyframes move {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
    border-radius: 0;
  }
  100% {
    transform: translateY(-1000px) rotate(720deg);
    opacity: 0;
    border-radius: 50%;
  }
}

/* About Section */
.about-area {
  background-color: var(--color-background);
  position: relative;
}

.about {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  align-items: flex-start;
}

.about-content {
  flex: 1;
}

.about-content ul {
  color: var(--color-text);
  padding-left: 1.5rem;
}

.about-content ul li {
  list-style-type: disc;
  margin-bottom: 1rem;
  line-height: 1.6;
  text-align: justify;
}

.about-skills {
  flex: 1;
  background-color: var(--color-secondary);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
}

.about-skills ul li {
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1.1rem;
  justify-content: space-between;
}

.about-skills ul li span:first-child {
  font-weight: 600;
  color: var(--color-highlight);
}

/* Education & Skills Section */
.education-content .row {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.education-content .title {
  color: var(--color-highlight);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.education-content .row .education,
.education-content .row .internship {
  flex: 1;
  color: var(--color-text);
}

.education-content .row .timeline-box {
  flex: 1;
  max-width: 100%;
}

.education-content .row .timeline {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  width: 100%;
  position: relative;
  background-color: var(--color-secondary);
  box-shadow: var(--box-shadow);
}

.education-content .row .timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.education-content .row .timeline-item:last-child {
  padding-bottom: 0;
}

.education-content .row .timeline-item::before {
  content: "";
  width: 1px;
  position: absolute;
  height: 100%;
  left: 7px;
  top: 0;
  background-color: var(--color-highlight);
}

.education-content .row .circle-dot {
  position: absolute;
  left: 0;
  top: 0;
  height: 15px;
  width: 15px;
  border-radius: 50%;
  background-color: var(--color-highlight);
}

.education-content .row .timeline-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.education-content .row .timeline-title i {
  margin-right: 0.5rem;
  color: var(--color-highlight);
}

.education-content .row .timeline-text {
  line-height: 2;
  font-size: 1rem;
}

.education-content .row .timeline-text li {
  margin-bottom: 1.1rem;
  position: relative;
  padding-left: 1.5rem;
}

.education-content .row .timeline-text li::before {
  content: "🎯";
  color: var(--color-highlight);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1rem;
}

/* Projects Section */
.project-content {
  background-color: var(--color-background);
  position: relative;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-link {
  display: block;
  height: 100%;
  transition: transform var(--transition-speed) ease;
}

.project-link:hover {
  transform: translateY(-10px);
}

.project {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--color-secondary);
  border-radius: 12px;
  overflow: hidden;
  padding: 2rem;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--color-border);
}

.project:hover {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--color-highlight);
}

.project-icon {
  margin: -1rem auto 1.5rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-highlight);
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(254, 215, 0, 0.3);
}

.project-icon i {
  color: var(--color-background);
  font-size: 1.5rem;
}

.project h4 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--color-highlight);
}

.project p {
  color: var(--color-text);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  text-align: justify;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.project-tech span {
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.8rem;
  transition: background var(--transition-speed) ease;
}

.project:hover .project-tech span {
  background: rgba(254, 215, 0, 0.1);
}

/* Publications Section */
.publication-content {
  background-color: var(--color-background);
  padding: 5rem 0;
}

.publications {
  max-width: 800px;
  margin: 0 auto;
}

.publication-item {
  background-color: var(--color-secondary);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
}

.publication-icon {
  background-color: var(--color-highlight);
  color: var(--color-background);
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem; 
}
.publication-icon i {
  position: relative;
  top: 1px; 
}

.publication-details h3 {
  color: var(--color-highlight);
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.publication-meta div {
  margin-bottom: 0.8rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.publication-abstract {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.publication-abstract h4 {
  color: var(--color-highlight);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.publication-abstract p {
  color: var(--color-text);
  line-height: 1.6;
  text-align: justify;
}

.publication-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.publication-links .btn {
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .publication-item {
      padding: 1.5rem;
  }
  
  .publication-details h3 {
      font-size: 1.2rem;
  }
}

/* Video Section */
.video-section {
  background-color: var(--color-background);
  padding: 5rem 0;
  text-align: center;
}

.video-wrapper {
  max-width: 800px;
  margin: 0 auto 3rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.video-item {
  background-color: var(--color-secondary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed) ease;
}

.video-item:hover {
  transform: translateY(-10px);
}

.video-item video {
  width: 100%;
  height: auto;
  display: block;
}

.video-item h4 {
  padding: 1rem;
  font-size: 1.1rem;
  color: var(--color-highlight);
}

/* Achievements Section */
.achievements-section {
  background-color: var(--color-background);
  padding: 5rem 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.achievement-link {
  display: block;
  height: 100%;
  transition: transform var(--transition-speed) ease;
}

.achievement-link:hover {
  transform: translateY(-10px);
}

.achievement-card {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #2d2d2d, #252525);
  box-shadow: var(--box-shadow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.achievement-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.image-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-wrapper:hover img {
  transform: scale(1.1);
}

.achievement-card .card-body {
  padding: 1.5rem;
}

.achievement-card .card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-highlight);
  text-align: center;
}

.achievement-card .card-text {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
}

/* Address Section */
.address-section {
  background-color: var(--color-background);
  padding: 5rem 0;
}

.map-container {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  height: 450px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Contact Section */
.contact-content {
  padding: 5rem 0;
  background-color: var(--color-background);
}

.contact {
  max-width: 700px;
  margin: 0 auto;
}

.contact form {
  display: grid;
  gap: 1.5rem;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  transition: all var(--transition-speed) ease;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(254, 215, 0, 0.2);
}

.contact textarea {
  min-height: 150px;
  resize: vertical;
}

.contact .submit {
  background: var(--color-highlight);
  color: var(--color-background);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: none;
  width: auto;
  justify-self: center;
  font-size: 1rem;
}

.contact .submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(254, 215, 0, 0.3);
}

#msg {
  color: var(--color-text);
  font-size: 1rem;
  margin-top: 1rem;
  display: block;
  text-align: center;
}

/* Footer */
.footer {
  background-color: var(--color-secondary);
  padding: 4rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.footer-logo h3 {
  font-size: 1.5rem;
  color: var(--color-highlight);
}

.footer-links h4,
.footer-social h4 {
  color: var(--color-highlight);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links ul li a {
  color: var(--color-text);
  transition: color var(--transition-speed) ease;
}

.footer-links ul li a:hover {
  color: var(--color-highlight);
  padding-left: 5px;
}

.footer-social .social-icons {
  display: flex;
  gap: 1.5rem;
}

.footer-social .social-icons a {
  color: var(--color-text);
  font-size: 1.5rem;
  transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.footer-social .social-icons a:hover {
  color: var(--color-highlight);
  transform: translateY(-5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Loader and Animation Styles */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--color-background), var(--color-secondary));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-logo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--color-highlight);
  box-shadow: 
      0 0 0 15px rgba(254, 215, 0, 0.2),
      0 0 30px rgba(254, 215, 0, 0.4),
      0 10px 20px rgba(0,0,0,0.3);
  animation: 
      logo-pulse 2s infinite alternate,
      logo-rotate 5s linear infinite;
  transform-origin: center;
  position: relative;
  z-index: 10;
}

.loader-text {
  color: var(--color-highlight);
  margin-top: 25px;
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: text-fade 1.5s infinite alternate;
  text-shadow: 0 0 10px rgba(254, 215, 0, 0.5);
  overflow: hidden;
  white-space: nowrap;
  border-right: .15em solid var(--color-highlight);
  animation: typing 3.5s steps(30, end) infinite;
}

.progress-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 10000;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-highlight), #ff9d00);
  transition: width 0.3s ease-out;
  box-shadow: 0 0 10px rgba(254, 215, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: pulse 1.5s infinite;
}

.progress-percentage {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--color-highlight);
  font-size: 14px;
  font-weight: bold;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.progress-container.complete {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.content-reveal {
  position: relative;
  overflow: hidden;
}

.content-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  transform: translateY(0);
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 5;
}

.content-reveal.loaded::before {
  transform: translateY(100%);
}

 /* Chatbot container styling */
 .chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

/* Circular chat icon */
.chat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--color-highlight); /* Changed to yellow highlight variable */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(254, 215, 0, 0.3); /* Updated shadow color */
  transition: transform 0.3s ease;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.chat-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(254, 215, 0, 0.4); /* Enhanced shadow on hover */
}

.chat-icon img {
  width: 60%;
  height: auto;
  filter: brightness(0) invert(0.2); /* Make icon darker to be visible on yellow */
}

/* Message bubble styling with arrow */
.chat-message-container {
  position: relative;
  margin-right: 15px;
  display: none;
}

.chat-message {
  background-color: var(--color-highlight); /* Changed to yellow highlight */
  color: var(--color-background); /* Dark text for better contrast on yellow */
  padding: 12px 15px;
  border-radius: 20px 20px 20px 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 280px; /* Increased from 220px to hold more text */
  animation: fadeIn 0.5s;
  font-size: 14px;
  position: relative;
  font-weight: 500;
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words if needed */
  line-height: 1.4; /* Add more space between lines */
}

/* Speech bubble arrow */
.chat-message::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 10px solid var(--color-highlight); /* Match bubble color */
  border-right: 0 solid transparent;
  border-top: 10px solid transparent;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Add a pulsing animation to attract attention */
@keyframes pulse-chat {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.chat-icon:not(:hover) {
  animation: pulse-chat 2s infinite;
}

/* Input field for user message */
.chat-input-container {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 280px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1000;
}

.chat-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  box-sizing: border-box;
}

.chat-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.chat-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.send-button {
  background-color: var(--color-highlight);
  color: var(--color-background);
}

.cancel-button {
  background-color: #f1f1f1;
  color: #333;
}

/* Animation Keyframes */
@keyframes pulse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes logo-pulse {
  0% { 
      transform: scale(0.95); 
      box-shadow: 
          0 0 0 15px rgba(254, 215, 0, 0.2),
          0 0 30px rgba(254, 215, 0, 0.4),
          0 10px 20px rgba(0,0,0,0.3);
  }
  100% { 
      transform: scale(1.05); 
      box-shadow: 
          0 0 0 20px rgba(254, 215, 0, 0.3),
          0 0 40px rgba(254, 215, 0, 0.5),
          0 15px 25px rgba(0,0,0,0.4);
  }
}

@keyframes logo-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes typing {
  0% { width: 0 }
  50% { width: 100% }
  100% { width: 0 }
}

@keyframes text-fade {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-highlight);
  color: var(--color-background);
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid var(--color-highlight);
  outline-offset: 3px;
}

/* Media Queries */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
  
  .profile-text h1 {
    font-size: 3rem;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }
  
  .profile-text h1 {
    font-size: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 2.2rem;
  }
  
  .about {
    flex-direction: column;
    gap: 2rem;
  }
  
  .education-content .row {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 540px;
  }
  
  section {
    padding: 4rem 0;
  }
  
  .FirstElement {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }
  
  .profile-photo {
    margin-bottom: 2rem;
  }
  
  .profile-text {
    align-items: center;
  }
  
  .social {
    justify-content: center;
  }
  
  .header .navbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .header .navbar.show {
    left: 0;
  }
  
  .header .menu_icon {
    display: block;
  }
  
  .search-container {
    margin-left: auto;
  }
  
  #search-form {
    max-width: 200px;
  }
}

/* Media Queries */
@media (max-width: 576px) {
  .container {
    padding: 0 1.5rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .profile-text h1 {
    font-size: 2rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .profile-photo {
    width: 250px;
    height: 250px;
  }
  
  .projects {
    grid-template-columns: 1fr;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social .social-icons {
    justify-content: center;
  }
}

/* Prevent horizontal scrolling and zooming on mobile */
@media screen and (max-width: 500px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
  }
  
  body {
    min-width: 300px;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  input, textarea, select, button {
    font-size: 16px; /* Prevent auto-zoom on input focus */
  }
}

/* Game Zone Section */
.game-zone-section {
    background-color: var(--color-background);
    padding: 5rem 0;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: var(--color-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--color-highlight);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.game-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.1);
}

.game-content {
    padding: 1.5rem;
}

.game-content h3 {
    color: var(--color-highlight);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.game-content p {
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: justify;
}

.game-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.game-buttons .play-btn,
.game-buttons .install-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.game-buttons .play-btn {
    background-color: var(--color-highlight);
    color: var(--color-background);
}

.game-buttons .install-btn {
    background-color: var(--color-secondary);
    border: 2px solid var(--color-highlight);
    color: var(--color-highlight);
}

.game-buttons .play-btn:hover,
.game-buttons .install-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(254, 215, 0, 0.3);
}

.game-buttons .install-btn:hover {
    background-color: var(--color-highlight);
    color: var(--color-background);
}

@media (max-width: 576px) {
    .game-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .game-buttons .play-btn,
    .game-buttons .install-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Language Proficiency Section */
.language-proficiency-section {
    background-color: var(--color-background);
    padding: 5rem 0;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.language-card {
    background: var(--color-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--color-highlight);
}

.language-card.active {
    border-color: var(--color-highlight);
}

.language-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-highlight);
}

.language-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.language-icon {
    width: 40px;
    height: 40px;
    background-color: var(--color-highlight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1rem;
    color: var(--color-background);
    transition: all 0.3s ease;
}

.language-card:hover .language-icon {
    transform: rotate(360deg);
}

.language-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.language-level {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.language-card .progress-container {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
}

.language-card .progress-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--color-highlight);
    width: 0;
    transition: width 1s ease-in-out;
    position: relative;
}

.language-card .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.language-details {
    margin-top: 1.5rem;
}

.detail-list {
    list-style: none;
    padding: 0;
}

.detail-list li {
    color: var(--color-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.detail-list li::before {
    content: "•";
    color: var(--color-highlight);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Add ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(254, 215, 0, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .language-grid {
        grid-template-columns: 1fr;
    }
    
    .language-card {
        padding: 1.2rem;
    }
    
    .language-name {
        font-size: 1.1rem;
    }
}

/* Dropdown Menu Styles */
.navbar .dropdown {
    position: relative;
}

.navbar .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .dropdown-toggle i {
    transition: transform 0.3s ease;
}

.navbar .dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.navbar .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background-color: var(--color-secondary);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform-origin: top;
    transform: translateX(-50%) scaleY(0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.navbar .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scaleY(1);
}

.navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: var(--color-secondary);
}

.navbar .dropdown-menu li {
    padding: 0;
}

.navbar .dropdown-menu a {
    padding: 0.8rem 1.5rem;
    display: block;
    color: var(--color-text);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar .dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--color-highlight);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.navbar .dropdown-menu a:hover {
    background-color: rgba(254, 215, 0, 0.1);
    padding-left: 2rem;
}

.navbar .dropdown-menu a:hover::before {
    transform: scaleY(1);
}

/* Mobile Responsive Dropdown */
@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: static;
        transform: none;
        background-color: rgba(255, 255, 255, 0.05);
        box-shadow: none;
        border-radius: 0;
        padding-left: 1rem;
        margin-top: 0.5rem;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .navbar .dropdown:hover .dropdown-menu {
        transform: none;
        display: block;
    }

    .navbar .dropdown-menu::before {
        display: none;
    }

    .navbar .dropdown-menu a {
        padding: 0.8rem 1rem;
    }

    .navbar .dropdown-menu a:hover {
        padding-left: 1.5rem;
    }

    .navbar .dropdown-toggle {
        justify-content: space-between;
    }
}
