* {
  margin: 0;
  padding: 0;
  font-family: "poppins", sans-serif;
  box-sizing: border-box;
}

/* Smooth scrolling for the entire document */
html {
  scroll-behavior: smooth;
  /* Prevent scroll issues on mobile with fixed elements */
  -webkit-overflow-scrolling: touch;
  height: 100%;
}

body {
  background: #000000; /* Change to new background color */
  color: #fff;
  position: relative;
  overflow-x: hidden;
  /* Ensure proper stacking context for fixed elements */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Styling for the header section */
#header {
  width: 100%;
  height: 100vh;
  background-image: url(images/moon-removebg.png);
  background-size: 50%; /* Adjust the percentage as needed */
  background-repeat: no-repeat;
  background-position: right; /* Right justify the background image */
  position: relative;
  z-index: 2;
}

/* Styling for the logo image */
.logo {
  width: 200px; /* Adjust the width as needed */
  height: auto; /* Maintain aspect ratio */
}

/* Container padding */
.container {
  padding: 10px 10%;
}

/* Navigation bar styling */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Navigation list items */
nav ul li {
  display: inline-block;
  list-style: none;
  margin: 10px 20px;
}

/* Navigation links */
nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  position: relative;
}

/* Underline effect for navigation links */
nav ul li a::after {
  content: "";
  width: 0%;
  height: 3px;
  background: #067f38; /* Change to new green color */
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: 0.5s;
}

/* Hover effect for navigation links */
nav ul li a:hover::after {
  width: 100%;
}

/* Header text styling */
.header-text {
  margin-top: 20%;
  font-size: 30px;
}

.header-text h1 {
  font-size: 60px;
  margin-top: 20px;
}

.header-text h1 span {
  color: #067f38; /* Change to new green color */
}
/* ------------------about------------------- */
#about {
  padding: 80px 0;
  color: #e0e0e0; /* Adjust text color for readability */
  position: relative;
  z-index: 2;
}

/* Flexbox layout for rows */
.row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* About section columns */
.about-col-1,
.about-col-2 {
  flex: 1;
  padding: 20px;
}

/* About section image container */
.about-col-1 {
  flex-basis: 35%;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 350px;
  height: 450px;
  border-radius: 15px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(6, 127, 56, 0.3);
}

/* About section images */
.about-col-1 img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  object-fit: cover;
  object-position: center;
  border-radius: 15px;
  transition: opacity 1s ease-in-out;
  animation: smoothSlideShow 50s infinite;
}

.about-col-1 img:nth-child(1) {
  animation-delay: 0s;
}
.about-col-1 img:nth-child(2) {
  animation-delay: 10s;
}
.about-col-1 img:nth-child(3) {
  animation-delay: 20s;
}
.about-col-1 img:nth-child(4) {
  animation-delay: 30s;
}
.about-col-1 img:nth-child(5) {
  animation-delay: 40s;
}

@keyframes smoothSlideShow {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  2% {
    opacity: 1;
    transform: scale(1);
  }
  18% {
    opacity: 1;
    transform: scale(1);
  }
  20% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
  }
}

.about-col-2 {
  flex-basis: 60%;
}

/* Subtitle styling */
.sub-title {
  font-size: 60px;
  font-weight: 600;
  color: #fff;
}

/* Tab titles styling */
.tab-titles {
  display: flex;
  margin: 20px 0 40px;
}

/* Tab links styling */
.tab-links {
  margin-right: 50px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

/* Underline effect for tab links */
.tab-links::after {
  content: "";
  width: 0;
  height: 3px;
  background: #067f38; /* Change to new green color */
  position: absolute;
  left: 0;
  bottom: -8px;
  transition: 0.5s;
}

/* Active tab link underline effect */
.tab-links.active-link::after {
  width: 50%;
}

/* Tab contents styling */
.tab-contents {
  display: none; /* Ensure the contents are displayed */
  margin-top: 20px; /* Add some space above the contents */
}

/* List styling inside tab contents */
.tab-contents ul {
  list-style: none; /* Remove default list styling */
  padding: 0; /* Remove default padding */
}

.tab-contents ul li {
  list-style: none;
  margin: 10px 0;
}

/* Span styling inside tab contents */
.tab-contents ul li span {
  color: #258225;
  font-size: 14px;
  font-weight: bold; /* Make the span text bold */
}

/* Active tab content display */
.tab-contents.active-tab {
  display: block;
}

/* RPG Character Sheet Styling */
.rpg-stats-container {
  background: linear-gradient(135deg, rgba(6, 127, 56, 0.1), rgba(0, 0, 0, 0.3));
  border: 2px solid #067f38;
  border-radius: 15px;
  padding: 30px;
  margin-top: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(6, 127, 56, 0.2);
}

.character-info {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(6, 127, 56, 0.3);
  padding-bottom: 20px;
}

.character-info h3 {
  color: #067f38;
  font-size: 24px;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(6, 127, 56, 0.5);
}

.character-class {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 5px 0;
}

.character-title {
  color: #ccc;
  font-size: 14px;
  font-style: italic;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.stat-category h4 {
  color: #067f38;
  font-size: 18px;
  margin-bottom: 15px;
  text-align: center;
  text-shadow: 0 0 5px rgba(6, 127, 56, 0.5);
  border-bottom: 1px solid rgba(6, 127, 56, 0.3);
  padding-bottom: 10px;
}

.stat-item {
  margin-bottom: 15px;
}

.stat-name {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.stat-bar {
  position: relative;
  background: linear-gradient(90deg, #067f38, #0a9d47);
  border: 1px solid rgba(6, 127, 56, 0.3);
  border-radius: 20px;
  height: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.stat-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
  z-index: 1;
}

.stat-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #067f38;
  border-radius: 0 19px 19px 0;
  width: 100%;
  transition: width 2s ease-in-out;
  z-index: 2;
}

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

.stat-value {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

/* Animation for stats on tab open */
.tab-contents.active-tab .stat-fill {
  animation: none;
}

/* ---------------Skills Section--------------- */
#skills {
  padding: 80px 0;
  color: #fff;
  background: #000000;
  position: relative;
  z-index: 2;
}

#skills .sub-title {
  font-size: 60px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin-bottom: 50px;
}

/* -------------portfolio---------------- */
#portfolio {
  padding: 80px 10%; /* Match the padding of the other sections */
  color: #fff; /* Ensure the text color matches */
  position: relative;
  z-index: 2;
}

#portfolio .sub-title {
  font-size: 60px;
  font-weight: 600;
  color: #fff;
  text-align: center; /* Center align the text */
}

/* Work list grid layout */
.work-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 40px;
  margin-top: 50px;
}

/* Individual work item styling */
.work {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
  transform: translateY(0);
  max-height: 500px;
}

/* Hidden work items */
.work.hidden {
  opacity: 0;
  transform: translateY(50px) scale(0.9);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Revealing animation for work items */
.work.revealing {
  animation: slideUpReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideUpReveal {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    max-height: 0;
  }
  50% {
    opacity: 0.5;
    transform: translateY(25px) scale(0.95);
    max-height: 250px;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 500px;
  }
}

/* Tech badges styling */
.tech-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.tech-badge {
  background: rgba(6, 127, 56, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  white-space: nowrap;
}

/* Hide badges on hover when layer overlay is visible */
.work:hover .tech-badges {
  opacity: 0;
}

/* Work item image styling */
.work img {
  width: 100%;
  border-radius: 10px;
  display: block;
  transition: transform 0.5s;
}

/* Layer overlay styling */
.layer {
  width: 100%;
  height: 0;
  background: linear-gradient(
    rgba(0, 0, 0, 0.6),
    #067f38
  ); /* Change to new green color */
  border-radius: 10px;
  position: absolute;
  left: 0;
  bottom: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  text-align: center;
  font-size: 14px;
  transition: height 0.5s;
}

/* Layer heading styling */
.layer h3 {
  font-weight: 500;
  margin-bottom: 20px;
}

/* Layer link styling */
.layer a {
  margin-top: 20px;
  color: #067f38; /* Change to new green color */
  text-decoration: none;
  font-size: 18px;
  line-height: 60px;
  background: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  text-align: center;
}

/* Hover effect for work item image */
.work:hover img {
  transform: scale(1.1);
}

/* Hover effect for layer overlay */
.work:hover .layer {
  height: 100%;
}

/* Button styling */
.btn {
  display: block;
  margin: 50px auto;
  width: fit-content;
  border: 1px solid #119015;
  padding: 14px 50px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover effect for button */
.btn:hover {
  background: #067f38; /* Change to new green color */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(6, 127, 56, 0.4);
}

/* Button click animation */
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(6, 127, 56, 0.3);
}

/* Button loading state for see more functionality */
.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* --------------------contact------------------- */
#contact {
  padding: 80px 10%;
  color: #fff;
  position: relative;
  z-index: 2;
}

/* Contact container layout */
.contact .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Contact left column styling */
.contact-left {
  flex-basis: 35%;
}

/* Contact right column styling */
.contact-right {
  flex-basis: 60%;
}

/* Contact left paragraph styling */
.contact-left p {
  margin-top: 30px;
}

/* Icon styling inside contact left paragraph */
.contact-left p i {
  color: #067f38; /* Change to new green color */
  margin-right: 15px;
  font-size: 25px;
}

/* Social icons styling */
.social-icons {
  margin-top: 30px;
}

/* Social icons link styling */
.social-icons a {
  text-decoration: none;
  font-size: 30px;
  margin-right: 15px;
  color: #ababab;
  display: inline-block;
  transition: transform 0.5s;
}

/* Hover effect for social icons */
.social-icons a:hover {
  color: #067f38; /* Change to new green color */
  transform: translateY(-5px);
}

/* Button styling for contact section */
.btn.btn2 {
  display: inline-block;
  background: #067f38; /* Change to new green color */
}

/* Contact form styling */
.contact-right form {
  width: 100%;
}

/* Input and textarea styling inside form */
form input,
form textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: #222222;
  padding: 15px;
  margin: 15px 0;
  color: #fff;
  font-size: 18px;
  border-radius: 6px;
}

/* Button styling inside form */
form btn2 {
  padding: 14px 60px;
  font-size: 18px;
  margin-top: 20px;
  cursor: pointer;
}

/* ------------------css for small screen ------------------- */
nav .fas {
  display: none;
}

/* Medium screens (tablets) */
@media only screen and (max-width: 900px) {
  .work-list {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px;
  }
}

@media only screen and (max-width: 600px) {
  #header {
    background-position: center; /* Center the background image on small screens */
    background-size: 80%; /* Increase the background image size on small screens */
  }

  .header-text {
    margin-top: 100%;
    font-size: 16px;
  }

  .header-text h1 {
    font-size: 30px;
  }

  nav .fas {
    display: block;
    font-size: 25px;
  }

  nav ul {
    background: #067f38; /* Change to new green color */
    position: fixed;
    top: 10px; /* Position at the very top of the screen */
    right: -220px; /* Start position off-screen */
    width: 200px; /* Fixed width to ensure proper coverage */
    height: auto; /* Auto height to fit content */
    padding: 50px 0 20px 0; /* Increase top padding to give X button more space */
    z-index: 9999;
    transition: right 0.5s, transform 0.5s; /* Transition both properties */
    border-radius: 15px 0 0 15px; /* Rounded corners on the left side */
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.3); /* Add shadow for depth */
    transform: translate3d(220px, 0, 0); /* Start hidden using transform */
    will-change: transform; /* Optimize for animations */
    -webkit-transform: translate3d(220px, 0, 0); /* Safari support */
    -webkit-backface-visibility: hidden; /* Safari optimization */
    backface-visibility: hidden; /* Prevent rendering issues */
  }
  nav ul li {
    display: block;
    margin: 8px 0; /* Reduce vertical margin between items */
  }

  nav ul li a {
    display: block;
    padding: 12px 25px; /* Reduce padding for navigation links */
    margin: 0;
    transition: background-color 0.3s ease;
  }

  nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Add hover effect */
    border-radius: 5px;
  }

  nav ul .fas {
    position: absolute;
    top: 8px; /* Adjust close button position */
    left: 12px;
    cursor: pointer;
    padding: 15px; /* Increase padding for larger touch target */
    font-size: 18px; /* Make the X icon larger */
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }

  nav ul .fas:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Add hover effect */
  }

  .sub-title {
    font-size: 40px;
  }

  .about-col-1,
  .about-col-2 {
    flex-basis: 100%;
  }

  .about-col-1 {
    margin-bottom: 30px;
    max-width: 280px;
    height: 350px;
  }

  .about-col-2 {
    font-size: 14px;
  }

  .tab-links {
    font-size: 16px;
    margin-right: 20px;
  }

  /* Mobile adjustments for RPG stats */
  .rpg-stats-container {
    padding: 20px 15px;
    margin: 15px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-category {
    width: 100%;
    overflow: hidden;
  }

  .stat-category h4 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .stat-item {
    margin-bottom: 12px;
    width: 100%;
  }

  .stat-name {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .stat-bar {
    width: 100%;
    height: 18px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stat-fill {
    max-width: 100%;
    box-sizing: border-box;
  }

  .stat-value {
    font-size: 11px;
    right: 8px;
  }

  .character-info h3 {
    font-size: 20px;
  }

  .character-class {
    font-size: 14px;
  }

  .character-title {
    font-size: 12px;
  }

  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }
  /* Adjust the font size for the portfolio item text */
  .work .layer p {
    font-size: 12px; /* Reduce the font size */
    padding: 10px; /* Adjust the padding */
  }

  /* Adjust the font size for the portfolio item headings */
  .work .layer h3 {
    font-size: 16px; /* Reduce the font size */
  }

  /* Adjust the font size for the portfolio item links */
  .work .layer a {
    font-size: 14px; /* Reduce the font size */
  }

  /* Adjust the grid layout for the work list */
  .work-list {
    grid-template-columns: 1fr; /* Make each work item take full width */
    grid-gap: 20px; /* Reduce the gap between work items */
  }

  /* Adjust the padding for the portfolio section */
  #portfolio {
    padding: 40px 5%; /* Reduce the padding */
  }

  /* Adjust the margin for the portfolio section title */
  #portfolio .sub-title {
    margin-bottom: 20px; /* Reduce the margin */
  }
}

/* Message display styling */
#msg {
  color: #067f38; /* Change to new green color */
  margin-top: -40px;
  display: none;
}

/* Confirmation Banner Styling */
.confirmation-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #067f38, #0a9d47);
  color: #fff;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(6, 127, 56, 0.3);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  visibility: hidden;
}

.confirmation-banner.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.confirmation-banner.error {
  background: linear-gradient(135deg, #d32f2f, #f44336);
  box-shadow: 0 -4px 20px rgba(211, 47, 47, 0.3);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.banner-content i.fas {
  font-size: 18px;
  margin-right: 12px;
  animation: bannerIconPulse 2s ease-in-out infinite;
}

.banner-content span {
  font-size: 16px;
  font-weight: 500;
  flex: 1;
  text-align: center;
}

.banner-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: absolute;
  right: 15px;
}

.banner-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.banner-close:active {
  transform: scale(0.95);
}

@keyframes bannerIconPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Mobile responsiveness for banner */
@media only screen and (max-width: 600px) {
  .banner-content {
    padding: 12px 15px;
  }
  
  .banner-content span {
    font-size: 14px;
  }
  
  .banner-content i.fas {
    font-size: 16px;
    margin-right: 10px;
  }
  
  .banner-close {
    right: 10px;
    width: 25px;
    height: 25px;
    font-size: 14px;
  }
}
