/* =====================================================
   Modern Portfolio Styles - Enhanced with Animations
   ===================================================== */

/* Variables */
:root {
    /* Colors */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Container */
    --container-max: 1200px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

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

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* 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);
    z-index: 1000;
    transition: var(--transition);
}

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

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-icon {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    animation: gradientFlow 3s ease infinite;
    background-size: 300% auto;
    white-space: nowrap;
    padding: 0.5rem;
    transition: var(--transition);
}

.brand-icon:hover {
    transform: scale(1.05);
    filter: brightness(1.3);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

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

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

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

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

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: rotate(20deg);
}

/* Hero Profile Section */
.hero-profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
    animation: fadeInScale 0.8s ease-out;
    position: relative;
    z-index: 10;
}

.hero-profile-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translateX(-50%) scale(1.1);
        opacity: 0.8;
    }
}

.hero-profile-image {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.4),
                0 20px 60px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
    position: relative;
    background: var(--bg-primary);
    animation: profileFloat 6s ease-in-out infinite;
}

.hero-profile-image img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    display: block;
    background: transparent;
    transform: scale(1.1);
}

.hero-name {
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.8px;
    text-transform: uppercase;
    animation: gradientShift 4s ease infinite;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes profileFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--primary) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: var(--space-md);
    font-weight: 900;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.animated-gradient {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

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

/* Social Links */
.hero-socials {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.hero-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    border: 2px solid var(--border);
}

.hero-socials a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px) rotate(10deg);
    border-color: var(--primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--primary);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Sections */
section {
    padding: var(--space-3xl) 0;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    font-size: 1.125rem;
}

/* Specializations Section */
.specializations {
    background: var(--bg-primary);
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.spec-card {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: 1rem;
    border: 2px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

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

.spec-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
    color: white;
}

.spec-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

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

/* Case Studies Section */
.case-studies {
    background: var(--bg-secondary);
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--space-lg);
}

.case-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-primary), rgba(37, 99, 235, 0.03));
}

.case-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.case-icon {
    font-size: 2rem;
    color: white;
}

.case-industry {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.case-content {
    padding: var(--space-lg);
}

.case-card h3 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.case-problem,
.case-solution,
.case-impact {
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}

.case-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-md);
}

.case-tech span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

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

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.skill-category {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.skill-category h3 {
    margin-bottom: var(--space-md);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    font-size: 1.25rem;
}

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

.skill-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.project-type {
    background: var(--bg-secondary);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.personal-project {
    border: 2px solid var(--primary);
}

.personal-project .project-type {
    background: var(--primary);
    color: white;
}

.project-card h3 {
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.project-card p {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-md);
}

.project-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    color: var(--text-secondary);
}

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

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
    line-height: 1.8;
}

.about-text p.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
}

.about-highlights {
    margin-top: var(--space-xl);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.highlight {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
}

.highlight i {
    color: var(--success);
    font-size: 1.25rem;
}

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

.contact-description {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--border);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Connection Popup */
.connection-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.connection-popup.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 100px rgba(37, 99, 235, 0.2);
    animation: slideUp 0.4s ease;
    border: 2px solid var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    background: var(--bg-tertiary);
    color: var(--danger);
    transform: rotate(90deg);
}

.popup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.popup-header h3 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.popup-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.linkedin-btn {
    background: linear-gradient(135deg, #0077b5, #0a66c2);
    color: white;
}

.linkedin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 102, 194, 0.4);
    border-color: white;
}

.github-btn {
    background: linear-gradient(135deg, #24292e, #404448);
    color: white;
}

.github-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(36, 41, 46, 0.4);
    border-color: white;
}

.popup-btn i {
    font-size: 1.5rem;
}

.popup-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.popup-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.popup-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.popup-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    padding: var(--space-xl) 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-tagline {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.875rem;
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 0.8s ease;
}

.animate-fade-up-delay {
    animation: fadeUp 0.8s ease 0.2s both;
}

.animate-fade-up-delay-2 {
    animation: fadeUp 0.8s ease 0.4s both;
}

.animate-fade-up-delay-3 {
    animation: fadeUp 0.8s ease 0.6s both;
}

.animate-fade-up-delay-4 {
    animation: fadeUp 0.8s ease 0.8s both;
}

.animate-fade-up-delay-5 {
    animation: fadeUp 0.8s ease 1s both;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .brand-icon {
        font-size: 0.7rem;
        letter-spacing: 0.3px;
    }
    
    .hero-profile-image {
        width: 200px;
        height: 200px;
    }
    
    .hero-name {
        font-size: 2.2rem;
    }
    
    .hero-profile-section::before {
        width: 240px;
        height: 240px;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-lg);
        border-top: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .specializations-grid,
    .case-grid,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth scroll for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================= */
/* COMPREHENSIVE RESPONSIVE DESIGN */
/* ============================================= */

/* iPad Pro and Large Tablets (1024px - 1366px) */
@media (max-width: 1366px) and (min-width: 1025px) {
    .container {
        max-width: 1100px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .specializations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* iPad and Tablets (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 95%;
        padding: 0 2rem;
    }
    
    .hero-profile-image {
        width: 220px;
        height: 220px;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .specializations-grid,
    .case-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape & Small Tablets (568px - 768px) */
@media (max-width: 768px) and (min-width: 569px) {
    .hero {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-profile-image {
        width: 180px;
        height: 180px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-name {
        font-size: 2.2rem;
    }
    
    .specializations-grid,
    .case-grid,
    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* iPhone 14 Pro Max, Samsung S23 Ultra (430px - 568px) */
@media (max-width: 568px) and (min-width: 431px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-profile-image {
        width: 160px;
        height: 160px;
    }
    
    .hero-name {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

/* iPhone 13/12, Samsung S22 (390px - 430px) */
@media (max-width: 430px) and (min-width: 376px) {
    .brand-icon {
        font-size: 0.6rem;
    }
    
    .hero-profile-image {
        width: 150px;
        height: 150px;
    }
    
    .hero-name {
        font-size: 1.6rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .popup-content {
        width: 92%;
        padding: 1.5rem;
    }
    
    .popup-header h3 {
        font-size: 1.4rem;
    }
}

/* iPhone SE, Small Android Phones (320px - 375px) */
@media (max-width: 375px) {
    .container {
        padding: 0 1rem;
    }
    
    .brand-icon {
        font-size: 0.5rem;
        padding: 0.3rem;
    }
    
    .hero-profile-image {
        width: 140px;
        height: 140px;
    }
    
    .hero-name {
        font-size: 1.4rem;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .stat-item {
        flex: 1 1 45%;
        padding: 0.6rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .spec-card,
    .case-card,
    .project-card {
        padding: 1.2rem;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-profile-image {
        width: 120px;
        height: 120px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        display: none;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .hero-profile-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .nav-toggle,
    .theme-toggle,
    .connection-popup,
    .scroll-indicator {
        display: none !important;
    }
}
