/* === General Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  padding: 2rem;
  background-color: var(--bg-color);
  overflow-x: hidden;
}

/* Background image layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("bg-img.jpg") center/cover fixed;
  z-index: -1;
  transition: filter 0.5s ease;
}

/* Invert background in dark mode */
body.dark-mode::before {
  filter: invert(1) hue-rotate(180deg);
}

body.dark-mode,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode p {
  color: #ffffff;
}

body.dark-mode summary,
body.dark-mode nav a,
body.dark-mode li a,
body.dark-mode .project-card a{
 color: #afe4ff;
}

h1, h2, h3 {
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: center;
}

/* === Navigation === */
nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 2rem;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s;

}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.295);
}
body.dark-mode nav a:hover{
  background-color: #ffffff0d;
}

#darkModeToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background-color: rgba(145, 145, 145, 0.2);
  color: #4a4a4a;
  cursor: pointer;
  z-index: 999;
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease;
}

#darkModeToggle:hover {
  background-color: rgba(70, 70, 70, 0.217);
}

body.dark-mode #darkModeToggle{
  background-color: #4a4a4a63;
  color: #fff;
}

body.dark-mode #darkModeToggle:hover{
  background-color: #2d2d2d33;
}

.project-card {
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 1rem;
  max-width: 800px;
  text-align: left;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #000000;
}

.project-card p {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #000000;
}

.project-card a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: bold;
  color: #5f6aff;
}

.project-card a:hover {
  text-decoration: underline;
}

/* === Glassmorphism Container === */
.glasscontainer {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* === Sections === */
section {
  margin: 2rem auto;
  max-width: 800px;
}

/* === Glassmorphism Cards === */
.glass-card,
details {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: #fff;
  transition: background-color 0.3s ease;
}

.glass-card:hover,
details:hover {
  background: rgba(255, 255, 255, 0.349);
}

body.dark-mode .glass-card:hover,
body.dark-mode details:hover{
 background:rgba(188, 188, 188, 0.192);
}

summary {
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: rgb(69, 94, 253);
}

details p {
  color: #000000;
}

body.dark-mode details p {
  color: #ffffff;
}

/* === Contact Links === */
ul {
  list-style: none;
  padding-left: 0;
}

li a {
  color: #5f6aff;
  text-decoration: none;
}

li a:hover {
  text-decoration: underline;
}

/* === Button === */
#back2top {
  display: block;
  margin: 2rem auto;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#back2top:hover {
  background-color: rgba(0, 0, 0, 0.639);
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #000000;
}

body.dark-mode footer {
  color: #ffffff;
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header h2 {
    font-size: 1.1rem;
    text-align: center;
  }

  #darkModeToggle {
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .glasscontainer {
    padding: 1rem;
    margin: 1rem;
  }

  section {
    padding: 0 1rem;
  }
}
