/* =========================================
   TABLE OF CONTENTS
   1. Variables
   2. Reset & Base
   3. Layout & Utilities
   4. Components
      - Navbar
      - Mode Toggle
      - Hero (Content, Image, Badges)
      - Scroll Indicator
      - About
      - Skills
      - Services
      - Projects
      - Contact
      - Footer
      - Icon Box & Social
   5. Light Mode Theme
   6. Media Queries (Responsive)
   ========================================= */

/* ================= 1. VARIABLES ================= */
:root {
  --nav-height: 80px;
  --accent: #0f31f1;
  /* Original Blue */
  --accent-glow: rgba(15, 49, 241, 0.4);
  --bg-main: #000000;
  /* Pure Black */
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.12);

  --text-main: #ffffff;
  --text-muted: #aaaaaa;

  --navbar-bg: rgba(0, 0, 0, 0.6);
  --footer-bg: #000000;

  /* Aliases */
  --primary: var(--accent);
  --border: var(--border-soft);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);

  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: 0.3s ease;
  --transition-smooth: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

img,
video,
svg,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ================= 3. LAYOUT & UTILITIES ================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 120px 20px;
  text-align: center;
}

.section h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  color: #fff;
}

.subtitle {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 60px;
}

/* Glass Card Utility */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  margin: 40px auto;
  padding: 60px 40px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.1);
}

/* Scroll Reveal Utilities */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s ease;
  pointer-events: none;
}

.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ================= 4. COMPONENTS ================= */

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: var(--navbar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1000;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.right-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #fff;
  transition: 0.3s ease;
}

/* --- MODE TOGGLE --- */
.mode-toggle {
  display: flex;
  align-items: center;
  margin-left: 40px;
}

.mode-toggle input {
  display: none;
}

.toggle {
  width: 60px;
  height: 30px;
  background: #d9d9d9;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.circle {
  width: 26px;
  height: 26px;
  background: #8b908e;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

.mode-toggle input:checked+.toggle .circle {
  transform: translateX(30px);
}

/* --- HERO --- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 80px;
}

.hero-text {
  max-width: 560px;
  text-align: left;
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(to bottom right, #fff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 40px;
  color: var(--text-muted);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

.btn {
  padding: 14px 28px;
  text-decoration: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  background: #4338ca;
}

.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  color: #fff;
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hero-stats {
  margin-top: 60px;
  display: flex;
  gap: 60px;
}

.stat-number {
  font-size: 40px;
  font-weight: 700;
  display: block;
  color: #fff;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Image & Badges */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-container {
  position: relative;
  width: 380px;
  height: 380px;
}

.profile-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(15, 49, 241, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

.profile-image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow:
    0 0 30px rgba(15, 49, 241, 0.35),
    0 0 60px rgba(15, 49, 241, 0.15);
  overflow: hidden;
  background: var(--bg-card);
}

.profile-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  will-change: transform;
}

.profile-placeholder {
  font-size: 8rem;
  color: var(--primary);
  opacity: 0.3;
}

/* Floating Badges */
.floating-badge {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: floatBadge 3s ease-in-out infinite;
  min-width: 200px;
  transition: all var(--transition-smooth);
}

.floating-badge:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 5px 20px rgba(15, 49, 241, 0.25);
}

.floating-badge i {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.badge-2 i {
  color: #339933 !important;
}

.badge-3 i {
  color: #f7df1e !important;
}

.badge-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.badge-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-libs {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.4;
}

.badge-1 {
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.badge-2 {
  bottom: 15%;
  right: -15%;
  animation-delay: 1s;
}

.badge-3 {
  top: 40%;
  left: -15%;
  animation-delay: 2s;
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  animation: fadeUp 2s infinite;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.5s infinite;
}

.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
}

/* --- ABOUT --- */
.about-container {
  max-width: 780px;
}

#about {
  max-width: 900px;
  margin: 40px auto;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  transition: var(--transition);
}

#about:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.1);
}

.about-content {
  text-align: left;
}

.about-lead {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
  line-height: 1.6;
}

#about p,
.about-item span {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.about-item i {
  color: var(--accent);
  font-size: 8px;
  margin-top: 8px;
  flex-shrink: 0;
}

.about-item span {
  line-height: 1.7;
}

#about li {
  line-height: 1.7;
}

/* --- SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: auto;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent);
}

.skill-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 12px var(--accent);
}

.skill-card img {
  width: 40px;
  height: 40px;
}

.skill-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.skill-card p {
  font-size: 13px;
  color: #ffffff;
}

/* --- SERVICES --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: auto;
}

.service-card {
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  text-align: left;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(79, 70, 229, 0.15);
}

.service-card h3 {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.service-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- PROJECTS --- */
#projects {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 100%;
  margin: auto;
}

.project-card {
  position: relative;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 25px rgba(79, 70, 229, 0.2);
}

.project-image-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
  transform: scale(1.1);
}

.project-content {
  padding: 16px;
  text-align: left;
}

.project-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.project-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.links {
  display: flex;
  gap: 12px;
}

.btn-project {
  padding: 8px 16px;
  /* Smaller buttons */
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-project.live {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(15, 49, 241, 0.3);
}

.btn-project.live:hover {
  background: #2546f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 49, 241, 0.5);
}

.btn-project.github {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-project.github:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}


/* --- ICON BOX & SOCIAL --- */
.icon-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 18px;
  color: #fff;
}

.social-icons {
  display: flex;
  gap: 14px;
  margin-top: 15px;
}

.social-icons a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.social-icons a:hover {
  transform: translateY(-5px);
  background: rgba(15, 49, 241, 0.15);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-glow);
}

/* --- CERTIFICATIONS --- */
#certifications {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px 20px;
}

.certifications-grid {
  display: flex;
  justify-content: center;
  max-width: 100%;
  margin: auto;
}

.certification-card {
  position: relative;
  max-width: 460px;
  width: 100%;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 24px 30px;
  text-align: center;
  transition: var(--transition);
  overflow: hidden;
}

.certification-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 25px rgba(15, 49, 241, 0.2);
}

.cert-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.cert-content h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: #fff;
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.cert-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 18px;
}

.btn-cert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  /* Smaller button */
  background: var(--accent);
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(15, 49, 241, 0.3);
}

.btn-cert:hover {
  background: #2546f0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 49, 241, 0.5);
}

/* --- CONTACT --- */
.contact {
  padding: 100px 10%;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.contact-info p {
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 25px;
}

.contact-info ul {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.contact-list strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.contact-list p {
  font-size: 13px;
  color: #d4d4d4;
  margin-top: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 16px;
  color: #ffffff;
  font-size: 14px;
  border-radius: 8px;
  outline: none;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #ffffff;
}

.contact-form button {
  margin-top: 10px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  background: #2546f0;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* --- FOOTER --- */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 30px;
  font-size: 12px;
  color: #ffffff;
}

.footer-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer Links Default (Dark Mode) */
body:not(.light-mode) footer a {
  color: #fff;
  text-decoration: none;
}

body:not(.light-mode) footer a:hover {
  opacity: 0.8;
}

/* ================= ANIMATIONS ================= */
@keyframes pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

@keyframes floatBadge {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes scrollWheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes fadeUp {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* ================= 5. LIGHT MODE THEME ================= */
body.light-mode {
  background: #ffffff;
  color: #000;
}

body.light-mode .profile-image-glow {
  background: radial-gradient(circle, rgba(15, 49, 241, 0.1) 0%, transparent 70%);
}

body.light-mode .profile-image-frame {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .navbar {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .nav-links a {
  color: #000;
}

body.light-mode .footer {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
}

/* Restore original toggle appearance in light mode */
body.light-mode .toggle {
  background: #d9d9d9 !important;
  border: none !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  /* Shadow instead of border for perfect alignment */
}

body.light-mode .circle {
  background: #8b908e !important;
}

body.light-mode p,
body.light-mode .nav-links a,
/* More specific than just 'span' */
body.light-mode li,
body.light-mode strong,
body.light-mode b,
body.light-mode label:not(.toggle),
/* Exempt our toggle label */
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
  color: #000000 !important;
}

body.light-mode .hero h1 {
  background: none !important;
  -webkit-text-fill-color: #000000 !important;
}

body.light-mode .secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  font-weight: 600;
  box-shadow: none;
}

body.light-mode .secondary:hover {
  background: var(--accent);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 49, 241, 0.3);
}

body.light-mode .service-card {
  background: #ffffff;
  border: 2px solid #0f31f1;
  /* Pronounced accent border */
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.light-mode .service-card:hover {
  border-color: #2546f0;
  background: #fcfcfd;
  box-shadow: 0 15px 40px rgba(15, 49, 241, 0.1);
}

body.light-mode .stat-number,
body.light-mode .stat-label,
body.light-mode .badge-title,
body.light-mode .badge-libs {
  color: #000000 !important;
}

body.light-mode .floating-badge {
  background: #ffffff;
  border-color: #d2d2d7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Light Mode Overrides */
body.light-mode .hamburger span,
body.light .hamburger span {
  background-color: #000 !important;
}

body.light-mode #about {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.4);
}

body.light-mode #about,
body.light-mode #about p,
body.light-mode #about li,
body.light-mode #about span {
  color: #111;
}

/* Light Mode Overrides for Projects */
body.light-mode #projects {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.4);
}

body.light-mode #projects h2 {
  color: #0f172a;
}

body.light-mode #projects:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.6);
}



body.light-mode .project-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.light-mode .project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(15, 49, 241, 0.1);
}

body.light-mode .project-card h3 {
  color: #111;
}

body.light-mode .project-card p {
  color: #555;
}

body.light-mode .project-image-wrapper {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .btn-project.github {
  border-color: rgba(0, 0, 0, 0.2);
  color: #333;
}

body.light-mode .btn-project.github:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #000;
  color: #000;
}

/* Contact Light Mode */
body.light-mode .contact,
body.light-mode #contact {
  background: #ffffff;
  color: #000;
}

body.light-mode .contact-container {
  background: transparent;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background: #f5f5f7;
  color: #000;
  border: 1px solid #cfcfd4;
}

body.light-mode .contact-form input::placeholder,
body.light-mode .contact-form textarea::placeholder {
  color: #6e6e73;
}

body.light-mode .contact-info p,
body.light-mode .contact-info li,
body.light-mode .contact-info strong {
  color: #000;
}

body.light-mode .contact-form button {
  background: var(--accent);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(15, 49, 241, 0.2);
}

body.light-mode .contact-form button:hover {
  background: #2546f0;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(15, 49, 241, 0.3);
}

/* Social Icons Light Mode */
body.light-mode .social-icons a {
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 0 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

body.light-mode .social-icons a:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 49, 241, 0.2);
}

body.light-mode .icon-box {
  background: #ffffff;
  color: #000000;
  border: 1px solid #d2d2d7;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

body.light-mode footer a {
  color: #000;
  text-decoration: none;
}

body.light-mode footer a:hover {
  opacity: 0.8;
}

/* Certifications Light Mode */
body.light-mode #certifications {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(59, 130, 246, 0.4);
}

body.light-mode #certifications h2 {
  color: #0f172a;
}

body.light-mode .certification-card {
  background: #ffffff;
  border: 2px solid #0f31f1;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.light-mode .certification-card:hover {
  border-color: #2546f0;
  background: #fcfcfd;
  box-shadow: 0 15px 40px rgba(15, 49, 241, 0.1);
}

/* ================= 6. MEDIA QUERIES ================= */

/* --- Desktop (min-width: 1024px) --- */
@media (min-width: 1024px) {
  #about {
    margin-bottom: 40px;
  }

  #services.section {
    margin-top: 0;
    margin-bottom: 50px;
    padding-bottom: 30px;
  }

  #skills.section {
    margin-top: 100px;
    padding-top: 0;
  }

  .section h2 {
    letter-spacing: 0.4px;
  }

  .section .subtitle {
    opacity: 0.85;
  }

  .service-card p,
  .project-card p {
    line-height: 1.7;
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .project-image {
    border-radius: 10px;
    transition: transform 0.3s ease;
  }

  .project-card:hover .project-image {
    transform: scale(1.03);
  }
}

/* --- Max-Width: 900px --- */
@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* --- Max-Width: 768px --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 65px;
  }

  .nav-inner {
    padding: 0 14px;
  }

  .logo {
    font-size: 16px;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: 0.3s ease;
  }

  .nav-links li {
    padding: 15px 0;
    text-align: center;
  }

  .nav-links.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .section h2 {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .subtitle {
    font-size: 14px;
    margin-bottom: 40px;
  }

  html,
  body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 30px);
    padding-bottom: 40px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero p {
    font-size: 14px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 90%;
    max-width: 260px;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  /* Hero Image & Badges on Mobile */
  .hero-image-wrapper {
    overflow: visible !important;
    padding: 0 12px;
  }

  .hero-image-container {
    width: min(260px, 70vw);
    height: min(260px, 70vw);
    overflow: visible;
    padding: 20px;
  }

  /* Profile Image Glow Mobile */
  .profile-image-frame {
    box-shadow:
      0 0 20px rgba(15, 49, 241, 0.35),
      0 0 40px rgba(15, 49, 241, 0.18);
  }

  .profile-image-glow {
    width: 140%;
    height: 140%;
    opacity: 0.6;
  }

  .floating-badge {
    transform: scale(0.72);
    padding: 0.6rem 0.9rem;
    min-width: 150px;
    transform-origin: center;
  }

  .floating-badge i {
    font-size: 1.3rem;
  }

  .badge-title {
    font-size: 0.8rem;
  }

  .badge-libs {
    font-size: 0.62rem;
  }

  /* Badge Positions Mobile */
  .badge-1 {
    top: 6%;
    right: -14%;
  }

  .badge-2 {
    bottom: 14%;
    right: -18%;
  }

  .badge-3 {
    top: 35%;
    left: -18%;
  }

  .section {
    padding: 70px 15px;
  }

  .glass {
    margin: 15px 10px;
    padding: 35px 15px;
  }

  .skills-grid,
  .projects-grid,
  .certifications-grid {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 60px 15px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* Scroll Indicator Mobile */
  .scroll-indicator {
    position: relative !important;
    bottom: auto !important;
    margin-top: 24px;
  }

  /* About & Projects Card Tuning Mobile */
  #about.glass,
  #projects.glass,
  #certifications.glass {
    margin: 20px 10px;
    padding: 30px 15px;
    width: auto;
    max-width: none;
  }

  /* Light Mode Mobile Menu */
  body.light-mode .nav-links {
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-top: 1px solid #e5e5ea;
  }

  body.light-mode .nav-links li a {
    color: #000000;
    font-weight: 500;
  }

  body.light-mode .nav-links li a:hover {
    color: #000000;
    opacity: 0.7;
  }
}

/* --- Max-Width: 600px --- */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }

  .section {
    padding: 60px 10px;
  }

  .glass {
    margin: 15px 5px;
    padding: 30px 15px;
  }

  .btn-project {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}