/* ==========================================================================
   MAZHAR SHAHZAD MUGHAL - PORTFOLIO DESIGN SYSTEM (PREMIUM LIGHT MODE)
   ========================================================================== */

/* Design Tokens & Variables */
:root {
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-hover-border: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #0284c7;
    --accent-color: #2563eb;
    
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #edf2f7 50%, #e2e8f0 100%);
    --gradient-badge: linear-gradient(135deg, #e0e7ff 0%, #e0f2fe 100%);
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 25px 35px -5px rgba(79, 70, 229, 0.15), 0 15px 15px -5px rgba(2, 132, 199, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section Header Shared */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    margin: 0.5rem auto 0;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Gradient Text Effect */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.85rem 0;
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.nav-logo .dot {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 2.25rem;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    background: var(--gradient-hero);
    position: relative;
}

.hero-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: var(--gradient-badge);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-text h1 {
    font-size: 3.25rem;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.25rem;
    line-height: 1.7;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-card {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-avatar {
    width: 320px;
    height: 320px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 5px solid #ffffff;
    background: var(--gradient-primary);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--card-border);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-color);
    animation: float 4s ease-in-out infinite;
}

.floating-element::after {
    content: attr(data-text);
}

.floating-element:nth-child(1) { top: 10%; left: -10%; animation-delay: 0s; }
.floating-element:nth-child(2) { top: 75%; left: -5%; animation-delay: 1s; }
.floating-element:nth-child(3) { top: 15%; right: -5%; animation-delay: 2s; }
.floating-element:nth-child(4) { top: 70%; right: -10%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.stat h4 {
    font-size: 2.25rem;
    color: var(--primary-color);
    font-weight: 800;
}

.stat p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.about-skills-preview h4 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.interest-tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

.tag i {
    color: var(--primary-color);
}

.tag:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--card-hover-border);
}

.skill-icon {
    width: 55px;
    height: 55px;
    background: var(--gradient-badge);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.skill-level {
    width: 100%;
    height: 7px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 1s ease-in-out;
}

/* Projects Section & Filtering */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-main);
    border-color: var(--card-hover-border);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--card-hover-border);
}

.project-image {
    height: 210px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
}

.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumb {
    transform: scale(1.06);
}

.icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--primary-color);
    background: var(--gradient-badge);
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.project-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.project-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.project-link.secondary-link {
    color: var(--text-muted);
}

.project-link.secondary-link:hover {
    color: var(--text-main);
}

.projects-cta {
    text-align: center;
}

/* Resume Callout Section */
.resume-section {
    padding: 5rem 0;
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: var(--radius-lg);
    margin: 2rem auto;
    max-width: 1240px;
}

.resume-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.resume-text h2 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.resume-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.download-btn {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    background: #f8fafc;
    color: var(--primary-hover);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-badge);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.contact-details p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Footer */
.footer {
    padding: 2.5rem 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-text p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content, .about-content, .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-text h1 {
        font-size: 2.75rem;
    }

    .resume-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        box-shadow: var(--shadow-md);
        transition: 0.3s;
    }
    
    .nav-menu.active {
        left: 0;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

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