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

:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #fbbf24;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #334155;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
}

html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.95);
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    transition: var(--transition);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
    z-index: 0;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Floating particles */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(37, 99, 235, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(245, 158, 11, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(37, 99, 235, 0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(245, 158, 11, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesFloat 20s linear infinite;
    z-index: 0;
}

@keyframes particlesFloat {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(-10px) translateX(-5px); }
    100% { transform: translateY(0px) translateX(0px); }
}

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

.hero-name {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero-subtitle::after {
    content: '|';
    color: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.profile-photo:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.2),
        0 0 30px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: imageGlow 0.8s ease-in-out;
}

@keyframes imageGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
    100% { filter: brightness(1); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0% { transform: translateY(-3px) scale(1.05); }
    50% { transform: translateY(-4px) scale(1.08); }
    100% { transform: translateY(-3px) scale(1.05); }
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
    animation: buttonPulse 0.6s ease-in-out;
}

.btn-full {
    width: 100%;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color), var(--accent-color));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
    animation: gradientShift 3s ease-in-out infinite;
    cursor: default;
    transition: all 0.3s ease;
}

.section-title:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 5px 15px rgba(37, 99, 235, 0.3));
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    animation: expandUnderline 1s ease-out 0.5s forwards;
}

@keyframes expandUnderline {
    to { width: 60px; }
}

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

/* About Section */
.about {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: floatingOrb 20s ease-in-out infinite;
    pointer-events: none;
}

.about::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -30%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
    animation: floatingOrb 25s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes floatingOrb {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(90deg); }
    50% { transform: translate(-20px, 30px) rotate(180deg); }
    75% { transform: translate(-30px, -10px) rotate(270deg); }
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-text {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out;
    color: var(--text-primary);
}

.about-text:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
}

.about-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-primary);
    opacity: 0;
    animation: slideInLeft 1s ease-out 0.3s forwards;
}

.about-description:nth-child(2) {
    animation-delay: 0.6s;
}

.skills {
    opacity: 0;
    animation: slideInUp 1s ease-out 0.9s forwards;
    color: var(--text-primary);
}

.skills h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    display: inline-block;
}

.skills h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    animation: expandLine 1s ease-out 1.2s forwards;
}

@keyframes expandLine {
    to { width: 100%; }
}

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

.skill-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: skillAppear 0.6s ease-out forwards;
    cursor: pointer;
}

.skill-tag:nth-child(1) { animation-delay: 1.3s; }
.skill-tag:nth-child(2) { animation-delay: 1.4s; }
.skill-tag:nth-child(3) { animation-delay: 1.5s; }
.skill-tag:nth-child(4) { animation-delay: 1.6s; }
.skill-tag:nth-child(5) { animation-delay: 1.7s; }

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

.skill-tag:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.skill-tag:hover::before {
    left: 100%;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes skillGlow {
    0% { box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5); }
    100% { box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
}

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

/* Particle effect for About section */
.about .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle 8s linear infinite;
    opacity: 0.6;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced hover effects for About section */
.about-content:hover .about-text {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 99, 235, 0.4);
}

.about-content:hover .skill-tag {
    animation-play-state: paused;
}

/* Responsive adjustments for About section effects */
@media (max-width: 768px) {
    .about::before,
    .about::after {
        display: none;
    }
    
    .about-text {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .skill-tag {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .about::before,
    .about::after,
    .skill-tag,
    .about-description,
    .section-title {
        animation: none !important;
    }
    
    .about-text:hover {
        transform: none;
    }
    
    .skill-tag:hover {
        transform: scale(1.05);
    }
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.portfolio-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-item {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.1), rgba(245, 158, 11, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.15),
        0 0 0 1px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

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

.portfolio-link {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.portfolio-link:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

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

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.contact .section-subtitle {
    color: #7c889b !important;
    position: relative;
    z-index: 2;
}

/* Premium animated background */
.contact .bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top left, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.98) 100%);
    animation: premiumShift 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.contact .bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.01) 2px, rgba(255, 255, 255, 0.01) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(37, 99, 235, 0.02) 2px, rgba(37, 99, 235, 0.02) 4px);
    animation: meshMove 30s linear infinite;
}

@keyframes premiumShift {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 0% 0%;
        opacity: 1;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 100% 100%;
        opacity: 0.95;
    }
}

@keyframes meshMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* Premium particle system */
.contact .floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Elegant geometric particles */
.contact .floating-icons::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(37, 99, 235, 0.2), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(139, 92, 246, 0.25), transparent),
        radial-gradient(1px 1px at 60% 10%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(37, 99, 235, 0.15), transparent);
    background-size: 300px 300px, 400px 400px, 200px 200px, 350px 350px, 250px 250px;
    animation: particleFloat 40s linear infinite;
}

.contact .floating-icons::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 30% 20%, rgba(255, 255, 255, 0.08), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(139, 92, 246, 0.12), transparent),
        radial-gradient(2px 2px at 80% 90%, rgba(37, 99, 235, 0.1), transparent),
        radial-gradient(1px 1px at 15% 50%, rgba(255, 255, 255, 0.06), transparent);
    background-size: 250px 250px, 300px 300px, 180px 180px, 320px 320px;
    animation: particleFloat 50s linear infinite reverse;
}

/* Premium floating elements */
.contact .floating-icons i {
    position: absolute;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.1);
    opacity: 0;
    animation: premiumFloat 20s ease-in-out infinite;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.contact .floating-icons i:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.contact .floating-icons i:nth-child(2) {
    top: 35%;
    right: 20%;
    animation-delay: -8s;
    animation-duration: 30s;
}

.contact .floating-icons i:nth-child(3) {
    bottom: 25%;
    left: 25%;
    animation-delay: -16s;
    animation-duration: 22s;
}

.contact .floating-icons i:nth-child(4) {
    top: 55%;
    right: 30%;
    animation-delay: -24s;
    animation-duration: 28s;
}

.contact .floating-icons i:nth-child(5) {
    bottom: 40%;
    right: 15%;
    animation-delay: -32s;
    animation-duration: 26s;
}

.contact .floating-icons i:nth-child(6) {
    top: 45%;
    left: 20%;
    animation-delay: -40s;
    animation-duration: 24s;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(-50px, -50px) rotate(360deg);
    }
}

@keyframes premiumFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.15;
    }
    50% {
        transform: translateY(-30px) translateX(15px) rotate(180deg) scale(1.1);
        opacity: 0.25;
    }
}

/* Sophisticated hover effects */
.contact:hover .floating-icons i {
    opacity: 0.3;
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
}

.contact:hover .floating-icons::before,
.contact:hover .floating-icons::after {
    animation-duration: 20s;
}

/* Premium lighting system */
.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 800px 600px at 30% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 600px 800px at 70% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.8) 100%);
    opacity: 1;
    animation: premiumLighting 20s ease-in-out infinite;
    z-index: -1;
    backdrop-filter: blur(1px);
}

.contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.02) 25%, transparent 50%, rgba(37, 99, 235, 0.03) 75%, transparent 100%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: luxuryShimmer 25s ease-in-out infinite;
    z-index: -1;
    mix-blend-mode: overlay;
}

@keyframes premiumLighting {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 0% 0%;
        opacity: 1;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 100% 100%;
        opacity: 0.95;
    }
}

@keyframes luxuryShimmer {
    0%, 100% {
        background-position: 0% 50%, 50% 50%;
        opacity: 0.8;
    }
    50% {
        background-position: 100% 50%, 25% 75%;
        opacity: 1;
    }
}

/* Floating particles for contact section */
.contact .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    pointer-events: none;
    animation: floatContactParticle 12s linear infinite;
    opacity: 0.4;
    z-index: 0;
}

.contact .particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.contact .particle:nth-child(2) { left: 20%; animation-delay: -2s; }
.contact .particle:nth-child(3) { left: 30%; animation-delay: -4s; }
.contact .particle:nth-child(4) { left: 40%; animation-delay: -6s; }
.contact .particle:nth-child(5) { left: 50%; animation-delay: -8s; }
.contact .particle:nth-child(6) { left: 60%; animation-delay: -10s; }
.contact .particle:nth-child(7) { left: 70%; animation-delay: -12s; }
.contact .particle:nth-child(8) { left: 80%; animation-delay: -14s; }
.contact .particle:nth-child(9) { left: 90%; animation-delay: -16s; }

@keyframes floatContactParticle {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(90vh) translateX(10px) rotate(36deg) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(50vh) translateX(-20px) rotate(180deg) scale(1.2);
    }
    90% {
        opacity: 0.4;
        transform: translateY(10vh) translateX(30px) rotate(324deg) scale(0.8);
    }
    100% {
        transform: translateY(-10vh) translateX(50px) rotate(360deg) scale(0);
        opacity: 0;
    }
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInContact 0.8s ease forwards;
    animation-delay: 0.3s;
}

@keyframes slideInContact {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.contact-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color), var(--primary-color));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.contact-item:hover .contact-icon::before {
    opacity: 1;
    animation: iconPulse 1.5s ease infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

.contact-details h3 {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 65px;
    height: 65px;
    background: var(--bg-primary);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    font-size: 1.5rem;
}

.social-link:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 10px 25px rgba(37, 99, 235, 0.3),
        0 0 20px rgba(37, 99, 235, 0.2);
    animation: socialGlow 0.6s ease-in-out;
}

@keyframes socialGlow {
    0% { box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3), 0 0 20px rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4), 0 0 30px rgba(37, 99, 235, 0.3); }
    100% { box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3), 0 0 20px rgba(37, 99, 235, 0.2); }
}

/* Contact Form */
.contact-form {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInForm 0.8s ease forwards;
    animation-delay: 0.5s;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(37, 99, 235, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.contact-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-form:hover::before {
    left: 100%;
}

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

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.025em;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.4);
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%),
        rgba(15, 23, 42, 0.5);
    box-shadow: 
        0 0 0 3px rgba(37, 99, 235, 0.15),
        0 8px 25px -5px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

.form-group input::-webkit-input-placeholder,
.form-group textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.form-group input::-moz-placeholder,
.form-group textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

.form-group input:-ms-input-placeholder,
.form-group textarea:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.form-group label {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: transparent;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(37, 99, 235, 0.9);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Enhanced button animations for contact form */
.contact-form .btn {
    width: 100%;
    padding: 1.5rem 2rem;
    background: 
        linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px -5px rgba(37, 99, 235, 0.4),
        0 4px 6px -2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.contact-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.contact-form .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 1;
}

.contact-form .btn:hover::before {
    left: 0;
}

.contact-form .btn:hover::after {
    width: 300px;
    height: 300px;
}

.contact-form .btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 20px 40px -10px rgba(37, 99, 235, 0.5),
        0 8px 16px -4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-form .btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* Enhanced section title animation for contact */
.contact .section-title {
    position: relative;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: contactTitleGlow 3s ease-in-out infinite alternate;
}

.contact .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    animation: expandContactLine 1s ease forwards;
    animation-delay: 0.8s;
}

@keyframes contactTitleGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 5px rgba(37, 99, 235, 0.3));
    }
    100% {
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(37, 99, 235, 0.5));
    }
}

@keyframes expandContactLine {
    to {
        width: 80px;
    }
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

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

/* Contact info enhanced animations */
.contact-info {
    position: relative;
}

.contact-details {
    transition: all 0.3s ease;
}

.contact-item:hover .contact-details {
    transform: translateX(10px);
}

.contact-details h3 {
    position: relative;
    transition: all 0.3s ease;
}

.contact-details h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.contact-item:hover .contact-details h3::after {
    width: 100%;
}

/* Responsive adjustments for contact effects */
@media (max-width: 768px) {
    .contact::before,
    .contact::after {
        display: none;
    }
    
    .contact .particle {
        display: none;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-item {
        animation-delay: 0.1s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact::before,
    .contact::after,
    .contact .particle,
    .contact-item,
    .contact-form {
        animation: none !important;
    }
    
    .contact-item {
        opacity: 1;
        transform: none;
    }
    
    .contact-form {
        opacity: 1;
        transform: none;
    }
    
    .contact-icon:hover {
        transform: scale(1.05);
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-placeholder {
        width: 250px;
        height: 250px;
    }

    .image-placeholder i {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.125rem;
    }



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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .skills-grid {
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .portfolio-content {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

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

.hero-content > * {
    animation: fadeInUp 0.8s ease-out;
}

.portfolio-item {
    animation: fadeInUp 0.6s ease-out;
}

.contact-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.btn:focus,
input:focus,
textarea:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-large: 0 8px 16px rgba(0, 0, 0, 0.3);
    }
}

/* Social media buttons for larger screens */
@media (min-width: 1200px) {
    .social-link {
        width: 75px;
        height: 75px;
        font-size: 1.75rem;
    }
    
    .social-links {
        gap: 1.75rem;
    }
}

@media (min-width: 1600px) {
    .social-link {
        width: 85px;
        height: 85px;
        font-size: 2rem;
    }
    
    .social-links {
        gap: 2rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .theme-toggle,
    .nav-toggle {
        display: none;
    }

    .hero {
        padding-top: 0;
    }

    * {
        box-shadow: none !important;
    }
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    height: fit-content;
}

.portfolio-review-image {
    margin: 0.5rem 0 1rem 0;
    text-align: center;
}

.review-img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 8px;
}

.portfolio-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(37, 99, 235, 0.15),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}