/* Reset / base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 50px;
    background: rgba(10, 10, 10, 0.95);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hamburger (hidden on desktop) */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}
.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle.open .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 72px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 24px;
    color: #aaa;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* About Section */
.about {
    padding: 100px 50px;
    max-width: 1200px;
    margin: 80px auto 0; /* offset for fixed nav */
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.about.visible {
    opacity: 1;
    transform: translateY(0);
}

.about h2 {
    font-size: 48px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about p {
    font-size: 18px;
    line-height: 1.8;
    color: #ccc;
}

/* Skills Section */
.skills {
    padding: 100px 50px;
    background: rgba(102, 126, 234, 0.05);
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.skills-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills h2 {
    font-size: 48px;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    position: relative;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 0;
    pointer-events: none;
}
.skill-card * { position: relative; z-index: 1; }

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
}

.skill-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #a8b7ff;
}

.skill-card p {
    color: #ddd;
    line-height: 1.6;
}

/* Optional background images (set these classes or inline styles if you want images) */
.skill-card.web-dev { background-image: url('asets/webdev.jpg'); background-size: cover; background-position: center; }
.skill-card.ui-ux { background-image: url('asets/uiux.jpg'); background-size: cover; background-position: center; }
.skill-card.mobile-apps { background-image: url('asets/mobile.jpg'); background-size: cover; background-position: center; }
.skill-card.brand { background-image: url('asets/brand.jpg'); background-size: cover; background-position: center; }

/* Projects Section */
.projects {
    padding: 100px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-container {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.projects-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.projects h2 {
    font-size: 48px;
    margin-bottom: 50px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #111;
}
.project-card:focus { outline: 2px solid rgba(118,75,162,0.35); }

.project-card:hover {
    transform: scale(1.03);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* gradient overlay using ::before (correct linear-gradient) */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102,126,234,0.9) 0%, rgba(118,75,162,0.9) 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
    z-index: 1;
}

/* Popup content shown on hover - centered */
.project-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.98);
    color: #fff;
    text-align: center;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.28s ease, transform 0.28s ease;
    padding: 12px 18px;
    max-width: 85%;
    border-radius: 8px;
    pointer-events: none;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
}

/* show overlay & popup on hover or focus (keyboard accessible) */
.project-card:hover::before,
.project-card:focus::before {
    opacity: 0.85;
}
.project-card:hover .project-popup,
.project-card:focus .project-popup {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* project content (title) */
.project-content {
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 3;
}
.project-content h3 {
    font-size: 22px;
    margin-bottom: 6px;
    color: #fff;
}
.project-content p {
    color: #eee;
    font-size: 14px;
}

/* Contact Section */
.contact {
    padding: 100px 50px;
    background: rgba(102, 126, 234, 0.05);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.contact-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact h2 {
    font-size: 48px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact p {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Floating Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.12;
    animation: float 6s ease-in-out infinite;
}

.shape1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape3 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.08);
}

/* ---------- Mobile Responsive (nav + layout tweaks) ---------- */
@media (max-width: 900px) {
  nav {
    padding: 12px 20px;
  }

  .menu-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px; /* below nav */
    right: 0;
    width: 260px;
    max-width: 80%;
    height: calc(100% - 64px);
    background: rgba(8,8,8,0.98);
    backdrop-filter: blur(6px);
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.2,.9,.2,1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.6);
    z-index: 1050;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 18px;
    padding: 8px 0;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 18px; }

  .about, .skills, .projects, .contact {
    padding: 60px 20px;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
  }

  .skill-card {
    padding: 20px;
    height: 220px;
  }

  .project-grid {
    grid-template-columns: 1fr; /* stack project cards */
    gap: 18px;
  }

  .project-card {
    height: auto;
  }

  .project-image {
    height: 180px;
  }

  .project-content {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 16px;
    z-index: 3;
  }

  /* make overlay less intrusive on mobile */
  .project-card::before { opacity: 0.6; }
  .project-popup { opacity: 1; transform: translate(-50%, -50%) scale(1); background: rgba(0,0,0,0.35); pointer-events: none; }

  .contact-container { padding: 10px; }

  .shape1, .shape2, .shape3 { display: none; }
}

@media (max-width: 420px) {
  nav { padding: 10px 14px; }
  .logo { font-size: 20px; }
  .cta-button { padding: 12px 28px; font-size: 14px; }
  .skills h2, .projects h2, .about h2, .contact h2 { font-size: 34px; }
  .skill-card { height: 200px; padding: 16px; }
  .project-image { height: 150px; }
  .whatsapp-float { width: 48px; height: 48px; right: 14px; bottom: 14px; }
}
