/* General Styling */
:root {
    --primary-color-dark: #1A003D; /* Very Dark Purple */
    --primary-color-light: #2A0064; /* Darker Purple */
    --secondary-color: #5D00B8; /* Vibrant Purple */
    --accent-color-gold: #FFD700; /* Gold */
    --accent-color-teal: #00FFFF; /* Cyan/Teal for highlights */
    --text-color-light: #E0E0E0;
    --text-color-dark: #333;
    --card-bg: #22004D; /* Darker card background */
    --gradient-hero: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color-light) 100%);
    --gradient-button: linear-gradient(45deg, var(--accent-color-teal), var(--secondary-color));
    --gradient-card-border: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-color-gold) 100%);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Raleway', sans-serif;
    --border-radius-lg: 12px;
    --box-shadow-dark: 0 8px 25px rgba(0, 0, 0, 0.6);
    --box-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-color-light);
  background-color: var(--primary-color-dark);
  overflow-x: hidden;

  
}


/* Animated Night Sky Styles */

/* Nebula effect (animated gradient clouds) */
.nebula {
  position: fixed; /* Fixed position */
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(255,0,150,0.1), transparent 70%),
              radial-gradient(circle at 70% 60%, rgba(0,200,255,0.1), transparent 70%),
              radial-gradient(circle at 40% 80%, rgba(200,255,0,150,0.1), transparent 70%);
  animation: moveNebula 60s linear infinite;
  z-index: 0;
}

@keyframes moveNebula {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-20%, -10%) scale(1.2); }
  100% { transform: translate(0,0) scale(1); }
}

.moon {
  position: fixed; /* Fixed position */
  top: 150px;
  right: 100px;
  width: 100px;
  height: 100px;
  background: #f5f3ce;
  border-radius: 50%;
  box-shadow: 0 0 40px #f5f3ce;
  z-index: 2;
}

.star {
  position: fixed; /* Fixed position */
  background: white;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out;
  z-index: 1;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.shooting-star {
  position: fixed; /* Fixed position */
  width: 80px;
  height: 2px;
  background: white;
  transform: rotate(-45deg);
  animation: shoot 2s linear forwards;
  z-index: 3;
}

@keyframes shoot {
  0% {
    transform: translate(0,0) rotate(-45deg);
    opacity: 1;
  }
  100% {
    transform: translate(-400px, 400px) rotate(-45deg);
    opacity: 0;
  }
}




/* Ensure content is above particles */
header, main, footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 30px;
}

a {
    color: var(--accent-color-teal);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color-gold);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px; /* Pill shape */
    font-weight: 700;
    font-size: 1.05em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--box-shadow-light);
}

.btn.primary-btn {
    background: var(--gradient-button);
    color: var(--primary-color-dark);
}

.btn.primary-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.4);
}

.btn.secondary-btn {
    background: var(--secondary-color);
    color: var(--text-color-light);
    border: 2px solid var(--accent-color-teal);
}

.btn.secondary-btn:hover {
    background: var(--accent-color-teal);
    color: var(--primary-color-dark);
    border-color: var(--accent-color-teal);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.3);
}

.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-color-light);
    color: var(--accent-color-teal);
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid var(--accent-color-teal);
}

.btn-small:hover {
    background-color: var(--accent-color-teal);
    color: var(--primary-color-dark);
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--accent-color-teal);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--accent-color-gold);
    margin-bottom: 20px;
}

h2.section-title {
    font-size: 3em;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

h2.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--gradient-button);
    border-radius: 3px;
}

.section-padding {
    padding: 100px 0;
}

section:nth-child(even) {
    /* background-color: var(--primary-color-light); */
    backdrop-filter: blur(0.5px); /* Glassmorphism effect */
}

/* Header & Navigation */
header {
    background: var(--primary-color-dark);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow-dark);
    backdrop-filter: blur(5px); /* Glassmorphism effect */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

.logo {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--accent-color-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 40px;
    
}

.nav-links a {
    color: var(--text-color-light);
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: var(--gradient-button);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
    border-radius: 2px;
    
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
    
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color-gold);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 30px;
    height: 4px;
    background-color: var(--text-color-light);
    margin: 6px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Stack content on smaller screens */
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    /* background: var(--gradient-hero); */
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 1;
    max-width: 900px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: fadeInScale 1s ease-out forwards;
    opacity: 0;
    transform: scale(0.9);
}

.hero-content h1 {
    font-size: 4.5em;
    margin-bottom: 15px;
    color: var(--text-color-light);
}

.hero-content h1 .highlight {
    color: var(--accent-color-gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

.hero-content .tagline {
    font-size: 1.8em;
    margin-bottom: 40px;
    color: var(--accent-color-teal);
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-image {
    margin-top: 50px;
    z-index: 1;
}

.hero-image img {
    max-width: 400px;
    border-radius: 50%;
    border: 4px solid var(--accent-color-gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.4), 0 0 60px rgba(0, 255, 255, 0.4);
    transition: all 0.5s ease;
    object-fit: cover;
    width: 100%; /* Ensure responsiveness */
    height: 400px; /* Fixed height for circular crop */
}

.hero-image img:hover {
    transform: scale(1.05) rotateZ(3deg);
    box-shadow: 0 0 40px var(--accent-color-gold), 0 0 60px var(--accent-color-teal);
}

.social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.social-links a {
    font-size: 2.8em;
    color: var(--text-color-light);
    transition: all 0.3s ease;
    text-shadow: none;
}

.social-links a:hover {
    color: var(--accent-color-gold);
    transform: translateY(-8px) rotateZ(5deg);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Animations */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeInScale 1s ease-out forwards;
    opacity: 0;
    animation-delay: 0.5s; /* Delay image animation */
}

/* About Me Section */
.about-me .container {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

.about-text {
    flex: 2;
    min-width: 300px;
    text-align: left;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.15em;
    color: var(--text-color-light);
}

.about-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-dark);
    border: 3px solid var(--accent-color-teal);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.03) rotate(-2deg);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    text-align: center;
}

.skill-item {
    background: var(--card-bg);
    padding: 35px 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    border: 2px solid transparent; /* Initial transparent border */
    position: relative;
    overflow: hidden;
}

.skill-item::before { /* Animated border effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px; /* Controls border thickness */
    background: var(--gradient-card-border);
    -webkit-mask:
       linear-gradient(#fff 0 0) content-box,
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 40px var(--secondary-color);
}

.skill-item i {
    font-size: 4.5em;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    display: block; /* Ensures icon is centered */
}

.icon-gradient { /* For skill icons */
    background: var(--gradient-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Essential for clip to work */
}

.skill-item h3 {
    font-size: 1.5em;
    color: var(--accent-color-gold);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.skill-item p {
    font-size: 0.95em;
    color: var(--text-color-light);
    position: relative;
    z-index: 1;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.project-item {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow-light);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent; /* Initial transparent border */
    position: relative;
}

.project-item::before { /* Animated border effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px;
    background: var(--gradient-card-border);
    -webkit-mask:
       linear-gradient(#fff 0 0) content-box,
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-item:hover::before {
    opacity: 1;
}

.project-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 40px var(--accent-color-teal);
}

.project-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.project-item:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-info h3 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: var(--accent-color-gold);
}

.project-info p {
    font-size: 1em;
    margin-bottom: 15px;
    color: var(--text-color-light);
    flex-grow: 1;
}

.project-tags {
    margin-top: 10px;
    margin-bottom: 15px;
}

.project-tags span {
    display: inline-block;
    background: rgba(0, 255, 255, 0.15); /* Light teal background */
    color: var(--accent-color-teal);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--accent-color-teal);
}

.project-links {
    margin-top: auto; /* Pushes links to the bottom */
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}


/* Contact Section */
.contact-intro {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 50px;
    color: var(--text-color-light);
    font-weight: 300;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.contact-detail {
    background: var(--card-bg);
    padding: 35px 25px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.contact-detail::before { /* Animated border effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px;
    background: var(--gradient-card-border);
    -webkit-mask:
       linear-gradient(#fff 0 0) content-box,
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-detail:hover::before {
    opacity: 1;
}


.contact-detail:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px var(--accent-color-gold);
}

.contact-detail i {
    font-size: 3.5em;
    color: var(--accent-color-teal);
    margin-bottom: 20px;
}

.contact-detail h3 {
    font-size: 1.4em;
    color: var(--accent-color-gold);
    margin-bottom: 10px;
}

.contact-detail p {
    font-size: 1.1em;
    margin-bottom: 0;
}

.contact-detail p a {
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--primary-color-dark);
    color: var(--text-color-light);
    text-align: center;
    padding: 30px 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.6);
    border-top: 1px solid var(--primary-color-light);
}

.footer-social-links {
    margin-top: 25px;
}

.footer-social-links a {
    color: var(--text-color-light);
    font-size: 2em;
    margin: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--accent-color-gold);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5em;
    }
    .hero-content .tagline {
        font-size: 1.5em;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-image {
        order: -1;
    }
    .about-text {
        text-align: center;
    }
    .skill-item, .project-item, .contact-detail {
        padding: 30px 20px;
    }
    .skills-grid, .projects-grid, .contact-info-grid {
        gap: 30px;
    }
    h2.section-title {
        font-size: 2.5em;
        margin-bottom: 50px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        background: var(--primary-color-dark);
        height: 100vh;
        flex-direction: column;
        align-items: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999;
        box-shadow: -8px 0 20px rgba(0, 0, 0, 0.5);
        padding-top: 100px;
    }
    .nav-links li {
        margin: 25px 0;
        opacity: 50;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
        
    }

    .burger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.8em;
    }
    .hero-content .tagline {
        font-size: 1.2em;
    }
    .social-links a {
        font-size: 2.2em;
    }
    .hero-image img {
        max-width: 280px;
        height: 280px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .section-padding {
        padding: 60px 0;
    }
    h2.section-title {
        font-size: 2em;
        margin-bottom: 40px;
    }
    .container {
        padding: 15px 20px;
    }
    .moon {
        width: 50px;
        height: 50px;
        top: 100px;
        right: 50px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 100%;
    }
    .logo {
        font-size: 1.8em;
    }
    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content .tagline {
        font-size: 1em;
    }
    .social-links {
        gap: 20px;
    }
    .social-links a {
        font-size: 1.8em;
    }
    .skills-grid, .projects-grid, .contact-info-grid {
        grid-template-columns: 1fr;
    }
    .skill-item i {
        font-size: 3.5em;
    }
    .project-item img {
        height: 180px;
    }
    .project-info h3 {
        font-size: 1.4em;
    }
}

/* Burger Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
    opacity: 0;
}
.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

.iframe {
    z-index: 1;
}

.page-content {
  position: relative;
  z-index: 5; /* Animation se upar rakhein taki dikhe */
}