body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
  color: #333;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #1e1e1e;
  color: #e0e0e0;
}

/* Desktop Layout */
.container {
  display: flex;
  min-height: 100vh;
}

.left-section {
  width: 16%;
  background: #f9f9f9;
  padding: 20px;
  position: sticky;
  top: 0;
  height: 96vh;
  border-right: 1px solid #ddd;
  text-align: left;
  transition: background 0.3s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

body.dark-mode .left-section {
  background: #2a2a2a;
  border-right: 1px solid #444;
}

.upper-section {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.profile-image-container {
  margin-bottom: -5px;
  position: sticky;
  top: 3px;
  text-align: left;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 25%;
  border: 4px solid #f4a261;
  object-fit: cover;
}

.typing-animation {
  font-size: 1.15rem;
  margin: 5px 0 10px;
  min-height: 1em;
  position: absolute;
  top: 160px;
  left: 0;
  width: 100%;
  text-align: left;
}

.button-group {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 40px;
}

.action-btn {
  padding: 10px 15px;
  margin-left: 4px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9em;
  transition: transform 0.3s, background 0.3s;
  display: flex;
  align-items: center;
}

.download-btn {
  background: #000;
  color: #fff;
}

.download-btn:hover {
  background: #333;
  transform: scale(1.05);
}

.hire-btn {
  background: #f4a261;
  color: #fff;
}

.hire-btn:hover {
  background: #e07a5f;
  transform: scale(1.05);
}

.action-btn i {
  margin-left: 5px;
}

.navbar {
  margin-top: 20px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 5px 0 2px;
}

.nav-list li {
  margin: 1px 0;
}

.nav-list a, .nav-link {
  color: #333;
  text-decoration: none;
  display: block;
  padding: 6px;
  transition: background 0.3s;
  text-align: left;
}

body.dark-mode .nav-list a, body.dark-mode .nav-link {
  color: #e0e0e0;
}

.nav-list a:hover, .nav-link:hover {
  background: #e0e0e0;
}

body.dark-mode .nav-list a:hover, body.dark-mode .nav-link:hover {
  background: #3a3a2a;
}

.nav-link i {
  margin-right: 5px;
}

.lower-section {
  padding: 5px 0;
  margin-top: 5px;
}

.social-links {
  margin-bottom: 5px;
  text-align: left;
}

.social-links a {
  color: #333;
  font-size: 1.5em;
  margin: 0 5px;
  transition: color 0.3s, transform 0.3s;
}

body.dark-mode .social-links a {
  color: #e0e0e0;
}

.social-links a:hover {
  color: #f4a261;
  transform: scale(1.2);
}

.contact-info {
  text-align: left;
  margin: 2px 0;
}

.contact-info p {
  margin: 2px 0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

body.dark-mode .contact-info p {
  color: #bbb;
}

.contact-info i {
  margin-right: 10px;
}

.theme-toggle {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 10px;
  border: none;
  cursor: pointer;
  font-size: 1.5em;
  transition: transform 0.3s;
  text-align: left;
}

.theme-toggle:hover {
  transform: rotate(360deg);
}

.theme-toggle i {
  margin: 0;
}

.middle-section {
  width: 50%;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode .middle-section {
  background: #1e1e1e;
  color: #e0e0e0;
}

.info-section {
  margin-left: 20px;
  margin-bottom: 40px;
}

.info-section h2 {
  font-size: 1.8em;
  margin-bottom: 10px;
  color: #f4a261;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: #f0f0f0;
  color: #333;
  cursor: pointer;
  margin-right: 10px;
  border-radius: 20px;
  transition: background 0.3s;
}

body.dark-mode .tab-btn {
  background: #333;
  color: #e0e0e0;
}

.tab-btn.active {
  background: #e07a5f;
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 20px;
  text-align: center;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s;
}

.icon-item:hover {
  transform: scale(1.1);
}

.icon-item i {
  font-size: 3em;
  margin-bottom: 5px;
}

.icon-item span {
  font-size: 0.8em;
  color: #666;
}

body.dark-mode .icon-item span {
  color: #bbb;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

body.dark-mode .project-card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  transform: scale(1.05);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
}

.project-card:hover .project-overlay {
  display: flex;
}

.project-overlay h3 {
  margin: 0 0 10px;
  font-size: 1.5em;
}

.view-btn {
  padding: 8px 15px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.view-btn:hover {
  background: #333;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

body.dark-mode .contact-form {
  background: #2a2a2a;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

body.dark-mode .form-group label {
  color: #e0e0e0;
}

.form-group i {
  margin-right: 10px;
}

.form-group input,
.form-group textarea {
  width: 90%;
  max-width: 90%;
  min-width: 90%;
  max-height: fit-content;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f9f9f9;
  color: #333;
  transition: border 0.3s;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background: #333;
  color: #e0e0e0;
  border-color: #555;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #f4a261;
  outline: none;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: #e07a5f;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-btn:hover {
  background: #f4a261;
}

.submit-btn i {
  margin-right: 5px;
}

.copyright {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #ddd;
  margin-top: 40px;
  color: #666;
}

body.dark-mode .copyright {
  border-top: 1px solid #444;
  color: #bbb;
}

.scroll-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.scroll-top-btn.visible {
  opacity: 1;
}

.scroll-top-btn:hover {
  background: #333;
}

.right-section {
  width: 30%;
  background: #f9f9f9;
  padding: 20px;
  border-left: 1px solid #ddd;
  text-align: center;
  transition: background 0.3s;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

body.dark-mode .right-section {
  background: #2a2a2a;
  border-left: 1px solid #444;
}

.default-image {
  min-height: 200px;
  background: #f0f0f0;
}

body.dark-mode .default-image {
  background: #333;
}

.secure-form {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.secure-form input {
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 5px;
}

body.dark-mode .secure-form input {
  background: #333;
  color: #e0e0e0;
  border-color: #555;
}

.secure-form button {
  padding: 10px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.secure-form button:hover {
  background: #333;
}

.secure-content {
  display: none;
}

.secure-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .secure-content img {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile-Specific Styles */
.mobile-header {
  display: none;
  padding: 10px 20px;
  background: #f9f9f9;
  position: fixed;   /* fixed navbar */
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
}


body.dark-mode .mobile-header {
  background: #2a2a2a;
}

.theme-toggle {
  padding: 10px;
  border: none;
  cursor: pointer;
  border-radius: 35px;
  font-size: 1.5em;
  transition: transform 0.3s;
}

.mobile-menu {
  position: absolute;
  right: 20px;
}

.hamburger {
  font-size: 1.5em;
  cursor: pointer;
  padding: 10px;
  background: #f4a261;
  border-radius: 5px;
  color: #fff;
}

.nav-list-mobile {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  list-style: none;
  z-index: 1000;
}

body.dark-mode .nav-list-mobile {
  background: #2a2a2a;
  border-color: #444;
}

.nav-list-mobile.active {
  display: block;
}

.nav-list-mobile li {
  margin: 5px 0;
}

.nav-list-mobile a {
  color: #333;
  text-decoration: none;
  padding: 5px;
  display: block;
}

body.dark-mode .nav-list-mobile a {
  color: #e0e0e0;
}

.nav-list-mobile a:hover {
  background: #e0e0e0;
}

body.dark-mode .nav-list-mobile a:hover {
  background: #3a3a2a;
}

.hero-section {
  display: none;
  padding: 20px;
  background: #f9f9f9;
  flex-direction: row;
  justify-content: space-between;
}

body.dark-mode .hero-section {
  background: #2a2a2a;
}

.hero-left {
  width: 50%;
  text-align: center;
  padding: 0 2.5%;
}

.hero-left .profile-image-container {
  margin-bottom: 10px;
}

.hero-left .profile-img {
  width: 90%;
  height: 200px;
  border-radius: 10%;
  border: 4px solid #f4a261;
  object-fit: cover;
}

.typing-animation {
  font-size: 1.25rem;
  margin: 10px 0px;
  text-align: left;
  position: relative;
  top: 0;
}

.hero-right {
  width: 50%;
  text-align: right;
  padding: 0 2.5%;
}

.button-group {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.scroll-effect {
  font-size: 1rem;
  color: #666;
  animation: slideFade 2s infinite;
}

@keyframes slideFade {
  0% { opacity: 0; transform: translateX(20px); }
  50% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-20px); }
}

body.dark-mode .scroll-effect {
  color: #bbb;
}

/* Mobile Responsiveness */
@media (max-width: 1023px) {
  body {
    padding-top: 60px; /* push content below fixed header */
  }

  .container {
    flex-direction: column;
    padding: 0;
  }

  .left-section, .right-section {
    display: none;
  }

  .middle-section {
    width: 100%;
    padding: 0;
  }

  .hero-section {
    display: flex;
  }

  .copyright {
    margin-top: 0;
  }

  .secure-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
  }

  .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
  }

  .popup-content input {
    display: block;
    margin: 10px auto;
    padding: 10px;
    width: 80%;
    border: 1px solid #ddd;
    border-radius: 5px;
  }

  .popup-content button {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }

  .popup-content button:hover {
    background: #333;
  }

  .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
  }
}

@media (min-width: 1024px) {
  .mobile-header, .hero-section, .nav-list-mobile, .secure-popup {
    display: none;
  }
}