@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --border-color: #334155;
    --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);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

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

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

/* Footer styling */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
}

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

.footer-info p {
    color: var(--text-secondary);
    margin: 0;
}

.footer-contact {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.contact-link:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.contact-link i {
    color: var(--primary-color);
    font-size: 1rem;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

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

.nav-links li {
    position: relative;
}

.nav-links a,
.nav-links .social-dropdown-btn {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
}

.nav-links a::before,
.nav-links .social-dropdown-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.nav-links a:hover::before,
.nav-links .social-dropdown-btn:hover::before,
.nav-links a.active::before {
    left: 0;
}

.nav-links a:hover,
.nav-links .social-dropdown-btn:hover,
.nav-links a.active {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.social-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-links li:hover .social-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 1.08rem;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.social-link i {
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: color 0.18s;
}

.social-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.social-link:hover i {
    color: #fff;
}

/* Header */
header {
    background: var(--gradient-primary);
    padding: 60px 0 60px 0;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.header-text h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.header-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 6px;
}

.header-text .subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
}

.header-text .institution {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.header-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Main content */
main {
    padding: 80px 0;
    margin-top: 120px;
    /* Increased margin to account for fixed navbar and prevent overlap */
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
}

/* Ensure first section has proper spacing */
main>section:first-child {
    margin-top: 0;
    /* Remove top margin from first section since main already has margin */
}

section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
    /* Add scroll margin to prevent overlap with fixed navbar */
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    margin-top: 40px;
    /* Increased top margin to ensure proper spacing from navbar */
    text-align: center;
    position: relative;
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
}

h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.about {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
    /* Add scroll margin to prevent overlap with fixed navbar */
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.about p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

/* Stats section */
.stats-section {
    margin: 80px 0;
    scroll-margin-top: 100px;
    /* Add scroll margin to prevent overlap with fixed navbar */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

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

.stat-icon i {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Skills section */
.skills-slider-section {
    text-align: center;
    margin-top: 80px;
    /* Ensure proper spacing from previous section */
    scroll-margin-top: 100px;
    /* Add scroll margin to prevent overlap with fixed navbar */
}

.skills-slider {
    overflow: hidden;
    margin: 40px 0;
    position: relative;
    touch-action: pan-x;
}

.skills-track {
    display: flex;
    gap: 24px;
    animation: scroll 30s linear infinite;
    width: max-content;
    will-change: transform;
}

.skills-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 24px;
    min-width: 200px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.skill-card i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    display: block;
}

.skill-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Buttons */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    transition: left 0.3s ease;
    z-index: -1;
}

.download-btn:hover::before {
    left: 0;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Projects section */
.projects {
    text-align: center;
    margin-top: 60px;
    /* Further increased spacing from navigation to prevent navbar overlap */
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
    padding-top: 40px;
    /* Increased padding to ensure content doesn't overlap with navbar */
}

/* Specific fix for projects page to prevent navbar overlap */
.projects h2 {
    margin-top: 60px;
    /* Extra margin for projects page heading */
    padding-top: 20px;
    /* Additional padding for projects page heading */
}

/* Specific fixes for other pages to prevent navbar overlap */
.resume-section h2 {
    margin-top: 60px;
    /* Extra margin for resume page heading */
    padding-top: 20px;
    /* Additional padding for resume page heading */
}

.details-section h2 {
    margin-top: 60px;
    /* Extra margin for details page heading */
    padding-top: 20px;
    /* Additional padding for details page heading */
}

.project-detail h2 {
    margin-top: 60px;
    /* Extra margin for project detail page headings */
    padding-top: 20px;
    /* Additional padding for project detail page headings */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

.project-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Project detail page */
.project-detail {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-top: 60px;
    /* Further increased top margin for project detail pages to prevent navbar overlap */
    padding-top: 60px;
    /* Additional top padding to ensure content doesn't overlap with navbar */
}

.project-detail h2 {
    text-align: left;
    margin-bottom: 24px;
    margin-top: 60px !important;
    /* Force top margin on project detail headings to prevent navbar overlap */
    padding-top: 20px !important;
    /* Force top padding to ensure content doesn't overlap with navbar */
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
}

/* Specific fix for the first h2 (project name) in project detail pages */
.project-detail h2:first-of-type {
    margin-top: 80px !important;
    /* Extra margin for the project name heading */
    padding-top: 30px !important;
    /* Extra padding for the project name heading */
}

/* Tech Stack Slider Animation */
.tech-slider {
    overflow: hidden;
    margin: 40px 0;
    position: relative;
    touch-action: pan-x;
}

/* New sections styling */
.internships-section,
.education-section,
.certifications-section,
.resume-download-section {
    margin-top: 80px;
    /* Ensure proper spacing from previous section */
    scroll-margin-top: 100px;
    /* Add scroll margin to prevent overlap with fixed navbar */
}

.company-info,
.institution-info,
.certification-issuer {
    color: var(--primary-color);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.duration {
    color: var(--text-muted);
    font-weight: 400;
}

.resume-download-section {
    text-align: center;
}

.resume-download-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tech-track {
    display: flex;
    gap: 24px;
    animation: scroll 30s linear infinite;
    width: max-content;
    will-change: transform;
}

.tech-track:hover {
    animation-play-state: paused;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px 24px;
    min-width: 160px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.project-detail h2::after {
    left: 0;
    transform: none;
}

.project-detail h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 32px 0 16px 0;
    font-weight: 600;
}

.project-detail p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.feature-card {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.feature-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.feature-card ul {
    list-style: none;
    padding: 0;
}

.feature-card li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

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

/* Resume section */
.resume-section {
    text-align: center;
    margin-top: 40px;
    /* Add margin to prevent navbar overlap */
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
    padding-top: 20px;
    /* Additional padding to ensure content doesn't overlap with navbar */
}

.resume-preview {
    width: 100%;
    min-height: 80vh;
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin: 32px 0;
}

/* Details section */
.details-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-top: 40px;
    /* Add margin to prevent navbar overlap */
    scroll-margin-top: 120px;
    /* Increased scroll margin to prevent overlap with fixed navbar */
}

.details-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.details-section h2 {
    text-align: left;
    margin-bottom: 32px;
}

.details-section h2::after {
    left: 0;
    transform: none;
}

.details-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 32px 0 16px 0;
    font-weight: 600;
}

.details-section ul,
.details-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-list i {
    color: var(--primary-color);
    width: 20px;
}


.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.skills-list li {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skills-list li:hover {
    background: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
    margin-top: 80px;
}

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

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

/* Mobile adjustments for FAB */
@media (max-width: 768px) {
    .fab {
        bottom: 20px;
        right: 20px;
    }

    .fab-button {
        width: 48px;
        height: 48px;
    }

    .fab-button i {
        font-size: 1rem;
    }
}

/* Ensure navbar doesn't overlap content on mobile */
@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }

    .nav-content {
        height: 70px;
    }
}

.fab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.fab-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
}

.fab-button i {
    font-size: 1.2rem;
}

.fab.show .fab-button {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scroll to top functionality */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    align-items: center;
    gap: 8px;
}

.mobile-menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.mobile-menu-btn:hover::before {
    left: 0;
}

.mobile-menu-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.mobile-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-btn:hover .mobile-menu-dropdown,
.mobile-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 1.08rem;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.mobile-menu-link i {
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: color 0.18s;
    width: 20px;
    text-align: center;
}

.mobile-menu-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.mobile-menu-link:hover i {
    color: #fff;
}

/* Mobile Submenu Styles */
.mobile-submenu-container {
    position: relative;
}

.mobile-submenu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 1.08rem;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    text-align: left;
    position: relative;
}

.mobile-submenu-btn i:first-child {
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: color 0.18s;
    width: 20px;
    text-align: center;
}

.mobile-submenu-btn i:last-child {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mobile-submenu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.mobile-submenu-btn:hover i:first-child {
    color: #fff;
}

.mobile-submenu-btn.active i:last-child {
    transform: rotate(90deg);
}

.mobile-submenu-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 8px;
}

.mobile-submenu-container:hover .mobile-submenu-dropdown,
.mobile-submenu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 10px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s ease;
    font-size: 1.08rem;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.mobile-submenu-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 15px;
    }

    /* Ensure container has proper spacing on mobile */
    .container:first-child {
        margin-top: 0;
    }

    .nav-content {
        height: 70px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .nav-logo {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-dropdown {
        right: 10px;
        min-width: 180px;
    }

    .mobile-submenu-dropdown {
        left: auto;
        right: 0;
        margin-left: 0;
        margin-right: 8px;
        min-width: 160px;
    }


    header {
        padding: 40px 0 40px 0;
        margin-top: 70px;
    }

    /* Ensure header content is properly spaced on mobile */
    header .header-content {
        padding-top: 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .header-text h1 {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }

    .header-text .subtitle {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .header-text .institution {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .header-badges {
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    main {
        padding: 60px 0;
        margin-top: 70px;
        /* Adjust margin for mobile navbar height */
    }

    section {
        margin-bottom: 60px;
    }

    /* Ensure sections have proper spacing on mobile */
    section:first-child {
        margin-top: 0;
    }

    h2 {
        font-size: 2rem;
    }

    /* Ensure h2 headings have proper spacing on mobile */
    h2:first-child {
        margin-top: 0;
    }

    .about,
    .project-detail,
    .details-section {
        padding: 32px 24px;
    }

    .about {
        margin-top: 0;
        /* Remove top margin on mobile for about section */
    }

    .project-detail {
        margin-top: 50px;
        /* Further increased top margin on mobile to prevent navbar overlap */
        padding-top: 40px;
        /* Additional top padding on mobile */
    }

    .details-section {
        margin-top: 30px;
        /* Increased top margin on mobile to prevent navbar overlap */
    }

    .resume-section {
        margin-top: 30px;
        /* Increased top margin on mobile to prevent navbar overlap */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-contact {
        justify-content: center;
        gap: 16px;
    }

    .contact-link {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

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

    .projects {
        margin-top: 50px;
        /* Further increased top margin on mobile to prevent navbar overlap */
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .skills-track {
        animation: scroll 20s linear infinite;
    }

    .skill-card {
        min-width: 160px;
        padding: 24px 16px;
    }

    .tech-track {
        animation: scroll 20s linear infinite;
    }

    .tech-card {
        min-width: 140px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .skills-slider-section {
        margin-top: 40px;
        /* Reduce top margin on mobile */
    }

    .internships-section,
    .education-section,
    .certifications-section,
    .resume-download-section {
        margin-top: 40px;
        /* Reduce top margin on mobile */
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stats-section {
        margin: 40px 0;
        /* Reduce margins on mobile */
    }

    .stat-card {
        padding: 24px 16px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 2rem;
    }

    .header-text .subtitle {
        font-size: 1.1rem;
    }

    .header-text .institution {
        font-size: 0.9rem;
    }

    .header-badges {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        width: 100%;
        text-align: center;
    }

    .about,
    .project-detail,
    .details-section {
        padding: 24px 16px;
    }

    .skill-card {
        min-width: 140px;
        padding: 20px 12px;
    }

    .skill-card i {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 20px 16px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .skills-track {
        animation: scroll 15s linear infinite;
    }

    .tech-track {
        animation: scroll 15s linear infinite;
    }
}