* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.15;
}

.bg-animation::before,
.bg-animation::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 20s infinite ease-in-out;
}

.bg-animation::before {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.bg-animation::after {
  width: 400px;
  height: 400px;
  background: var(--secondary);
  bottom: -10%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, 100px) scale(1.1);
  }
  50% {
    transform: translate(100px, 50px) scale(0.9);
  }
  75% {
    transform: translate(-50px, -50px) scale(1.05);
  }
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 1rem 5%;
  background: rgba(15, 23, 42, 0.95);
}

.logo img{
  width: 50px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 5% 4rem;
  position: relative;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-text h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text h2 {
  font-size: 2rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-container {
  position: relative;
  width: 400px;
  height: 400px;
}

.profile-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
    var(--gradient) border-box;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.profile-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  color: var(--primary);
}

.profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-dark);
}

/* Tech Stack Floating Icons */
.tech-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.tech-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: floatIcon 3s ease-in-out infinite;
}

.tech-icon:nth-child(1) {
  animation-delay: 0s;
}
.tech-icon:nth-child(2) {
  animation-delay: 0.2s;
}
.tech-icon:nth-child(3) {
  animation-delay: 0.4s;
}
.tech-icon:nth-child(4) {
  animation-delay: 0.6s;
}
.tech-icon:nth-child(5) {
  animation-delay: 0.8s;
}
.tech-icon:nth-child(6) {
  animation-delay: 1s;
}

@keyframes floatIcon {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.tech-icon:hover {
  transform: translateY(-5px) scale(1.1);
  background: var(--gradient);
  border-color: transparent;
}

/* About Section */
.about {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.skill-item h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.skill-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* -------------------------------------------------
   1. SECTION & SLIDER
   ------------------------------------------------- */
.projects {
  padding: 6rem 5%;
  background: rgba(30, 41, 59, 0.3);
  overflow: hidden;
}

.projects-slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.45s ease-in-out;
  gap: 2rem;
}

/* -------------------------------------------------
   2. CARD SIZING (responsive)
   ------------------------------------------------- */
.project-card {
  flex: 0 0 calc(100% / 3 - 2rem * 2 / 3);   /* 3 cards on desktop */
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

/* Tablet: 2 cards */
@media (max-width: 1024px) {
  .project-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

/* Mobile: 1 card */
@media (max-width: 640px) {
  .project-card {
    flex: 0 0 calc(100% - 2rem);
  }
}

/* -------------------------------------------------
   3. HOVER EFFECTS
   ------------------------------------------------- */
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
}

/* -------------------------------------------------
   4. IMAGE FIT (your original + enhancements)
   ------------------------------------------------- */
.project-image {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.project-card:hover .project-image img {
  transform: scale(1.08);
}

/* Emoji placeholder fallback */
.project-image:not(:has(img)) {
  font-size: 3.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  position: relative;
  z-index: 0;
}

/* -------------------------------------------------
   5. CONTENT
   ------------------------------------------------- */
.project-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
}

.link-demo {
  background: var(--primary);
  color: white;
}

.link-demo:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.link-code {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--primary);
}

.link-code:hover {
  background: var(--primary);
  color: white;
}

/* -------------------------------------------------
   6. NAVIGATION BUTTONS
   ------------------------------------------------- */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background .3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: rgba(0,0,0,.8);
}

.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

/* Certificates Section */
.certificates {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.cert-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.cert-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cert-card h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

.cert-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Contact Section */
.contact {
  padding: 6rem 5%;
  background: rgba(30, 41, 59, 0.3);
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.contact-item {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.contact-item span:first-child {
  font-size: 1.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--gradient);
  border-color: transparent;
  transform: translateY(-5px) scale(1.1);
}

/* Footer */
footer {
  padding: 2rem 5%;
  text-align: center;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 968px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: rgba(15, 23, 42, 0.98);
    flex-direction: column;
    padding: 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .profile-container {
    width: 300px;
    height: 300px;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .tech-icons {
    justify-content: center;
  }
}

/* -------------------------------------------------
   CONTACT SECTION ENHANCEMENT
   ------------------------------------------------- */

/* CV Download Container */
.cv-download {
  margin: 2rem 0 3rem 0;
  text-align: center;
}

/* Download CV Button */
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
  border: 2px solid transparent;
  white-space: nowrap;
}

.cv-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
}

.cv-btn:active {
  transform: translateY(0);
}

/* Icon inside button */
.cv-btn::before {
  content: '';
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 15l-6-6h12z"/></svg>') no-repeat center;
  background-size: contain;
}

/* Responsive: Smaller button on mobile */
@media (max-width: 640px) {
  .cv-btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    gap: 0.5rem;
  }
}

/* Optional: Pulse animation on load */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.cv-download .cv-btn {
  animation: pulse 2s infinite;
}
