/* Default (light mode) colors */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --link-color: #007bff;
    --link-color-hover: #5aa5f7;
    --card-bg: #fff;
    --card-hover-bg: rgba(0, 0, 0, 0.05);
    --footer-bg: #f1f1f1;
    --section-bg-color:white;
  }
  
  /* Dark mode colors */
  [data-theme="dark"] {
    --bg-color: #1e1e1e;
    --text-color: #ddd;
    --link-color: #007bff;
    --link-color-hover: #667585;
    --card-bg: #2c2c2c;
    --card-hover-bg: rgba(255, 255, 255, 0.1);
    --footer-bg: #333;
    --section-bg-color: #2c2c2c;
  }
  
html {
    scroll-behavior: smooth;
 }

*{
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color:var(--text-color);
    line-height: 1.6; 
    display: flex;
    flex-direction: row;
    margin: 0;
    min-height: 100vh;    
    transition: background-color 0.3s, color 0.3s;
}

a {
    color: var(--link-color);
}

@media (min-width: 768px) {
  .projects ul,
  .skills ul {
    grid-template-columns: repeat(2, 1fr); /* two columns on medium screens */
  }

  nav {
    margin-top: 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: var(--bg-color);
    padding-bottom: 10px;
  }

  main{    
    padding: 2rem;    
  }

  .experience {
    padding: 4rem 2rem;
  }

  .experience li::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 1rem;
    width: 14px;
    height: 14px;
    background-color: var(--accent-color, #007bff);
    border-radius: 50%;
  }

  .experience ul::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--accent-color, #007bff);
  }
  .experience li {
    position: relative;
    margin-left: 2rem;
  }
  .logo h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin: 0;
  }
}

@media (min-width: 1024px) {
  .projects ul,
  .skills ul {
    grid-template-columns: repeat(3, 1fr); /* three columns on larger screens */
  }
}

@media (max-width: 480px) {
  .contact-form {
    width: 100%;
  }
  .container {
    width: 100%;
  }

  main{
    width: 100%;
    padding: 0px;
  }

  header {
    padding: 0.0052px !important;
  }

  .logo h1 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
}
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--link-color);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.3s, color 0.3s;
}
  
nav a:hover {
    color: var(--link-color-hover);
    background-color: #2f2d46;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background-color: var(--link-color);
  transition: width 0.3s ease;
}


main{
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    width: 100%; 
    max-width: 880px;
    gap: 2rem;
}

.container{
    background-color: silver;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    min-height: auto;
    width: 100%;
    max-width: 880px;
    width: 100%;
    padding: 10px;
    gap:1rem;
}

header {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    border-bottom: 1px solid #ccc;    
    justify-content: space-between;
    align-items: center;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #ccc;
    margin-top: auto;
    background-color: var(--footer-bg);
  }

section {
    width: 100%;
    background-color: var(--section-bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}


section:hover {
    transform: translateY(-4px);
}

section h2 {
  position: sticky;
  top: 0;
  background-color: var(--bg-color); /* or your section bg */
  padding: 0.5rem 1rem;
  margin: 0;
  z-index: 900;
  font-size: 1.25rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

 .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
 }

.profile-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ccc;
}

.projects {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.skills {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.projects ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    list-style: none;
}
  
.projects li {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: box-shadow 0.3s ease;
}
  
.projects li:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
  

.projects ul,
.skills ul {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.projects li,
.skills li {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.projects li:hover,
.skills li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.skills li i {
    margin-right: 0.5rem;
    color: #007bff;
    font-size: 1.2rem;
}

.projects li {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .projects li h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
  }
  
  .projects li p {
    flex-grow: 1;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
  }
  
  .projects li a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: bold;
    transition: color 0.2s ease;
  }
  
  .projects li a:hover {
    color: var(--link-color);
  }
  
  .projects li:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }
  
  #darkModeToggle{
    max-width: 25px;
    pointer-events: auto;
  }

  .socials{    
    background-color: var(--bg-color);
    color: var(--text-color);
  }

  .socials .icons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
  }
  
  .socials .icons a {
    font-size: 2.5rem; /* Adjust size here */
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
  }
  
  .socials .icons a:hover {
    transform: scale(1.2);
    color: var(--accent-color, #007bff); /* Optional hover color */
  }

  /* Contact section layout */
  .contact {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--bg-color);
    color: var(--text-color);
  }
  
  .contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .contact p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
.email-btn {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    background-color: var(--accent-color, #007bff);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
  
.email-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}


.experience {
  background-color: var(--bg-color);
  color: var(--text-color);
  max-width: 880px;
  margin: 0 auto;
}

.experience h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--accent-color, #007bff);
}

.experience ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience li {
  background-color: var(--card-bg, #fff);
  padding: 1.5rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.experience li:hover {
  transform: translateY(-4px);
}

.experience h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.experience p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Optional: subtle vertical line on the left for timeline feel */
.experience ul {
  position: relative;
}

.about-me{
  background-color: var(--bg-color);
  color: var(--text-color);
}

.date {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  background-color: var(--card-bg, #fff);
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.technologies {
  padding: 2rem;
  background-color: var(--card-bg, #fff);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.technologies h4 {
  font-size: 1rem;
  color: var(--text-color, #333);
  margin-bottom: 1rem;
  text-align: center;
}

.technologies ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)); /* Creates a responsive grid */
  gap: 1.5rem; /* Space between grid items */
}

.technologies li {
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.3rem;
  background-color:var(--card-bg);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.technologies li:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.technologies li i {
  font-size: 1rem;
  margin-right: 0rem;
  color: var(--text-color, #333);
}

.technologies li:hover i {
  color: var(--accent-color, #007bff);
}

.tech-stack {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-color, #333);
}

.tech-stack span {
  background-color: var(--card-bg, #fff);
  padding: 4px 8px;
  border-radius: 6px;
}

.curriculum{
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background-color: var(--accent-color, #007bff);
  color: var(--text-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-weight: bold;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}
