:root {
  --bg-light: #fff;
  --text-dark: #222;
  --bg-dark: #1e1e1e;
  --text-light: #f4f4f4;
  --border-light: #ccc;
  --border-dark: #555;
  --shadow-dark-1: rgba(0, 0, 0, 0.1);
  --shadow-dark-3: rgba(0, 0, 0, 0.3);
  --shadow-dark-15: rgba(0, 0, 0, 0.15);
  --shadow-light-1: rgba(255, 255, 255, 0.1);
  --shadow-light-3: rgba(255, 255, 255, 0.3);
  --shadow-light-15: rgba(255, 255, 255, 0.15);
}

body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-light);
  color: var(--text-dark);
  transition: background 0.4s ease, color 0.4s ease;
}

body.dark-mode {
  background: var(--bg-dark);
  color: var(--text-light);
}

header {
  padding: 2rem;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg-dark), var(--border-dark));
  color: var(--text-light);
}

header h1,
header p {
  color: var(--text-light);
}

.nav-container {
  margin-top: 50px;
  position: relative;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  margin: 1rem auto 0;
  opacity: 1;
  transition: all 0.5s ease, transform 0.4s ease;
}

.menu-icon span {
  height: 4px;
  margin: 3px 0;
  border-radius: 2px;
  background: var(--bg-light);
}

.menu-icon.sticky {
  position: fixed;
  top: 10px;
  right: 20px;
  margin: 0;
  z-index: 1001;
  padding: 0.5rem;
  border-radius: 6px;
  background: var(--bg-dark);
  box-shadow: 0 4px 12px var(--shadow-dark-3);
  transform: translateX(0);
}

.menu-icon.attached {
  left: calc(100% - 250px);
  right: auto;
}

.menu-icon.sticky.attached {
  left: calc(100% - 100px);
  right: auto;
  transform: translateX(-250px);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  font-weight: bold;
  color: var(--text-light);
  transition: transform 0.4s ease;
}

.nav-links a:hover {
  transform: scale(1.1);
}

.nav-links .nav-profile {
  display: none;
}

.theme-toggle span {
  font-weight: bold;
  transition: transform 0.4s ease;
}

main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 2rem;
}

section {
  max-width: 900px;
  margin: auto;
  text-align: center;
}

#about img {
  width: 150px;
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--text-dark);
  box-shadow: 0 4px 12px var(--shadow-dark-3);
}

.project {
  margin: 25px 0;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--text-dark);
  box-shadow: 0 8px 20px var(--shadow-dark-1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  background-color: #fcfcfc;
  border: 1px solid var(--border-light);
  box-shadow: 0 12px 24px var(--shadow-dark-15);
  transform: scale(1.03);
}

footer {
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, var(--bg-dark), var(--border-dark));
  color: var(--text-light);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.input-field {
  background: var(--bg-light);
  color: var(--text-light);
  border: 1px solid var(--border-light);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: background 0.4s ease, color 0.4s ease, border 0.4s ease;
}

body.dark-mode .input-field {
  background: var(--bg-dark);
  color: var(--text-dark);
  border-color: var(--border-dark);
}

body.dark-mode .project {
  background: var(--bg-dark);
  color: var(--text-light);
  box-shadow: 0 8px 20px var(--shadow-light-1);
}

body.dark-mode .project:hover {
  background-color: #222;
  border: 1px solid var(--border-dark);
  box-shadow: 0 12px 24px var(--shadow-light-15);
}

@media (max-width: 768px) {
  .menu-icon {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 250px;
    height: 100%;
    padding: 2rem 1rem;
    transition: right 0.4s ease;
    z-index: 1000;
    gap: 1rem;
    background: var(--bg-dark);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links .nav-profile {
    display: block;
    width: 100px;
    border-radius: 50%;
    box-shadow: 0 4px 12px var(--shadow-dark-3);
  }

  .nav-links a {
    font-size: 1.2rem;
    color: var(--text-light);
  }

  .theme-toggle {
    margin-top: 25px;
  }

  body {
    background: var(--bg-light);
    color: var(--text-dark);
  }

  body.dark-mode {
    background: var(--bg-dark);
    color: var(--text-light);
  }
}