/* Base Styles */
:root {
    --primary-color: #be185d;
    --primary-light: #ec4899;
    --primary-dark: #9d174d;
    --secondary-color: #f97316;
    --accent-color: #e11d48;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #fef7ff;
    --bg-accent: #fdf2f8;
    --border-color: #f9a8d4;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn:active {
    transform: translateY(0);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.5rem auto;
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: var(--bg-accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.05;
    border-radius: 50%;
    transform: rotate(15deg);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Skills Section */
.skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-accent);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Experience Section */
.experience {
    background: var(--bg-primary);
}

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

.experience-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.experience-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.experience-card .company {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.experience-card .company-link {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.experience-card .company-link:hover {
    color: var(--primary-color);
}

.experience-card .date,
.experience-card .location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.experience-card .achievements {
    list-style: none;
    margin-top: 1.5rem;
}

.experience-card .achievements li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.experience-card .achievements li::before {
    content: "▸";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

/* Project Inspiration Styling */
.project-inspiration {
    background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-secondary) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.2rem;
    margin: 1.5rem 0;
    border-radius: 0 12px 12px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 80px; /* Uniform height */
    display: flex;
    align-items: center;
}

.project-inspiration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(236, 72, 153, 0.05) 100%);
    pointer-events: none;
}

.project-inspiration:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--secondary-color);
}

.inspiration-icon {
    display: inline-block;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

.project-inspiration p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.project-inspiration strong {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Enhanced project card styling */
.project-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Project Images - Fixed styling and performance */
.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    display: block;
    background-color: #f0f0f0;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.02);
}

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

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    position: relative;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.project-card:hover h3::after {
    width: 50px;
}

.project-card p {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* About Section */
.about {
    background: var(--bg-primary);
}

.about-minilinks {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.about-minilinks a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    background: var(--bg-accent);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-minilinks a:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-image {
    position: relative;
}

/* About Me Image - Performance optimized */
.about-image img {
    width: 100%;
    max-width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: block;
    background-color: #f0f0f0;
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-content h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-content .section-divider {
    margin: 1rem 0 2rem 0;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Education Section */
.edu-section {
    margin-bottom: 4rem;
}

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

.edu-item {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.edu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Education Icons - Performance optimized */
.edu-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: var(--bg-primary);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    display: block;
    transition: transform 0.3s ease;
}

.edu-icon:hover {
    transform: scale(1.1);
}

.edu-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Awards Section */
.awards-section {
    margin-bottom: 4rem;
}

.awards-flex {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.trophy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.trophy-icon svg {
    width: 60px;
    height: 60px;
    fill: white;
}

.awards-list {
    list-style: none;
}

.awards-list li {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.awards-list li::before {
    content: "🏆";
    position: absolute;
    left: 0;
    top: 0;
}

.awards-list a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

/* Certifications Section */
.certs-section {
    margin-bottom: 4rem;
}

.certs-img-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Certification Images - Performance optimized */
.cert-img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: block;
}

.cert-img:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Talks Section */
.talks-section {
    margin-bottom: 4rem;
}

.talks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Talks Image - Performance optimized */
.talks-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: block;
    background-color: #f0f0f0;
    transition: transform 0.3s ease;
}

.talks-img:hover {
    transform: scale(1.02);
}

.talks-text-col h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.talks-text-col .section-divider {
    margin: 1rem 0 2rem 0;
}

.talks-text-col p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.talks-text-col a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.email-btn {
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 3rem 0 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }
    
    .about-container,
    .talks-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-content h2,
    .talks-text-col h2 {
        text-align: center;
    }
    
    .awards-flex {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .trophy-icon {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-links.open {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .hero {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .skills-container,
    .experience-container,
    .projects-container {
        grid-template-columns: 1fr;
    }
    
    .edu-list {
        grid-template-columns: 1fr;
    }
    
    .certs-img-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .about-minilinks {
        gap: 0.5rem;
    }
    
    .about-minilinks a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skill-category,
    .experience-card,
    .project-content,
    .edu-item {
        padding: 1.5rem;
    }
    
    .awards-flex {
        padding: 2rem 1.5rem;
    }
    
    .certs-img-row {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Performance optimizations */
img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Lazy loading for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Image loading skeleton */
.image-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}