/* --- 1. Variables & Reset --- */
:root {
  --bg-color: #0a0a0a;
  --text-main: #ffffff;
  --text-muted: #a3a3a3;
  --primary: #6366f1;
  --secondary: #a855f7;
  --accent: #ec4899;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(10, 10, 10, 0.85);
  --blob-opacity: 0.4;
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --primary: #4f46e5;
  --secondary: #9333ea;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --blob-opacity: 0.15;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}

/*  Smooth Scroll Activation */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; 
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

a {
  text-decoration: none !important;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin-bottom: 1rem;
}
p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
.section {
  padding: 5rem 0;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
}

/* --- Navbar & Mobile Menu --- */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  padding: 0.8rem 2rem;
  z-index: 1000;
  border-radius: 50px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}
.logo .dot {
  color: var(--accent);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a:not(.btn-download) {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links a:not(.btn-download):hover {
  color: var(--text-main);
}
.btn-download {
  border: 1px solid var(--primary);
  padding: 8px 20px;
  border-radius: 30px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
}
.btn-download:hover {
  background: var(--primary);
  color: white;
}

/* Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
}
.icon-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1002;
}
.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: 0.3s;
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color); /* Fallback */
    background: rgba(10, 10, 10, 0.95); /* Deep Overlay */
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    gap: 2.5rem;
  }
  .nav-links.active {
    right: 0;
  }
  .nav-links a:not(.btn-download) {
    font-size: 1.5rem;
  } 
  .hamburger {
    display: flex;
  }
  .nav-right {
    gap: 1rem;
  }

  /* Hamburger Animation */
  .hamburger.toggle .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .hamburger.toggle .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.toggle .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}
.hero-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  justify-content: space-between;
}
.hero-text {
  flex: 1;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}
.job-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.badge {
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--primary);
  display: inline-block;
  margin-bottom: 1.5rem;
}
.hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}
.image-box {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  padding: 10px;
  position: relative;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform; 
}

.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  image-rendering: auto; 
}

/* --- Experience & Timeline --- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.timeline-card {
  padding: 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: 0.3s;
}
.timeline-card:hover {
  transform: translateX(5px);
  border-color: var(--primary);
}
.timeline-card .date {
  min-width: 140px;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 5px;
}
.timeline-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}
.timeline-card h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.tag {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
}

/*  3. Skills Section */
.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.skills-category h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 1rem;
  transition: 0.3s;
  cursor: default;
  border: 1px solid var(--glass-border);
}
.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
}
.skill-icon {
  font-size: 2.5rem;
  color: var(--text-main);
  transition: 0.3s;
}
.skill-card:hover .skill-icon {
  color: var(--primary);
  transform: scale(1.1);
}
.skill-card span {
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Projects Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.bento-item {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.4s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.bento-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}
.project-img-container {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.project-img-container img {
  max-width: 100%;
    height: auto;
    display: block; 
    object-fit: cover;
}
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 0;
  transition: 0.3s;
  font-weight: 600;
  gap: 8px;
}
.bento-item:hover .overlay {
  opacity: 1;
}
.bento-item:hover img {
  transform: scale(1.1);
}
.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.tech-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tech-stack span {
  font-size: 0.75rem;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}
.modal-content {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-color);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
}
.modal-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.modal-gallery {
  background: #000;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-gallery img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}
.modal-info {
  padding: 2rem;
}
.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
  }
  .modal-gallery,
  .modal-info {
    width: 50%;
  }
}

/* --- General UI --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover {
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  border: 2px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary:hover {
  background: var(--glass-border);
}

/* --- Footer --- */
.footer-section {
  text-align: center;
  margin-top: 4rem;
  padding-bottom: 3rem;
}
.big-text {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 800;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

/* --- Animations --- */
.background-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--blob-opacity);
}
.blob-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -10%;
  left: -10%;
  animation: float 8s infinite alternate;
}
.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -10%;
  right: -10%;
  animation: float 10s infinite alternate-reverse;
}
@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(30px, 30px);
  }
}
.profile-anim {
  animation: profileFloat 6s ease-in-out infinite;
}
@keyframes profileFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 {
  transition-delay: 0.1s;
}
.delay-2 {
  transition-delay: 0.2s;
}
[data-theme="dark"] .fa-sun {
  display: block;
}
[data-theme="dark"] .fa-moon {
  display: none;
}
[data-theme="light"] .fa-sun {
  display: none;
}
[data-theme="light"] .fa-moon {
  display: block;
}

/* Responsive Tweaks */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .cta-group {
    justify-content: center;
  }
  .image-box {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }
  .timeline-card {
    flex-direction: column;
    gap: 0.5rem;
  }
}
