/* ===== CSS RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== CSS VARIABLES (DESIGN SYSTEM) ===== */
:root {
    /* Colors - Light Theme */
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --secondary: #8B5CF6;
    --accent: #06B6D4;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;
    
    --border-light: #E2E8F0;
    --border-medium: #CBD5E1;
    --border-dark: #94A3B8;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #60A5FA;
    --primary-dark: #3B82F6;
    --primary-light: #93C5FD;
    --secondary: #A78BFA;
    --accent: #22D3EE;
    
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-card: #1E293B;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-inverse: #0F172A;
    
    --border-light: #334155;
    --border-medium: #475569;
    --border-dark: #64748B;
    
    --success: #34D399;
    --warning: #FBBF24;
    --error: #F87171;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    position: relative;
}

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

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.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 var(--transition-slow);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

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

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

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

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

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

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

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

.nav-logo .logo-text {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-normal);
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.github-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
}

.github-btn:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
    padding-top: 80px; /* Space for fixed navbar */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.shape {
    position: absolute;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.greeting {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.name {
    display: block;
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.role {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

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

.image-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-2xl);
    transition: transform var(--transition-slow);
}

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

.image-border {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    opacity: 0.3;
    animation: rotate 10s linear infinite;
}

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

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    color: var(--text-secondary);
    font-size: var(--font-size-xl);
    animation: bounce 2s infinite;
}

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

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--space-4xl) 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
    margin-bottom: var(--space-4xl);
}

.about-card {
    background: var(--bg-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-2xl);
}

.about-card h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.about-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(6, 182, 212, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.image-wrapper:hover .about-img {
    transform: scale(1.1);
}

.overlay-content {
    text-align: center;
    color: var(--text-inverse);
}

.overlay-content i {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-md);
}

.overlay-content span {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.technologies {
    text-align: center;
}

.technologies h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
}

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

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-item i {
    font-size: var(--font-size-3xl);
    color: var(--primary);
    transition: color var(--transition-normal);
}

.tech-item:hover i {
    color: var(--accent);
}

.tech-item span {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: var(--space-4xl) 0;
    background: var(--bg-primary);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.project-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-placeholder {
    font-size: var(--font-size-4xl);
    color: var(--text-inverse);
    opacity: 0.8;
}

.project-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: opacity var(--transition-normal);
}

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

.project-links {
    display: flex;
    gap: var(--space-lg);
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--font-size-lg);
    transition: all var(--transition-normal);
}

.project-link:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.project-content {
    padding: var(--space-2xl);
}

.project-content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tech-tag {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.projects-footer {
    text-align: center;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--space-4xl) 0;
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xl);
}

.contact-details h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

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

.contact-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-normal);
}

.contact-link:hover {
    color: var(--accent);
}

.contact-form {
    background: var(--bg-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: var(--space-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-normal);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    padding: var(--space-3xl) 0 var(--space-xl);
}

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

.footer-info h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.footer-info p {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: var(--space-lg);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--font-size-lg);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--text-inverse);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.footer-bottom p {
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.footer-bottom i {
    color: var(--error);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2xl);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: var(--space-xl);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding-top: 100px; /* More space for mobile navbar */
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .name {
        font-size: var(--font-size-4xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero {
        padding-top: 120px; /* Extra space for very small screens */
    }
    
    .hero-content {
        padding: 0 var(--space-md);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .about-card,
    .contact-form {
        padding: var(--space-lg);
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== ANIMATIONS ===== */
.animate {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.theme-toggle:focus,
.github-btn:focus,
.hamburger:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --border-medium: #000000;
        --border-dark: #000000;
    }
    
    [data-theme="dark"] {
        --border-light: #FFFFFF;
        --border-medium: #FFFFFF;
        --border-dark: #FFFFFF;
    }
}

/* Print styles */
@media print {
    .navbar,
    .scroll-indicator,
    .hero-shapes,
    .project-overlay,
    .footer-social {
        display: none;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }
    
    .section-title::after {
        display: none;
    }
}