/* Enhanced style.css with improved aesthetics and scrolling fixes */
body {
  background-color: #0a0a0a;
  color: #f5f5f5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  position: relative;
  line-height: 1.6;
  overflow-x: hidden;
  /* Allow vertical scrolling */
  overflow-y: auto;
}

/* Video background handling */
body.body-with-videoindex {
  /* Change from fixed height to minimum height to allow scrolling */
  min-height: 100vh;
  /* Allow vertical scrolling */
  overflow-y: auto;
}

.background-videoindex {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
}

/* Animation for GIF backgrounds */
@keyframes gifLoop {
  0% { background-position: 0 0; }
  100% { background-position: 100% 0; }
}

/* Header styling */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  color: #fff;
  flex-wrap: wrap;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-left {
  display: flex;
  align-items: center;
}

.logo-name {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.logo {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 15px rgba(24, 210, 110, 0.7);
  border-color: #18d26e;
}

.company-name {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.logo-name:hover .company-name {
  color: #18d26e;
}

/* Navigation */
.nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-link {
  margin: 0 15px;
  padding: 8px 0;
  text-decoration: none;
  color: #ddd;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  color: #18d26e;
}

.nav-link.current {
  color: #18d26e;
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #18d26e;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.current::after {
  width: 100%;
}

/* Main content */
.main {
  padding: 4rem 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 200px);
  position: relative;
}

.main-content {
  padding: 3rem 5%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  background-color: rgba(10, 10, 10, 0.7);
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 20px;
  line-height: 1.3;
}

h1 {
  font-size: 2.8rem;
  color: #fff;
  font-weight: 700;
  margin-top: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
  font-size: 2.2rem;
  color: #18d26e;
  font-weight: 600;
}

h3 {
  font-size: 1.8rem;
  color: #eee;
  font-weight: 600;
}

h4 {
  font-size: 1.4rem;
  color: #ccc;
  font-weight: 500;
}

p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

a {
  color: #18d26e;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #24f18d;
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Sections */
.section {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section:last-child {
  border-bottom: none;
}

/* Social links */
.social-links {
  list-style: none;
  padding: 0;
  margin: 30px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 20px;
  font-size: 24px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(24, 210, 110, 0.1);
}

.social-links a:hover {
  color: #18d26e;
  transform: translateY(-5px);
  background-color: rgba(24, 210, 110, 0.2);
  box-shadow: 0 5px 15px rgba(24, 210, 110, 0.3);
}

.social-links i {
  font-size: 24px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 5%;
  background-color: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.copyright {
  font-size: 0.9rem;
  color: #888;
  margin-top: 20px;
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 2rem;
}

.book-item {
  text-align: center;
  padding: 20px;
  transition: all 0.3s ease;
  background-color: rgba(20, 20, 20, 0.7);
  border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.book-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(24, 210, 110, 0.3);
}

.book-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.book-item:hover img {
  transform: scale(1.05);
}

.book-item a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.book-item h3 {
  margin-top: 10px;
  font-size: 1.2rem;
  color: #18d26e;
  transition: color 0.3s ease;
}

.book-item:hover h3 {
  color: #24f18d;
}

.book-item p {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: auto;
  padding-top: 10px;
}

/* Resume container */
.resume-container {
  width: 100%;
  border: 1px solid #333;
  background-color: #1a1a1a;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.download-link {
  margin-bottom: 25px;
  text-align: center;
}

.download-link a {
  display: inline-block;
  padding: 12px 25px;
  background-color: #18d26e;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(24, 210, 110, 0.3);
}

.download-link a:hover {
  background-color: #15b05b;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(24, 210, 110, 0.4);
}

/* Chatbot styling */
df-messenger {
  --df-messenger-bot-message: #1a1a1a;
  --df-messenger-button-titlebar-color: #18d26e;
  --df-messenger-button-titlebar-font-color: #FFFFFF;
  --df-messenger-chat-background-color: rgba(10, 10, 10, 0.9);
  --df-messenger-font-color: #FFFFFF;
  --df-messenger-input-box-color: #2a2a2a;
  --df-messenger-input-font-color: #FFFFFF;
  --df-messenger-input-placeholder-font-color: #aaaaaa;
  --df-messenger-minimized-chat-close-icon-color: #FFFFFF;
  --df-messenger-send-icon: #18d26e;
  --df-messenger-user-message: #18d26e;
  z-index: 1000 !important;
  position: fixed;
  bottom: 20px;
  right: 20px;
}

/* Container for profiles */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background-color: rgba(10, 10, 10, 0.8);
  padding: 40px 20px;
  border-radius: 10px;
  margin: 40px auto;
  max-width: 800px;
}

.title {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 40px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.button-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.option-button {
  padding: 15px 30px;
  font-size: 1.2rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.option-button.red {
  background-color: #e74c3c;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.option-button.blue {
  background-color: #3498db;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.option-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.option-button.red:hover {
  background-color: #c0392b;
}

.option-button.blue:hover {
  background-color: #2980b9;
}

/* Blog page styling */
.blog-page {
  background-color: #0a0a0a;
  position: relative;
}

.blog-page::before {
  content: '';
  background-image: url('media/ocean-bg.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  z-index: -1;
  animation: slowly-move 60s linear infinite;
}

@keyframes slowly-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Project details */
.project-details {
  background-color: rgba(20, 20, 20, 0.7);
  border-radius: 8px;
  padding: 25px;
  margin-top: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-details img {
  max-width: 100%;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 404 page */
.error-container {
  background-color: rgba(20, 20, 20, 0.8);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 50px;
  margin: 100px auto;
  max-width: 600px;
  text-align: center;
}

.error-container h1 {
  font-size: 4rem;
  color: #e74c3c;
  margin-bottom: 20px;
}

.error-container p {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 25px;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Skill badge styling */
.skill-badge {
  display: inline-block;
  padding: 6px 12px;
  background-color: rgba(24, 210, 110, 0.2);
  color: #18d26e;
  border-radius: 20px;
  margin: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(24, 210, 110, 0.3);
}

.skill-badge:hover {
  background-color: rgba(24, 210, 110, 0.3);
  transform: translateY(-3px);
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 40px auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: #18d26e;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  animation: fadeIn 0.5s ease forwards;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: #18d26e;
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(even)::after {
  left: -10px;
}

.timeline-content {
  padding: 20px;
  background-color: rgba(20, 20, 20, 0.8);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Styling */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: #18d26e;
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 0.8;
  transform: translateY(0);
}

.back-to-top:hover {
  opacity: 1;
  background-color: #15b05b;
}

/* Filter buttons for book categories */
.filter-btn {
  padding: 8px 16px;
  background-color: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background-color: rgba(24, 210, 110, 0.2);
  color: #fff;
}

.filter-btn.active {
  background-color: #18d26e;
  color: #000;
  font-weight: 600;
}

/* Certificate styling */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 2rem;
}

.certificate-item {
  background-color: rgba(20, 20, 20, 0.7);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.certificate-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(24, 210, 110, 0.3);
}

.certificate-item h3 {
  color: #18d26e;
  margin-top: 0;
  font-size: 1.3rem;
}

.certificate-item p {
  margin-bottom: 10px;
}

.view-certificate:hover {
  color: #fff;
  text-decoration: none;
}

/* About page */
.about-page {
  background-color: #0a0a0a;
  position: relative;
}

.about-page::before {
  content: '';
  background-image: url('media/coral-bg.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  z-index: -1;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .header {
    padding: 15px 4%;
  }
  
  .main, .main-content {
    padding: 2.5rem 4%;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item::after {
    left: 21px;
  }
  
  .timeline-item:nth-child(even) {
    left: 0;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
    padding: 15px 3%;
  }
  
  .logo-name {
    margin-bottom: 15px;
    justify-content: center;
  }
  
  .nav {
    justify-content: center;
    margin-top: 15px;
    width: 100%;
  }
  
  .nav-link {
    margin: 5px 10px;
    font-size: 0.9rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px 0;
    z-index: 1000;
    text-align: center;
  }
  
  .nav.show {
    display: flex;
  }
  
  .main, .main-content {
    padding: 2rem 3%;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
  
  .social-links a {
    margin: 0 10px;
    width: 40px;
    height: 40px;
  }
  
  .social-links i {
    font-size: 20px;
  }
  
  .option-button {
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  .back-to-top {
    width: 35px;
    height: 35px;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 3%;
  }
  
  .logo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
  }
  
  .company-name {
    font-size: 1.3rem;
  }
  
  .main, .main-content {
    padding: 1.5rem 3%;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .book-grid {
    grid-template-columns: 1fr;
  }
  
  .button-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .option-button {
    width: 100%;
    text-align: center;
  }
  
  .error-container {
    padding: 30px 15px;
  }
  
  .error-container h1 {
    font-size: 3rem;
  }
}
