* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

:root {
  --bg: #f7f7f7;
  --text: #111;
  --header: #fff;
  --link: #1a73e8;
}

.dark {
  --bg: #121212;
  --text: #f0f0f0;
  --header: #1e1e1e;
  --link: #8ab4f8;
}

canvas#bg {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

header {
  background: var(--header);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-img {
  height: 40px;
  object-fit: contain;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.menu-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

#menu-toggle {
  display: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
}

.toggle-mode {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.social-icons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.social-icons img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.15);
}

.dark .social-icons img {
  filter: brightness(0) invert(1);
}


.project {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.project-img {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.project-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
}

main {
  padding: 40px 20px;
  max-width: 800px;
  margin: auto;
}

section {
  margin-bottom: 40px;
}

h1, h2 {
  margin-bottom: 10px;
}

ul {
  padding-left: 20px;
}

footer {
  text-align: center;
  padding: 20px;
  background: var(--header);
}

/* Mobile nav */
@media (max-width: 768px) {

  .project {
    flex-direction: column;
    align-items: center;
  }

  .project-img {
    width: 90%;
  }

  .project-text {
    text-align: center;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 10px;
    background: var(--header);
    padding: 10px;
    position: absolute;
    top: 60px;
    right: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }
  #menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }
  .menu-icon {
    display: block;
  }
}
