/* Global box-sizing fix for layout issues */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Background color */
body {
  margin: 0;
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  background: #181a20;
  color: #f5f6fa;
}

/* Main style */
main {
  margin-left: 220px;
  padding: 0;
}

/* Sections */
section {
  padding: 80px 8% 80px 8%;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Adjusting for texts */
h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #ffb347;
  font-weight: 700;
}

/* Footer style */
footer {
  background: #23263a;
  color: #b2becd;
  text-align: center;
  padding: 20px 0;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Remove underline from all links */
a, a:visited, a:hover, a:active {
  text-decoration: none !important;
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 220px;
  height: 100vh;
  background: #23263a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  z-index: 100;
}
.logo {
  font-size: 2rem;
  font-weight: 700;
  color: #f5f6fa;
  margin-bottom: 40px;
  letter-spacing: 2px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}
.sidebar ul li {
  width: 100%;
}
.sidebar ul li a {
  display: block;
  padding: 18px 0 18px 40px;
  color: #b2becd;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar ul li a.active,
.sidebar ul li a:hover {
  background: #353866;
  color: #fff;
}

/* Hero Section */
.hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
  text-align: left !important;
  min-height: 100vh;
  padding: 60px 8% 40px 8%;
  background: linear-gradient(120deg, #23263a 60%, #353866 100%);
}
.hero-content {
  flex: 1;
  max-width: 520px;
}
.hero-img {
  flex: 0 0 auto;
  margin-left: 40px;
  order: 2 !important;
}
.hero h1 {
  font-size: 2.8rem;
  margin: 0 0 24px 0;
  color: #fff;
  line-height: 1.2;
}
.hero h1 span {
  color: #ffb347;
}
.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 32px;
  color: #b2becd;
}

/* BTN Return Section */
.return-section {
  margin-top: 30px;
  text-align: center;
  animation: fadeInUp 0.8s ease 0.3s both;
}
.btn-return {
  background: #181a20;
  color: #b2becd;
  border: 2px solid #23263a;
  padding: 12px 25px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Montserrat', Arial, sans-serif;
  box-shadow: 0 0 20px rgba(96, 186, 219, 0.3), 0 8px 32px rgba(0,0,0,0.4);
}
.btn-return:hover {
  background: #353866;
  color: #e1e5e9;
  border-color: #4299e1;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(124, 206, 244, 0.879), 0 8px 32px rgba(0,0,0,0.4);
}

/* Bring the text closer to the top in the main sections */
.about, .achievements, .projects, .portfolio {
  padding-top: 20px !important;
}

/* About Section */
.about {
  min-height: 100vh;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.about p {
  font-size: 1.1rem;
  color: #b2becd;
}
.about-flex {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.about-tex {
  flex: 1 1 300px;
  min-width: 220px;
}
.about-img {
  flex: 0 0 180px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Enhanced achievement cards with golden border effect - matching HTML5 section */
.achievements {
  min-height: 90vh;
  background: transparent;
  position: relative;
}
.achievement-card {
  transition: all 0.3s ease !important;
  border: 2px solid transparent !important;
}
.achievement-card:hover {
  border-color: #ffb347 !important;
  transform: translateY(-10px) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255, 179, 71, 0.3) !important;
}
.achievement-card h3 {
  transition: color 0.3s ease !important;
}
.achievement-card:hover h3 {
  color: #ffb347 !important;
}
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Projects container styles */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.project-card {
  background: #181a20;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(34,34,59,0.10);
  width: 320px;
  padding: 0 0 18px 0;
  text-align: center;
  overflow: hidden;
  transition: all 0.3s ease !important;
  border: 2px solid transparent !important;
}
.project-card:hover {
  border-color: #ffb347 !important;
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 30px rgba(255, 179, 71, 0.15) !important;
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
  margin-bottom: 0;
}
.project-info {
  padding: 18px;
}
.project-card h3 {
  margin: 0 0 8px 0;
  color: #ffb347;
  font-size: 1.2rem;
  text-align: center;
}
.project-card p {
  color: #b2becd;
  font-size: 1rem;
}

/* Portfolio container styles */
.portfolio {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  background: transparent;
  position: relative;
}
.portfolio-container {
  position: relative;
  display: inline-block;
}
.portfolio-container img {
  transition: all 0.3s ease;
  border: 8px solid #1a1a2e !important;
  box-shadow: 0 0 20px rgba(55, 118, 171, 0.3), 0 8px 32px rgba(0,0,0,0.4) !important;
}
.portfolio-label {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 179, 71, 0.1);
  border: 1px solid #ffb347;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #ffb347;
  font-weight: 500;
  white-space: nowrap;
}
/* Enhanced iframe hover effect with golden border - matching HTML5 section */
.portfolio-container iframe:hover {
  border-color: #ffb347 !important;
  box-shadow: 0 0 25px rgba(255, 179, 71, 0.4), 0 10px 40px rgba(0,0,0,0.5) !important;
  transform: scale(1.02) !important;
}
/* Enhanced img hover effect with golden border - for Python TaskApp image */
.portfolio-container img:hover {
  border-color: #ffb347 !important;
  box-shadow: 0 0 25px rgba(255, 179, 71, 0.4), 0 10px 40px rgba(0,0,0,0.5) !important;
  transform: scale(1.02) !important;
}

/* Reveal styles */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-title {
  opacity: 0.2;
  font-weight: 400;
  text-align: center;
  filter: blur(2px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), filter 0.7s, font-weight 0.7s;
}
.reveal-title.active {
  opacity: 1;
  font-weight: 700;
  filter: blur(0);
}

/* Mobile Menu Icon */
.mobile-menu-icon {
  display: none;
  position: fixed;
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1100;
}
.mobile-menu-icon span {
  display: block;
  width: 32px;
  height: 4px;
  margin: 5px 0;
  background: #b2becd;
  border-radius: 2px;
  transition: 0.3s;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(35, 38, 58, 0.98);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.mobile-menu ul {
  list-style: none;
  padding: 32px 0 0 0;
  margin: 0;
  width: 100%;
}
.mobile-menu ul li {
  margin: 0;
  width: 100%;
}
.mobile-menu ul li a {
  display: block;
  color: #b2becd;
  font-size: 1.1rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 18px 0 18px 40px;
  transition: background 0.2s;
}
.mobile-menu ul li a:hover {
  background: rgba(255, 179, 71, 0.1);
  color: #fff;
}
.mobile-menu ul li a.active {
  background: rgba(255, 179, 71, 0.18);
  color: #ffb347;
}
.mobile-menu.active {
  display: flex;
  transform: translateX(0);
}

/* Responsive Design */
/* Responsive Design */
/* Extra large screens, laptops and desktops */
@media (min-width: 1400px) {
  .about-flex {
    max-width: 900px;
    margin: 0 auto;
    justify-content: center;
  }
  .about p {
    max-width: 700px;
    margin: 0 auto;
    text-align: Left;
  }
  .portfolio-container iframe {
  height: 420px !important;
  max-width: 900px !important;
  min-width: 500px;
  border-radius: 28px !important;
  }
}

/* Large screens and desktops */
@media (max-width: 1200px) {
  /* Section style */
  section {
    padding: 70px 6% 70px 6%;
  }

  /* Heros styles */
  .hero {
    padding: 60px 6% 40px 6%;
    min-height: 90vh;
  }
  .hero-content {
    max-width: 480px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  
  /* .portfolio .projects styles */
  .portfolio .projects {
    max-width: 1000px;
  }
}

/* Responsive: Show mobile menu on screens - Tablets*/
@media (max-width: 900px) {
  /* Fix main content margin */
  main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Section style */
  section {
    padding: 50px 6% 50px 6%;
    min-height: 50vh;
  }

  /* Adjusting for texts */
  h2 {
    font-size: 1.8rem !important;
  }

  /* Footer responsiveness */
  footer {
    padding: 25px 0;
  }

  /* Mobile Menu Icon */
  .mobile-menu-icon {
    display: flex;
  }
  .mobile-menu {
    display: none;
  }
  .mobile-menu.active {
    display: flex;
  }
  
  /* Mobile adjustments for effects menu */
  .effects-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  .effects-menu {
    top: 15px;
    right: 15px;
    min-width: 180px;
    padding: 12px;
  }
  .effects-menu h4 {
    font-size: 13px;
  }
  .effect-option {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  /* Heros styles */
  .hero {
    flex-direction: column !important;
    text-align: center !important;
    padding: 30px 4% 20px 4%;
    padding-top: 50px;
    min-height: 90vh;
  }
  .hero-img {
    margin: 20px 0 0 0 !important;
    order: -1 !important;
  }
  .hero-img img {
    width: 280px !important;
    height: 200px !important;
  }
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  /* Reveal style */
  .reveal-title {
    text-align: center !important;
  }

  /* Bring the text closer to the top in the main sections */
  .about, .projects, .portfolio {
    padding-top: 20px !important;
  }

  /* No sidebar due to hamburger icon */
  .sidebar {
    display: none;
  }
  
  /* Logo style */
  .logo {
    margin-bottom: 0;
    font-size: 1.5rem;
  }

  /* .portfolio .projects styles */
  .portfolio .projects {
    max-width: 100%;
    gap: 20px;
  }

  /* Project style */
  .project-card {
    width: 280px;
    max-width: 95%;
  }

  /* About style */
  .about-img {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-img img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-tex {
  text-align: left !important;
  }
  .about-flex {
  flex-direction: column !important;
  text-align: left !important;
  }

  /* Mobile adjustments for achievements grid */
  .achievements {
    padding-top: 50px !important;
  }
  .achievements-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  .achievement-card {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
}

/* Mobile tablets - only change hero layout here */
@media (max-width: 768px) {

  /* Make the hero turn into a column */
  .hero {
    flex-direction: column !important;
    text-align: center !important;
    padding: 40px 6% !important;
    min-height: auto !important;
  }

  /* Ensures the content comes after the image */
  .hero-content {
    order: 3 !important;
    margin-top: 20px;
  }

  /* Place the image at the top */
  .hero-img {
    order: 1 !important;
    margin: 0 auto !important;
  }

  /* Adjusting the iframe size to fit mobile devices */
  .portfolio-container iframe {
    max-width: 100% !important;
    height: 240px !important;
  }

  /* The button is located just below the image */
  .return-section {
    order: 2 !important;
    margin-top: 16px !important;
  }

  .btn-return {
    position: static !important;
    display: inline-block;
    margin: 10px auto 0 auto !important;
  }
}

/* Mobile phones */
@media (max-width: 600px) {
  /* Fix main content margin */
  main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  /* Section style */
  section {
    padding: 40px 4% 40px 4%;
    min-height: 40vh;
  }
  
  /* Adjusting for texts */
  h2 {
    font-size: 1.8rem;
  }
  
  /* Footer responsiveness */
  footer {
    padding: 20px 0;
    font-size: 0.95rem;
  }

  /* Mobile Menu Icon */
  .mobile-menu-icon {
    display: flex;
  }
  .mobile-menu {
    display: none;
  }
  .mobile-menu.active {
    display: flex;
  }
  
  /* Mobile adjustments for effects menu */
  .effects-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  .effects-menu {
    top: 15px;
    right: 15px;
    min-width: 180px;
    padding: 12px;
  }
  .effects-menu h4 {
    font-size: 13px;
  }
  .effect-option {
    font-size: 12px;
    padding: 6px 10px;
  }

   /* Heros styles */
  .hero {
    flex-direction: column !important;
    text-align: center !important;
    padding: 30px 4% 20px 4%;
    padding-top: 50px;
    min-height: 90vh;
  }
  .hero-img {
    margin: 20px 0 0 0 !important;
    order: -1 !important;
  }
  .hero-img img {
    width: 280px !important;
    height: 200px !important;
  }
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  /* Reveal style */
  .reveal-title {
    text-align: center !important;
  }

  /* Bring the text closer to the top in the main sections */
  .about, .projects, .portfolio {
    padding-top: 20px !important;
  }

  /* No sidebar due to hamburger icon */
  .sidebar {
    display: none !important;
  }
  
  /* Logo style */
  .logo {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 10px;
  }

  /* .portfolio .projects styles */
   .portfolio .projects {
    max-width: 100%;
    gap: 20px;
  }

  /* Project style */
  .project-card {
    width: 280px;
    max-width: 95%;
  }

  /* Portfolio style */
  .portfolio {
    padding-top: 50px !important;
  }

  /* About style */
  .about {
    padding-top: 50px !important;
  }
  .about-img {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-img img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .about-tex {
  text-align: left !important;
  }
  .about-flex {
   text-align: left !important;
  }

  /* Mobile adjustments for achievements grid */
  .achievements {
    padding-top: 50px !important;
  }
  .achievements-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  .achievement-card {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  /* Fix main content margin */
  main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Section style */
  section {
    padding: 40px 4% 40px 4%;
    min-height: 40vh;
  }
  
  /* Adjusting for texts */
  h2 {
    font-size: 1.5rem;
  }

  /* Footer responsiveness */
  footer {
    padding: 15px 0;
    font-size: 0.9rem;
  }

  /* Mobile Menu Icon */
  .mobile-menu-icon {
    display: flex;
  }
  .mobile-menu {
    display: none;
  }
  .mobile-menu.active {
    display: flex;
  }

  /* Mobile adjustments for effects menu */
  .effects-toggle {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  .effects-menu {
    top: 15px;
    right: 15px;
    min-width: 180px;
    padding: 12px;
  }
  .effects-menu h4 {
    font-size: 13px;
  }
  .effect-option {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Heros styles */
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  
  /* No sidebar due to hamburger icon */
  .sidebar {
    display: none !important;
  }
  
  /* Logo style */
  .logo {
    font-size: 1.1rem;
  }
  
  /* Hero style */
  .hero-img img {
    width: 240px !important;
    height: 160px !important;
  }

  /* Project style */
  .projects {
    gap: 16px;
  }
  .project-card {
    width: 95%;
    padding: 16px;
  }

  /* About style */
  .about p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}