:root {
  --bg-color: #ffffff;
  --text-color: #0f172a;
  --primary-color: #2563eb;
  --card-bg: #f1f5f9;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --text-color: #e5e7eb;
  --primary-color: #38bdf8;
  --card-bg: #020617;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Canvas background */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary-color);
  backdrop-filter: blur(10px);
  color: #fff;
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.5rem;
}
.navbar .logo img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  vertical-align: middle;
}

.navbar nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
}

.navbar nav ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 5px 8px;
  border-radius: 5px;
}

.navbar nav ul li a:hover {
  color: var(--bg-color);
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO */
.hero {
  max-width: 1200px;
  margin: auto;
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 4rem 2rem;
}

.hero-intro {
  color: var(--primary-color);
  font-weight: 600;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
}

.hero h2 {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.hero-desc {
  max-width: 550px;
}

.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
}

.primary:hover {
  background: #fff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  transform: scale(1.05);
}

.outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.outline:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.05);
}

.hero-image {
  width: 100%;
  max-width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  margin: auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.hero-image:hover img {
  filter: brightness(1.2);
  transform: scale(1.05);
}

/* SECTIONS */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section-text {
  max-width: 700px;
  line-height: 1.7;
}

/* ABOUT ADDITIONAL INFO */
#about .section-text {
  margin-top: 1rem;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

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

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px var(--primary-color);
}

/* CONTACT */
.contact-social {
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
}

.contact-social a {
  font-size: 2rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.contact-social a:hover {
  transform: scale(1.3) rotate(10deg);
  color: var(--primary-color);
}

/* CONTACT MAP */
.contact-map {
  margin-top: 1rem;
  width: 100%;
  height: 450px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--primary-color);
  color: #fff;
}
/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: scaleIn 0.3s ease;
  position: relative;
}

@keyframes scaleIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

.modal-tech {
  margin: 1rem 0;
  font-weight: 600;
  opacity: 0.85;
}

.modal-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 25px;
  background: var(--accent);
  color: var(--text-color);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* SLIDE-IN ANIMATION */
.slide-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.slide-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .navbar nav ul {
    flex-direction: column;
    display: none;
    background: var(--bg-color);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 1000;
  }
  .navbar nav ul li a {
    color: var(--text-color);
  }
  .navbar nav.show ul {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: 90px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-image {
    max-width: 200px;
    height: 200px;
  }
}
