/* =======================
   🔧 RESET & BASE STYLES
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background:
    linear-gradient(to bottom, rgba(15, 15, 15, 0.85), rgba(15, 15, 15, 0.85)),
    url('assets/img/IMG_20250727_200516.png') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.6;
  transition: background 0.5s ease, color 0.3s ease;
}

/* Fallback animated background */
body.fallback-bg {
  background: linear-gradient(270deg, #0a0f2c, #1a1f3d, #10142b);
  background-size: 600% 600%;
  animation: animatedBg 30s ease infinite;
}

@keyframes animatedBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========================
   🌗 THEME COLOR VARIABLES
=========================== */
:root {
  --primary-color: #00ffe1;
  --bg-dark: #0f0f0f;
  --bg-light: #ffffff;
  --text-dark: #111111;
  --text-light: #f4f4f4;
  --card-dark: #1d1d1d;
  --card-light: #f0f0f0;
  --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] {
  --bg-color: var(--bg-dark);
  --text-color: var(--text-light);
  --card-color: var(--card-dark);
}

[data-theme="light"] {
  --bg-color: var(--bg-light);
  --text-color: var(--text-dark);
  --card-color: var(--card-light);
}

/* =======================
   🧭 NAVBAR
========================== */
.navbar {
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  padding: 1rem 2rem;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo span {
  color: #ffffff;
}

.nav-links a {
  margin: 0 1rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#themeToggle {
  background: none;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  color: var(--text-color);
}

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

/* =======================
   🦸 HERO SECTION
========================== */
.hero {
  background: linear-gradient(to bottom, #0a0f2c, #12142e);
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-light);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: auto;
}

/* =======================
   ✍️ GENERAL SECTIONS
========================== */
section {
  padding: 4rem 2rem;
}

.container {
  max-width: 1200px;
  margin: auto;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

p {
  font-size: 1rem;
  color: var(--text-color);
}

/* =======================
   👨‍💻 ABOUT SECTION
========================== */
.about-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.about-img img {
  width: 280px;
  border-radius: 20px;
  box-shadow: 0 0 20px #00ffe166;
}

.about-text {
  flex: 1;
}

/* =======================
   💻 SKILLS SECTION
========================== */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 1rem;
  margin-top: 1rem;
}

.skills-list li {
  padding: 0.75rem 1.25rem;
  background-color: var(--card-color);
  border-radius: 12px;
  color: var(--text-color);
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* =======================
   🖼️ PROJECT GALLERY
========================== */
.gallery {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery::-webkit-scrollbar {
  height: 8px;
}

.gallery::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 8px;
}

.card {
  flex: 0 0 auto;
  min-width: 240px;
  max-width: 280px;
  width: 100%;
  background-color: var(--card-color);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.card img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: 0.5rem;
  line-height: 1.3;
}

/* Project Details Styling */
.details .card {
  margin-top: 2rem;
  background-color: var(--card-color);
  padding: 2rem;
  border-radius: 14px;
}

.details h4 {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--primary-color);
}

.details ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 1rem 0;
}

.details pre {
  background-color: #111;
  color: #00ff9c;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Mobile & Tablet */
@media (max-width: 1024px) {
  .card {
    min-width: 220px;
    max-width: 250px;
    padding: 1rem;
  }

  .card img {
    max-height: 150px;
  }

  .card h3 {
    font-size: 1rem;
  }

  .details .card {
    padding: 1.5rem;
  }

  .details pre {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .gallery {
    gap: 0.75rem;
    padding: 0.5rem;
  }

  .card {
    min-width: 180px;
    max-width: 220px;
    padding: 0.75rem;
  }

  .card img {
    max-height: 120px;
  }

  .card h3 {
    font-size: 0.95rem;
  }

  .details .card {
    padding: 1rem;
  }

  .details h4 {
    font-size: 0.9rem;
  }

  .details pre {
    font-size: 0.75rem;
  }
}


/* =======================
   💬 TESTIMONIALS
========================== */
.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--card-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* =======================
   📫 CONNECT SECTION
========================== */
.connect-section {
  text-align: center;
  padding: 4rem 2rem;
}

.social-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-badges img {
  height: 40px;
}

/* =======================
   🦶 FOOTER
========================== */
footer {
  background-color: var(--card-color);
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* =======================
   📱 MEDIA QUERIES
========================== */
@media (max-width: 768px) {
  .about-flex {
    flex-direction: column;
    text-align: center;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links.active {
    display: flex;
    background: var(--card-color);
    position: absolute;
    top: 70px;
    right: 20px;
    padding: 1rem;
    border-radius: 10px;
  }

  .hamburger {
    display: block;
  }

  .gallery {
    scroll-snap-type: x proximity;
  }

  .hero h1 {
    font-size: 2rem;
  }
  }

/* Style for the details card inside #details section */
.details .card {
  width: 100%;
  max-width: 700px;
  margin: 2rem auto;
  background-color: var(--card-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  text-align: left;
}

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

.details h4 {
  margin-top: 1.5rem;
  color: var(--primary-color);
}

.details ul {
  margin-left: 1.2rem;
  padding-left: 1rem;
  list-style-type: disc;
  color: var(--text-color);
}

.details pre {
  background-color: #111;
  color: #00ff99;
  padding: 1rem;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.close-btn {
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--primary-color);
  border: none;
  color: #000;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.close-btn:hover {
  background-color: #00ccbb;
}

/* Optional smooth transition */
.details {
  transition: all 0.3s ease;
}
