/* Reset and Base Styles */
html {
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
  overflow-y: scroll;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  scroll-behavior: auto; /* Disable smooth scrolling for instant snap */
  max-width: 100vw;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Header Styles */
header {
  position: fixed;
  width: 100%;
  background-color: rgba(246, 248, 250, 0.9);
  backdrop-filter: blur(5px);
  box-sizing: border-box;
  top: 0;
  z-index: 10;
  padding: 15px 5%;
  transition: all 0.3s ease-in-out, background-color 0.5s ease;
}

header:hover {
  background-color: rgba(246, 248, 250, 1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 20px;
}

a{
  text-decoration: none;
  transition: color 0.5s ease;
}

.typing-container {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
}

.name h1 {
  font-size: 2.5rem;
  margin: 0;
  transition: transform 0.3s ease;
}

.name h1:hover {
  transform: scale(1.05);
}

/* Hamburger Menu Styles */
.hamburger {
  display: none; /* Hidden by default */
  flex-direction: column;
  cursor: pointer;
}

.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: black;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* Navigation Links */
.nav-links {
  list-style: none;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li {
  font-size: 1.2rem;
  margin: 0 15px;
  transition: transform 0.3s ease, color 0.3s ease;
}

.nav-links li:hover {
  transform: translateY(-3px);
  color: #007bff;
}

.nav-links a {
  text-decoration: none;
  color: black;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #007bff;
}

/* Sections Common Styles */
.card-section {
  min-height: 100vh;
  width: 100%;
  padding: 0 5%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start; /* Snap to the start of each section */
  transition: transform 0.5s ease, opacity 0.5s ease, background-color 0.5s ease;
  padding-top: 100px; /* Increase top padding to account for fixed header */
  margin-top: -100px; /* Negative margin to offset the padding */
}

/* Active/Inactive Section Styles */
.card-section.active {
  transform: scale(1);
  opacity: 1;
}

.card-section.inactive {
  transform: scale(0.9);
  opacity: 0.5;
}

/* Dark Mode Styles */
body.dark {
  background-color: #121212;
  color: #ffffff;
}

body.dark header {
  background-color: rgba(18, 18, 18, 0.9);
}

body.dark .card-section {
  background-color: #1e1e1e;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark .card-section#profile {
  background-color: #1e1e1e;
}

body.dark .card-section#About {
  background-color: #2d2d2d;
}

body.dark .card-section#projects {
  background-color: #2d2d2d;
}

body.dark .card-section#Skills {
  background-color: #2d2d2d;
}

body.dark .card-section#contact {
  background-color: #1e1e1e;
}

body.dark .skill-box {
  background-color: #333333;
  color: #ffffff;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark .project-card {
  background-color: #333333;
  color: #ffffff;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark .btn {
  background-color: #444444;
  color: #ffffff;
  border-color: #444444;
}

body.dark .btn:hover {
  background-color: #555555;
}

body.dark footer {
  background-color: #000000;
}

body.dark .nav-links a {
  color: #ffffff;
}

body.dark .nav-links a:hover {
  color: #66b3ff;
}

body.dark .box .education-title {
  color: #ffffff;
}

body.dark .box .education-subtitle {
  color: #cccccc;
}

/* Add these styles for dark mode hamburger */
body.dark .hamburger .bar {
  background-color: white; /* Change hamburger bars to white in dark mode */
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.5rem;
  transition: transform 0.3s ease;
  position: absolute; /* Position the button absolutely */
  top: 10px; /* Adjust the top position */
  right: 10px; /* Adjust the right position */
  z-index: 10; /* Ensure it's above the image */
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
}

/* Profile Section */
#profile {
  background-color: #f8f9fa;
  padding-top: 120px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  margin: 0;
}

.imgm {
  position: relative; /* Make the container relative for absolute positioning */
  flex-shrink: 0; /* Prevent image from shrinking */
  width: 350px; /* Fixed width */
  height: 350px; /* Fixed height */
}

.imgs {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.imgs:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.t {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  height: 350px; /* Fixed height to match image height */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  margin-left: 2rem;
}

.text {
  font-size: 2.5rem;
  transition: opacity 0.3s ease;
  text-align: center;
  margin: 0;
  line-height: 1.2; /* Reduce line height */
}

/* Add styles for typed text container */
.typed-text-container {
  height: 2.5rem; /* Fixed height to prevent layout shift */
  min-height: 2.5rem; /* Prevent collapse */
  display: flex;
  align-items: center;
  margin: 0;
  overflow: hidden; /* Prevent overflow from causing movement */
}

#typing {
  font-size: 2.5rem;
  display: inline;
  margin: 0;
  line-height: 1;
  font-weight: normal;
}

/* Adjust the Typed.js cursor style */
.typed-cursor {
  font-size: 2.5rem;
  line-height: 1;
  vertical-align: baseline;
}

.st {
  font-size: 2.5rem; /* Match the size with .bt */
  font-weight: normal;
}

.bt {
  font-size: 2.5rem;
  font-weight: bolder;
}

/* Add styles for typed text */
#typing {
  font-size: 2.5rem; /* Match the size */
  display: block;
  margin-top: 10px; /* Add some spacing */
  margin-bottom: 20px; /* Add bottom spacing */
}

.icon {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 0;
  cursor: pointer;
}

.icon img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.icon img:hover {
  transform: scale(1.2);
}

.btn-container {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.btn {
  font-weight: 700;
  background-color: rgb(53, 53, 53);
  color: white;
  padding: 1rem;
  width: 10rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.3s ease, background-color 0.5s ease;
}

.btn:hover {
  background-color: rgb(31, 31, 31);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* About Section */
#About {
  background-color: #e9ecef;
  scroll-margin-top: 100px; /* This prevents the section title from going under the navbar when scrolling to anchor */
  padding: 2rem 1rem;
}

.about {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

.content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

.education-content {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
  width: 100%;
  max-width: 800px;
  text-align: center;
}

.education-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.education-section {
  margin-top: 2rem;
}

.education-section h1 {
  text-align: center;
  color: #007bff;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.box {
  background-color: #ffffff;
  border: none;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: auto;
  width: 100%;
  margin: 0;
}

/* Dark mode updates */
body.dark .education-content {
  background-color: #333333;
  color: #ffffff;
}

body.dark .box {
  background-color: #333333;
  color: #ffffff;
}

/* Mobile responsive updates */
@media (max-width: 768px) {
  .education-grid {
    grid-template-columns: 1fr;
  }

  .education-content {
    padding: 1.5rem;
    padding: 1rem;
    margin: 0;
    width: 90%;
  }

  .box {
    padding: 1rem;
    width: 100%;
    margin: 0.5rem auto;
  }

  .hamburger {
    display: flex; /* Show hamburger menu on mobile */
  }

  .nav-links {
    position: fixed;
    top: 80px; /* Adjust based on header height */
    right: -100%; /* Hide the menu off-screen */
    flex-direction: column;
    background-color: rgba(246, 248, 250, 0.9);
    backdrop-filter: blur(5px);
    width: 100%;
    height: calc(100vh - 80px);
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0; /* Show the menu */
  }

  .nav-links li {
    margin: 15px 0;
  }

  /* Add dark mode styles for mobile menu */
  body.dark .nav-links {
    background-color: rgba(18, 18, 18, 0.9); /* Dark mode background */
  }

  body.dark .nav-links li a {
    color: #ffffff; /* Ensure text is white in dark mode */
  }

  body.dark .nav-links li a:hover {
    color: #66b3ff; /* Match the hover color from desktop dark mode */
  }

  /* Adjust section padding for mobile */
  .card-section {
    padding: 0 10px;
    padding-top: 80px; /* Slightly less padding on mobile */
    margin-top: -80px;
  }

  /* Profile Section */
  #profile {
    flex-direction: column;
    gap: 2rem;
    padding-top: 100px;
  }

  .imgs {
    width: 250px;
    height: 250px;
  }

  .imgm {
    width: 250px;
    height: 250px;
  }

  .t {
    height: auto;
    min-height: 300px;
    margin-left: 0;
  }

  .text {
    font-size: 1.2rem;
  }

  .bt {
    font-size: 2rem;
  }

  .st, .bt, #typing {
    font-size: 2rem; /* Slightly smaller on mobile */
  }

  /* About Section */
  .about {
    padding: 0 10px;
    padding: 0;
  }

  .imgsq {
    width: 250px;
    height: 250px;
  }

  .education-content {
    width: 100%;
    padding: 0 10px;
    padding: 1rem;
    margin: 0;
    width: 90%;
  }

  /* Adjust box sizing for education section */
  .box {
    padding: 15px;
    min-height: 120px;
    width: 85%; /* Adjust width */
    max-width: 300px; /* Add max-width */
    margin: 15px auto;
    position: relative; /* Add this */
    left: 0; /* Center the box */
    right: 0; /* Center the box */
    width: 100%;
    margin: 0.5rem auto;
  }

  .box h1 {
    font-size: 1.5rem; /* Smaller heading on mobile */
  }

  .box .education-title {
    font-size: 1.1rem;
  }

  .box .education-subtitle {
    font-size: 0.9rem;
  }

  /* Adjust projects grid */
  .projects-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem;
    padding: 0 15px;
  }

  .project-card {
    width: 90%;
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-buttons {
    padding: 0;
    gap: 0.5rem;
  }

  .project-buttons .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem;
  }

  /* Adjust content spacing */
  .education-content {
    padding: 0 15px;
    font-size: 1rem;
  }

  .abt {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  /* Skills Section */
  .skill-container {
    flex-direction: column;
    align-items: center;
  }

  .skill-box {
    width: 80%;
  }

  /* Contact Section */
  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .contact-info-container {
    margin: 0.5rem 0;
  }
  
  #About, #projects, #Skills {
    scroll-margin-top: 80px;
  }

  /* Profile Section Updates */
  #profile {
    padding-top: 120px;
    gap: 1rem;
  }

  .imgm {
    width: 200px;
    height: 200px;
  }

  .imgs {
    width: 200px;
    height: 200px;
  }

  .t {
    height: auto;
    min-height: 250px;
    padding: 1rem;
  }

  .text {
    font-size: 1.5rem;
  }

  .st, .bt, #typing {
    font-size: 1.5rem;
  }

  /* About Section Updates */
  .education-content {
    padding: 1rem;
    margin: 0 1rem;
  }

  .education-grid {
    padding: 0 1rem;
    width: 90%;
    margin: 0 auto;
  }

  .box {
    padding: 1rem;
    width: 100%;
    max-width: none;
    margin: 0.5rem 0;
  }

  /* Projects Section Updates */
  .projects-grid {
    padding: 0 1rem;
  }

  .project-card {
    width: 100%;
    max-width: none;
    margin: 0.5rem 0;
    padding: 1rem;
  }

  /* Skills Section Updates */
  .skill-container {
    padding: 1rem;
  }

  .skill-box {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
  }
}

/* Add styles for even smaller screens */
@media (max-width: 480px) {
  .box {
    width: 90%;
    padding: 12px;
  }

  .project-buttons .btn {
    max-width: 100%;
    margin: 0.25rem 0;
  }

  .project-card {
    width: 95%;
  }

  .education-content {
    padding: 0 10px;
    width: 100%;
    padding: 1rem;
  }

  /* Header adjustments */
  header {
    padding: 10px 3%;
  }

  .name h1 {
    font-size: 1.8rem;
  }

  /* Profile section */
  .imgm, .imgs {
    width: 180px;
    height: 180px;
  }

  .text {
    font-size: 1.2rem;
  }

  .st, .bt, #typing {
    font-size: 1.2rem;
  }

  /* Section title adjustments */
  .abt {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  /* Card adjustments */
  .box, .project-card, .skill-box {
    padding: 0.8rem;
  }

  .education-title {
    font-size: 1rem;
  }

  .education-subtitle {
    font-size: 0.9rem;
  }

  /* Button adjustments */
  .btn {
    padding: 0.8rem;
    width: 8rem;
    font-size: 0.9rem;
  }

  /* Contact section */
  .contact-info-upper-container {
    padding: 1rem;
    margin: 1rem;
  }

  .cicon img {
    width: 40px;
    height: 40px;
  }

  /* Adjust section spacing */
  .card-section {
    padding-top: 70px;
    margin-top: -70px;
  }
}

/* Fix for very small screens */
@media (max-width: 320px) {
  .imgm, .imgs {
    width: 150px;
    height: 150px;
  }

  .text, .st, .bt, #typing {
    font-size: 1.1rem;
  }

  .btn {
    width: 7rem;
    padding: 0.7rem;
  }

  .abt {
    font-size: 1.5rem;
  }
}

/* Add smooth transition for responsive changes */
* {
  transition: all 0.3s ease-in-out;
}

/* Projects Section */
#projects {
  background-color: #f1f3f5;
  scroll-margin-top: 100px; /* This prevents the section title from going under the navbar when scrolling to anchor */
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Update existing project-card styles */
.project-card {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease, background-color 0.5s ease, box-shadow 0.5s ease;
  width: 100%;
  max-width: 300px; /* Adjust max-width */
  margin: 0 auto; /* Center cards */
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.project-card:hover h3 {
  color: #007bff;
}

/* Update project-buttons and btn styles */
.project-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  padding: 0;
  margin-top: 1rem;
}

.project-buttons .btn {
  flex: 1 1 auto;
  min-width: 80px;
  max-width: calc(50% - 0.25rem); /* Half width minus half of gap */
  font-size: 0.9rem;
  padding: 0.75rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-buttons .btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* Skills Section */
#Skills {
  /* padding: 50px 0;
  margin: 0; */
  background-color: #e9ecef;
  /* width: 100%; */
  display: flex;
  justify-content: center;
  align-items: center;
  scroll-margin-top: 100px; /* This prevents the section title from going under the navbar when scrolling to anchor */
}

.skill-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  padding: 20px;
}

/* Skills Section - Dark Mode */
body.dark .skill-box {
  background-color: #333333;
  color: #ffffff;
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

body.dark .skill-box li {
  color: #dddddd; /* Lighter text color for better visibility */
}

.skill-box {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background-color 0.5s ease, box-shadow 0.5s ease;
  text-align: left;
}

.skill-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.skill-header svg {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.skill-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: bold;
}

.skill-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-box li {
  font-size: 1rem;
  margin: 10px 0;
  color: #555;
}

.skill-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .skill-container {
    grid-template-columns: repeat(1, 1fr);
  }

  .skill-box {
    width: 100%;
  }

  .hamburger {
    display: flex; /* Show hamburger menu on mobile */
  }

  .nav-links {
    position: fixed;
    top: 80px; /* Adjust based on header height */
    right: -100%; /* Hide the menu off-screen */
    flex-direction: column;
    background-color: rgba(246, 248, 250, 0.9);
    backdrop-filter: blur(5px);
    width: 100%;
    height: calc(100vh - 80px);
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0; /* Show the menu */
  }

  .nav-links li {
    margin: 15px 0;
  }

  /* Add dark mode styles for mobile menu */
  body.dark .nav-links {
    background-color: rgba(18, 18, 18, 0.9); /* Dark mode background */
  }

  body.dark .nav-links li a {
    color: #ffffff; /* Ensure text is white in dark mode */
  }

  body.dark .nav-links li a:hover {
    color: #66b3ff; /* Match the hover color from desktop dark mode */
  }

  /* Adjust section padding for mobile */
  .card-section {
    padding: 0 10px;
    padding-top: 80px; /* Slightly less padding on mobile */
    margin-top: -80px;
  }

  /* Profile Section */
  #profile {
    flex-direction: column;
    gap: 2rem;
    padding-top: 100px;
  }

  .imgs {
    width: 250px;
    height: 250px;
  }

  .imgm {
    width: 250px;
    height: 250px;
  }

  .t {
    height: auto;
    min-height: 300px;
    margin-left: 0;
  }

  .text {
    font-size: 1.2rem;
  }

  .bt {
    font-size: 2rem;
  }

  .st, .bt, #typing {
    font-size: 2rem; /* Slightly smaller on mobile */
  }

  /* About Section */
  .about {
    padding: 0 10px;
  }

  .imgsq {
    width: 250px;
    height: 250px;
  }

  .education-content {
    width: 100%;
    padding: 0 10px;
  }

  /* Adjust box sizing for education section */
  .box {
    padding: 15px;
    min-height: 120px;
    width: 85%; /* Adjust width */
    max-width: 300px; /* Add max-width */
    margin: 15px auto;
    position: relative; /* Add this */
    left: 0; /* Center the box */
    right: 0; /* Center the box */
  }

  .box h1 {
    font-size: 1.5rem; /* Smaller heading on mobile */
  }

  .box .education-title {
    font-size: 1.1rem;
  }

  .box .education-subtitle {
    font-size: 0.9rem;
  }

  /* Adjust projects grid */
  .projects-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem;
    padding: 0 15px;
  }

  .project-card {
    width: 90%;
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1.3rem;
  }

  .project-buttons {
    padding: 0;
    gap: 0.5rem;
  }

  .project-buttons .btn {
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem;
  }

  /* Adjust content spacing */
  .education-content {
    padding: 0 15px;
    font-size: 1rem;
  }

  .abt {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  /* Skills Section */
  .skill-container {
    flex-direction: column;
    align-items: center;
  }

  .skill-box {
    width: 80%;
  }

  /* Contact Section */
  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .contact-info-container {
    margin: 0.5rem 0;
  }
  
  #About, #projects, #Skills {
    scroll-margin-top: 80px;
  }

  /* Profile Section Updates */
  #profile {
    padding-top: 120px;
    gap: 1rem;
  }

  .imgm {
    width: 200px;
    height: 200px;
  }

  .imgs {
    width: 200px;
    height: 200px;
  }

  .t {
    height: auto;
    min-height: 250px;
    padding: 1rem;
  }

  .text {
    font-size: 1.5rem;
  }

  .st, .bt, #typing {
    font-size: 1.5rem;
  }

  /* About Section Updates */
  .education-content {
    padding: 1rem;
    margin: 0 1rem;
  }

  .education-grid {
    padding: 0 1rem;
  }

  .box {
    padding: 1rem;
    width: 100%;
    max-width: none;
    margin: 0.5rem 0;
  }

  /* Projects Section Updates */
  .projects-grid {
    padding: 0 1rem;
  }

  .project-card {
    width: 100%;
    max-width: none;
    margin: 0.5rem 0;
    padding: 1rem;
  }

  /* Skills Section Updates */
  .skill-container {
    padding: 1rem;
  }

  .skill-box {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
  }
}

/* Add styles for even smaller screens */
@media (max-width: 480px) {
  .box {
    width: 90%;
    padding: 12px;
  }

  .project-buttons .btn {
    max-width: 100%;
    margin: 0.25rem 0;
  }

  .project-card {
    width: 95%;
  }

  .education-content {
    padding: 0 10px;
  }

  /* Header adjustments */
  header {
    padding: 10px 3%;
  }

  .name h1 {
    font-size: 1.8rem;
  }

  /* Profile section */
  .imgm, .imgs {
    width: 180px;
    height: 180px;
  }

  .text {
    font-size: 1.2rem;
  }

  .st, .bt, #typing {
    font-size: 1.2rem;
  }

  /* Section title adjustments */
  .abt {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  /* Card adjustments */
  .box, .project-card, .skill-box {
    padding: 0.8rem;
  }

  .education-title {
    font-size: 1rem;
  }

  .education-subtitle {
    font-size: 0.9rem;
  }

  /* Button adjustments */
  .btn {
    padding: 0.8rem;
    width: 8rem;
    font-size: 0.9rem;
  }

  /* Contact section */
  .contact-info-upper-container {
    padding: 1rem;
    margin: 1rem;
  }

  .cicon img {
    width: 40px;
    height: 40px;
  }

  /* Adjust section spacing */
  .card-section {
    padding-top: 70px;
    margin-top: -70px;
  }
}

/* Fix for very small screens */
@media (max-width: 320px) {
  .imgm, .imgs {
    width: 150px;
    height: 150px;
  }

  .text, .st, .bt, #typing {
    font-size: 1.1rem;
  }

  .btn {
    width: 7rem;
    padding: 0.7rem;
  }

  .abt {
    font-size: 1.5rem;
  }
}

/* Add smooth transition for responsive changes */
* {
  transition: all 0.3s ease-in-out;
}

/* Section Headers */
.abt {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin: 2rem 0;
  width: 100%;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
}

body.dark .abt {
  color: #ffffff;
}

/* Contact Section */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  /* border: rgb(53, 53, 53) 0.1rem solid; */
  border-color: rgb(163, 163, 163);
  background-color: rgb(250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
}
.cicon img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.cicon {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 0;
  cursor: pointer;
}
.cicon img:hover {
  transform: scale(1.2);
}

/* Footer Styles */
footer {
  padding: 20px 0;
  text-align: center;
  background-color: #a5a5a5;
  color: white;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.3s ease, background-color 0.5s ease;
}

footer p {
  margin: 0;
  font-size: 1rem;
}