/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Variables - High Contrast for Accessibility */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gray-color: #6b7280;
    --success-color: #10b981;
    --easy-color: #00b8a3;
    --medium-color: #ffc01e;
    --hard-color: #ff375f;

    /* High Contrast Light Mode Colors */
    --bg-color: #ffffff;
    --text-color: #111827;  /* Darker for better contrast */
    --text-muted: #4b5563;  /* Darker for better contrast */
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* High Contrast Dark Mode Colors */
    --dark-bg: #0f172a;
    --dark-bg-alt: #1e293b;
    --dark-text: #f8fafc;  /* Lighter for better contrast */
    --dark-text-muted: #cbd5e1;  /* Lighter for better contrast */
    --dark-border: #374151;
    --dark-shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Dark Mode Styles */
body.dark-mode {
    --bg-color: var(--dark-bg);
    --text-color: var(--dark-text);
    --text-muted: var(--dark-text-muted);
    --card-bg: var(--dark-bg-alt);
    --border-color: var(--dark-border);
    --shadow-color: var(--dark-shadow);
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 1100;
    transition: width 0.1s ease;
}

/* Navigation - Improved Mobile-First Approach */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow-color);
    transition: all 0.3s ease;
}

body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    cursor: pointer;
    z-index: 1001;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.nav-logo:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    display: block;
    min-height: 44px; /* Minimum touch target size */
    line-height: 1.5;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--primary-color);
    outline: none;
}

.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
    width: 100%;
}

/* Dark Mode Toggle - Improved Accessibility */
.dark-mode-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin-left: 1rem;
    position: relative;
    z-index: 1001;
}

.dark-mode-toggle:hover,
.dark-mode-toggle:focus {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    outline: none;
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Hamburger Menu - Improved Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: transparent;
    border: none;
    padding: 8px;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.hamburger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 150px 0 100px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #e0e7ff;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #cbd5e1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    min-height: 48px; /* Accessibility - minimum touch target */
    justify-content: center;
}

.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #be185d;
    border-color: #be185d;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-outline:hover,
.btn-outline:focus {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-icon {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.code-icon i {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 6px 20px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.highlight i {
    color: var(--primary-color);
    font-size: 1.5rem;
    min-width: 24px;
}

.highlight span {
    font-weight: 500;
    color: var(--text-color);
}

.about-facts {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.about-facts h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.about-facts ul {
    list-style: none;
}

.about-facts li {
    padding: 0.8rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 2rem;
    line-height: 1.6;
}

.about-facts li::before {
    content: '▶';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1rem;
    top: 0.8rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Skills Section */
.skills {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

body.dark-mode .skills {
    background: linear-gradient(135deg, var(--dark-bg-alt) 0%, var(--dark-bg) 100%);
}

.skills-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-item {
    background: var(--card-bg);
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.skill-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.skill-item:hover::before {
    left: 100%;
}

.skill-item:hover::after {
    opacity: 0.08;
}

.skill-item:hover,
.skill-item:focus {
    transform: translateY(-12px) scale(1.06);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

.skill-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.skill-item:hover i {
    color: var(--secondary-color);
    transform: scale(1.3) rotate(8deg);
    filter: drop-shadow(0 5px 15px rgba(99, 102, 241, 0.4));
}

.skill-item span {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.skill-item:hover span {
    color: var(--primary-color);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.skill-tag {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    min-height: 48px;
    display: flex;
    align-items: center;
}

.skill-tag:hover,
.skill-tag:focus {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    outline: none;
}

.skill-tag:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Projects Section */
.projects {
    background: linear-gradient(135deg, #f9fafb 0%, #ede9fe 100%);
}

body.dark-mode .projects {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-alt) 100%);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.project-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon i {
    font-size: 2rem;
    color: white;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.project-tech span {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
    min-height: 44px;
}

.project-links a:hover,
.project-links a:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    outline: none;
}

.project-links a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.github-cta {

/* Enhanced Projects Section Animations */
.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes backgroundFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.project-card {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-card:hover {
    transform: translateY(-20px) scale(1.05) rotateX(5deg);
    box-shadow: 0 35px 80px rgba(99, 102, 241, 0.25), 0 15px 35px rgba(236, 72, 153, 0.15), inset 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.project-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-icon {
    transform: scale(1.2) rotate(8deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4);
}

.project-card:hover .project-icon i {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(255, 255, 255, 0.3));
}

.project-card h3 {
    transition: all 0.3s ease;
}

.project-card:hover h3 {
    color: var(--primary-color);
    transform: translateX(5px);
}

.project-tech span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-tech span {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.project-links a {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-links a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.github-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Certifications Section */
.certifications {
    background: var(--bg-color);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.cert-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
}

.cert-card:hover {
    transform: translateY(-12px) scale(1.04);
    box-shadow: 0 25px 60px rgba(16, 185, 129, 0.2);
    border-color: var(--success-color);
}

.cert-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.cert-card:hover::after {
    opacity: 1;
}

.cert-card > * {
    position: relative;
    z-index: 1;
}

.cert-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.cert-icon i {
    font-size: 2.5rem;
    color: white;
}

.cert-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.cert-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Coding Stats Section */
.coding-stats {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

body.dark-mode .coding-stats {
    background: linear-gradient(135deg, var(--dark-bg-alt) 0%, var(--dark-bg) 100%);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.platform-stats {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.platform-header h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.leetcode-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.leetcode-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffa116, #ffb347);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leetcode-icon i {
    font-size: 1.5rem;
    color: white;
}

.leetcode-info h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.username {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.total-solved {
    text-align: center;
    margin-bottom: 2rem;
}

.total-circle {
    width: 120px;
    height: 120px;
    border: 8px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.circle-progress {
    text-align: center;
    color: white;
}

.total-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.total-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty {
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.difficulty.easy {
    background: var(--easy-color);
    color: white;
}

.difficulty.medium {
    background: var(--medium-color);
    color: white;
}

.difficulty.hard {
    background: var(--hard-color);
    color: white;
}

.solved {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.progress-fill.easy {
    background: var(--easy-color);
}

.progress-fill.medium {
    background: var(--medium-color);
}

.progress-fill.hard {
    background: var(--hard-color);
}

.hackerrank-content {
    margin-top: 2rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.badge {
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.badge i {
    font-size: 1.5rem;
}

.badge span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: var(--bg-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    min-height: 48px;
}

.contact-link:hover,
.contact-link:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-color);
    background: var(--primary-color);
    color: white;
    outline: none;
}

.contact-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.contact-link i {
    font-size: 1.3rem;
    color: var(--primary-color);
    min-width: 24px;
}

.contact-link:hover i {
    color: white;
}

.contact-stats h3 {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    min-height: 48px;
}

.profile-stat:hover,
.profile-stat:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-color);
    background: var(--secondary-color);
    color: white;
    outline: none;
}

.profile-stat:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.profile-stat i {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.profile-stat:hover i {
    color: white;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
}

body.dark-mode .footer {
    background: var(--dark-bg-alt);
}

.footer p {
    margin: 0;
    font-size: 1rem;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .code-icon {
        width: 200px;
        height: 200px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation - Compact Design */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 85%;
        max-width: 320px;
        height: auto;
        min-height: 100vh;
        text-align: center;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.15);
        padding: 6rem 1.5rem 3rem;
        border: none;
        z-index: 1000;
        overflow-y: auto;
        justify-content: flex-start;
        align-items: center;
        gap: 0.5rem;
        border-radius: 0 25px 25px 0;
    }

    body.dark-mode .nav-menu {
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.4);
    }
    
    .nav-menu.active {
        left: 0;
    }

    /* Mobile Menu Overlay */
    .nav-menu.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 85%;
        width: 15%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
        backdrop-filter: blur(2px);
    }
    
    .nav-item {
        width: 100%;
        max-width: 280px;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
        background: rgba(99, 102, 241, 0.08);
        margin: 0.3rem 0;
        width: 100%;
        text-align: center;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        border: 1px solid rgba(99, 102, 241, 0.1);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background: var(--primary-color);
        color: white;
        transform: scale(1.02);
    }
    
    .dark-mode-toggle {
        position: absolute;
        top: 1rem;
        right: 5rem;
        z-index: 1001;
    }
    
    /* Hero Section Mobile */
    .hero {
        padding: 120px 0 60px;
        text-align: center;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    .code-icon {
        width: 160px;
        height: 160px;
        margin-top: 1rem;
        position: relative;
        z-index: 1;
    }
    
    .code-icon i {
        font-size: 3.5rem;
    }

    /* Prevent code circle from overlapping text */
    .hero-image {
        order: 2;
        margin-top: 2rem;
    }
    
    .hero-content {
        order: 1;
        z-index: 2;
        position: relative;
    }
    
    /* Section Adjustments */
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    /* Grid Adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.5rem;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
    }
    
    .certs-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    /* Spacing Adjustments */
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 1rem 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        padding: 1rem 16px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-card,
    .cert-card,
    .platform-stats {
        padding: 2rem 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .skill-item {
        padding: 2rem 1rem;
    }
    
    .skill-item i {
        font-size: 2.5rem;
    }
    
    .code-icon {
        width: 130px;
        height: 130px;
        margin-top: 1.5rem;
    }
    
    .code-icon i {
        font-size: 3rem;
    }
    
    /* Mobile Menu Improvements */
    .nav-menu {
        padding: 5rem 1rem 2rem;
        max-width: 300px;
        width: 80%;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
        margin: 0.2rem 0;
    }
    
    .dark-mode-toggle {
        right: 4rem;
        width: 44px;
        height: 44px;
    }
}

/* Focus Management for Better Accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --text-muted: #333333;
        --border-color: #000000;
    }
    
    body.dark-mode {
        --text-color: #ffffff;
        --text-muted: #cccccc;
        --border-color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .code-icon {
        animation: none;
    }
}
