/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #1f2937;
    background-color: #ffffff;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Enhanced container variants for different sections */
.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-logo h2 {
    color: #4f46e5;
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.nav-logo:hover h2 {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: #4f46e5;
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1001;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: #4f46e5;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: #4f46e5;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 25%, #db2777 75%, #f59e0b 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(124, 58, 237, 0.85) 50%, rgba(219, 39, 119, 0.8) 100%);
    z-index: 1;
}

.hero > .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #111827;
}

.highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.625rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
    color: #e5e7eb;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    color: #d1d5db;
    letter-spacing: -0.005em;
    line-height: 1.8;
    color: #d1d5db;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    letter-spacing: -0.005em;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    border: none;
    box-shadow: 
        0 4px 14px rgba(251, 191, 36, 0.25),
        0 2px 6px rgba(251, 191, 36, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 
        0 8px 25px rgba(251, 191, 36, 0.4),
        0 4px 12px rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 
        0 8px 25px rgba(251, 191, 36, 0.4),
        0 4px 12px rgba(251, 191, 36, 0.3),
        0 0 0 3px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #4f46e5;
    border-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(255, 255, 255, 0.3);
}

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

.social-links a {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: rgba(255, 255, 255, 0.95);
    color: #4f46e5;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.social-links a:active {
    transform: translateY(-1px) scale(1.02);
}

/* Specific social platform hover colors */
.social-links a[href*="github"]:hover {
    background-color: #333;
    color: white;
}

.social-links a[href*="linkedin"]:hover {
    background-color: #0077b5;
    color: white;
}

.social-links a[href*="mailto"]:hover {
    background-color: #ea4335;
    color: white;
}

.social-links a:hover {
    background-color: #fbbf24;
    color: #1f2937;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.image-container {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50% !important;
    object-fit: cover;
    border: 5px solid #fbbf24;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: block;
    aspect-ratio: 1 / 1;
}

.image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
}

/* Section Styles */
.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
}

.section-subtitle {
    font-size: 1.1875rem;
    text-align: center;
    margin-bottom: 4rem;
    color: #6b7280;
    line-height: 1.6;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Expertise Section */
.expertise {
    padding: 100px 0;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    position: relative;
}

.expertise::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.expertise-card {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 12px 24px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.6);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777);
    opacity: 0.8;
    transition: height 0.3s ease;
}

.expertise-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.03), transparent);
    transition: left 0.6s ease;
}

.expertise-card:hover {
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 12px 32px rgba(0, 0, 0, 0.08),
        0 20px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(79, 70, 229, 0.2);
}

.expertise-card:hover::before {
    height: 6px;
}

.expertise-card:hover::after {
    left: 100%;
}

.expertise-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 20px rgba(79, 70, 229, 0.35),
        0 4px 12px rgba(79, 70, 229, 0.25);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 
        0 4px 12px rgba(79, 70, 229, 0.25),
        0 2px 6px rgba(79, 70, 229, 0.15);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-icon::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    border-radius: 17px;
    opacity: 0.1;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
}

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

.expertise-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.125rem;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.expertise-card p {
    color: #6b7280;
    margin-bottom: 1.75rem;
    line-height: 1.7;
    font-size: 0.9375rem;
    letter-spacing: -0.002em;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.skill-tag {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    color: #4f46e5;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 12px 24px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.6);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777);
    opacity: 0;
    z-index: 10;
}

.project-card:hover {
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 16px 32px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
    border-color: rgba(79, 70, 229, 0.15);
}

.project-card:hover::before {
    opacity: 0.8;
}

.project-icon {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 
        0 4px 12px rgba(79, 70, 229, 0.3),
        0 2px 6px rgba(79, 70, 229, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.project-icon i {
    color: white;
    font-size: 1.4rem;
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(79, 70, 229, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-link {
    width: 50px;
    height: 50px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    text-decoration: none;
}

.project-link:hover {
    background-color: #fbbf24;
    color: #1f2937;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.75rem;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.tech-tag {
    background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(55, 65, 81, 0.12);
    box-shadow: 0 1px 3px rgba(55, 65, 81, 0.05);
}

.projects-cta {
    text-align: center;
    padding: 2rem 0;
}

.projects-cta p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #6b7280;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 25%, #db2777 75%, #f59e0b 100%);
    color: white;
    position: relative;
}

.contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    z-index: 2;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.95) 0%, rgba(124, 58, 237, 0.9) 50%, rgba(219, 39, 119, 0.85) 100%);
    z-index: 1;
}

.contact > .container {
    position: relative;
    z-index: 2;
}

.contact-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-item {
    display: flex;
    align-items: center;    gap: 1.75rem;
    margin-bottom: 2.25rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.05);
}

.contact-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    box-shadow: 
        0 4px 12px rgba(251, 191, 36, 0.35),
        0 2px 6px rgba(251, 191, 36, 0.25);
    font-size: 1.375rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #d1d5db;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 2rem 0;
    border-top: 1px solid rgba(55, 65, 81, 0.3);
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {    color: #d1d5db;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fbbf24;
}

/* Layout and Structure Improvements - Final Polish */

/* Consistent section spacing and dividers */
section {
    position: relative;
}

/* Section dividers with subtle gradients */
section:not(.hero):not(.footer)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.2), transparent);
}

/* Enhanced section spacing system */
.section-spacing-large {
    padding: 120px 0;
}

.section-spacing-medium {
    padding: 100px 0;
}

.section-spacing-small {
    padding: 80px 0;
}

/* Grid system improvements */
.grid-auto-fit-sm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.grid-auto-fit-md {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.grid-auto-fit-lg {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

/* Enhanced responsive containers */
.container-fluid {
    width: 100%;
    max-width: none;
    padding: 0 24px;
}

.container-tight {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Improved visual hierarchy with better spacing */
.content-block {
    margin-bottom: 3rem;
}

.content-block:last-child {
    margin-bottom: 0;
}

/* Section header improvements */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-header .section-title {
    margin-bottom: 1rem;
}

.section-header .section-subtitle {
    margin-bottom: 0;
}

/* Enhanced card layouts */
.card-grid {
    display: grid;
    gap: 2rem;
}

.card-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Responsive improvements for better mobile experience */
@media (max-width: 768px) {
    .section-spacing-large,
    .section-spacing-medium {
        padding: 80px 0;
    }
    
    .section-spacing-small {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .content-block {
        margin-bottom: 2rem;
    }
    
    .card-grid {
        gap: 1.5rem;
    }
    
    .grid-auto-fit-sm,
    .grid-auto-fit-md,
    .grid-auto-fit-lg {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-spacing-large,
    .section-spacing-medium,
    .section-spacing-small {
        padding: 60px 0;
    }
    
    .container,
    .container-narrow,
    .container-wide,
    .container-tight {
        padding: 0 16px;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
}

/* Layout consistency fixes */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.02) 0%, 
        rgba(124, 58, 237, 0.02) 50%, 
        rgba(251, 191, 36, 0.02) 100%);
    z-index: -1;
}

/* Section background variants */
.section-bg-subtle {
    background: linear-gradient(135deg, 
        rgba(249, 250, 251, 0.8) 0%, 
        rgba(243, 244, 246, 0.8) 100%);
}

.section-bg-accent {
    background: linear-gradient(135deg, 
        rgba(79, 70, 229, 0.03) 0%, 
        rgba(124, 58, 237, 0.03) 100%);
}

/* Enhanced footer spacing */
footer {
    margin-top: 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(79, 70, 229, 0.1), 
        transparent);
}

/* Scroll margin for smooth scrolling to sections */
section[id] {
    scroll-margin-top: 100px;
}

/* Container max-width adjustments for better content flow */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .container-wide {
        max-width: 1600px;
    }
}

/* Enhanced visual flow with better section transitions */
section + section {
    position: relative;
}

/* Micro-spacing improvements */
.expertise-grid,
.projects-grid {
    margin-top: 1rem;
}

/* ========================================
   MICRO-INTERACTIONS & ANIMATIONS
======================================== */

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for grid items */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }

/* Enhanced hover micro-interactions */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-2px);
}

/* Subtle pulse for call-to-action elements */
.pulse-gently {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
    }
}

/* Enhanced focus states for accessibility */
.focus-enhanced:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

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

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

/* ========================================
   ENHANCED CONTENT PRESENTATION
======================================== */

/* Improved visual hierarchy */
.content-hierarchy h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.content-hierarchy h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 0.875rem;
}

.content-hierarchy h3 {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

/* Enhanced content blocks */
.content-block {
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Enhanced typography with better spacing */
.text-flow p {
    margin-bottom: 1.25rem;
}

.text-flow p:last-child {
    margin-bottom: 0;
}

.text-flow ul, .text-flow ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.text-flow li {
    margin-bottom: 0.5rem;
}

/* Improved link styling within content */
.text-flow a {
    color: #4f46e5;
    text-decoration: none;
    border-bottom: 1px solid rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
}

.text-flow a:hover {
    color: #3730a3;
    border-bottom-color: #3730a3;
    background-color: rgba(79, 70, 229, 0.05);
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 4px;
}

/* Enhanced section dividers with subtle animation */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 4rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-divider::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4f46e5;
    font-size: 12px;
}

/* Enhanced image presentation */
.image-enhance {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.image-enhance:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.image-enhance img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-enhance:hover img {
    transform: scale(1.05);
}

/* Enhanced tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Enhanced progress indicators */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 2px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Enhanced status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.online {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.status-indicator.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   ENHANCED BACK-TO-TOP BUTTON
======================================== */

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
    z-index: 1000;
    position: relative;
    overflow: hidden;
}

#back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, #4f46e5, #7c3aed, #4f46e5);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#back-to-top::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 50%;
    z-index: 1;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#back-to-top:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

#back-to-top:hover::before {
    opacity: 1;
    animation: rotate-border 2s linear infinite;
}

#back-to-top i {
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
}

#back-to-top:hover i {
    transform: translateY(-2px);
}

#back-to-top:active {
    transform: translateY(0) scale(0.95);
}

@keyframes rotate-border {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   ENHANCED MOBILE MENU STATES
======================================== */

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1001;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger .bar {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: #4f46e5;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: #4f46e5;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Enhanced mobile menu overlay */
.nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}

/* ========================================
   ENHANCED LOADING AND TRANSITION STATES
======================================== */

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

img.loaded {
    animation: fade-in 0.5s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Enhanced focus states for better accessibility */
.focus-enhanced:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    border-radius: 4px;
}

/* Enhanced text selection */
::selection {
    background: rgba(79, 70, 229, 0.2);
    color: #1f2937;
}

::-moz-selection {
    background: rgba(79, 70, 229, 0.2);
    color: #1f2937;
}

/* Enhanced scroll indicators */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #db2777);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1001;
    transition: transform 0.1s ease;
}

/* ========================================
   RESPONSIVE ENHANCEMENTS
======================================== */

@media (max-width: 768px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .reveal {
        transform: translateY(10px);
    }

    /* Reduce motion for mobile if preferred */
    @media (prefers-reduced-motion: reduce) {
        .reveal {
            transform: none;
        }
        
        .expertise-card:hover,
        .project-card:hover {
            transform: none;
        }
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    #back-to-top,
    .navbar,
    .hamburger {
        display: none !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}
