:root {
    --primary-color: #6366f1;  /* Soft Indigo */
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;  /* Soft Purple */
    --accent-color: #06b6d4;  /* Soft Cyan */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  /* Purple-Blue Gradient */
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);  /* Pink-Red Gradient */
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);  /* Blue-Cyan Gradient */
}

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

/* Prevent horizontal overflow on mobile */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    /* Optimized for Safari - reduced backdrop blur */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    /* Hardware acceleration for Safari */
    transform: translateZ(0);
    will-change: transform, background;
}

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

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

.nav-logo .logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.hamburger:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
    border-radius: 2px;
    transform-origin: center;
}

.hamburger.active span {
    background: var(--primary-color);
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="50" cy="50" r="50" fill="url(%23a)"/></svg>') repeat;
    opacity: 0.1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-secondary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.name-text {
    display: block;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
}

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

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

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

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    /* Optimized for Safari - reduced backdrop blur */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    /* Optimized animation for Safari */
    animation: float 8s ease-in-out infinite;
    animation-delay: var(--delay);
    z-index: 15;
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.floating-element:nth-child(1) { top: 10%; left: 10%; }
.floating-element:nth-child(2) { top: 20%; right: 10%; }
.floating-element:nth-child(3) { bottom: 30%; left: 5%; }
.floating-element:nth-child(4) { bottom: 10%; right: 20%; }

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

.hero-graphic {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-stack-visual {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    animation: orbit 20s linear infinite;
    transform-origin: 150px;
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.tech-circle:nth-child(1) { 
    animation-delay: 0s; 
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
}

.tech-circle:nth-child(2) { 
    animation-delay: -5s;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateZ(0);
}

.tech-circle:nth-child(3) { 
    animation-delay: -10s;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
}

.tech-circle:nth-child(4) { 
    animation-delay: -15s;
    top: 50%;
    left: 0;
    transform: translateY(-50%) translateZ(0);
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(100px) rotate(0deg) translateZ(0); }
    100% { transform: rotate(360deg) translateX(100px) rotate(-360deg) translateZ(0); }
}

.tech-circle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.central-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.3),
        rgba(139, 92, 246, 0.3));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10;
    /* Hardware acceleration */
    transform: translateZ(0);
}

.dev-title {
    line-height: 1.2;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
}

.scroll-indicator span {
    width: 4px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Sections */
section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

.about-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.about-image {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.skill-category h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
}

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

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

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.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 0.3s ease;
}

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

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

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-items {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

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

/* Contact form button styling */
.contact-form .btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    backdrop-filter: none;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.contact-form .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Custom cursor */
* {
    cursor: none;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
}

.custom-cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s ease;
    opacity: 0.5;
}

/* Restore cursor for specific elements */
a, button, input, textarea, .btn {
    cursor: pointer !important;
}

/* Loading animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced button hover effects */
.btn {
    position: relative;
    overflow: hidden;
}

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

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

/* Glowing effect for skill items */
.skill-item {
    position: relative;
}

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

.skill-item:hover::before {
    opacity: 0.7;
}

/* Enhanced project card effects */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.project-card:hover::before {
    left: 100%;
}

/* Floating animation keyframes */
@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-specific smooth animations */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation for social links */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.social-link:hover {
    animation: pulse 1.5s infinite;
}

/* Text gradient animation - Optimized for Safari */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    /* Slower animation for better Safari performance */
    animation: gradientShift 4s ease infinite;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Hardware acceleration */
    transform: translateZ(0);
    will-change: background-position;
}

/* Enhanced form styling */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body, html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Ensure all sections fit within viewport */
    * {
        max-width: 100vw;
        word-wrap: break-word;
    }
    
    /* Enable smooth transitions on mobile */
    [data-aos] {
        transition-duration: 0.4s !important;
    }
    
    /* Mobile-optimized animations */
    .hero-content {
        animation: mobileSlideUp 0.8s ease-out;
    }
    
    .hero-visual {
        animation: mobileFadeIn 1s ease-out 0.2s both;
    }
    
    .skill-category {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .project-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .custom-cursor,
    .custom-cursor-follower {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }
    
    /* Ensure smooth animations on mobile */
    .hero-content,
    .hero-visual,
    .section-header,
    .skill-category,
    .project-card,
    .about-text,
    .contact-info,
    .contact-form {
        opacity: 1;
        transform: none;
        transition: all 0.3s ease;
    }
    
    /* Add subtle entrance animations */
    .skill-category {
        animation: slideInUp 0.6s ease forwards;
    }
    
    .project-card {
        animation: fadeInScale 0.5s ease forwards;
    }
    
    .skill-category:nth-child(1) { animation-delay: 0.1s; }
    .skill-category:nth-child(2) { animation-delay: 0.2s; }
    .skill-category:nth-child(3) { animation-delay: 0.3s; }
    
    .project-card:nth-child(1) { animation-delay: 0.1s; }
    .project-card:nth-child(2) { animation-delay: 0.2s; }
    .project-card:nth-child(3) { animation-delay: 0.3s; }
    
    /* Container */
    .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.8rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 3rem;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1.5rem 0;
        width: 80%;
        text-align: center;
    }
    
    .nav-menu .nav-link {
        font-size: 1.3rem;
        padding: 1.2rem 2rem;
        color: var(--text-primary);
        font-weight: 600;
        display: block;
        width: 100%;
        border-radius: 15px;
        background: rgba(99, 102, 241, 0.05);
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link:active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile menu overlay */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
        height: 100vh;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 80px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        background-attachment: scroll; /* Better for mobile */
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        grid-template-columns: none;
        display: flex;
        max-width: 100%;
        padding: 0 1rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    .hero-content,
    .hero-visual {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
        margin-bottom: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .name-text {
        font-size: 2.8rem;
        font-weight: 800;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
        opacity: 0.9;
    }
    
    .hero-description {
        font-size: 0.95rem;
        max-width: 100%;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 2rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .social-links {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .floating-elements {
        display: none; /* Hide on mobile for performance */
    }
    
    .hero-graphic {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .tech-stack-visual {
        width: 280px;
        height: 280px;
        margin: 0 auto;
        position: relative;
        max-width: 90vw;
        overflow: hidden;
    }
    
    .tech-circle {
        width: 70px;
        height: 70px;
        font-size: 1.3rem;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .central-circle {
        width: 110px;
        height: 110px;
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .stat {
        margin: 0 1rem;
    }
    
    /* Skills Section */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skill-category {
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .skill-category:hover,
    .skill-category:active {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }
    
    .skills-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .skill-item {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-card {
        max-width: 100%;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .project-card:hover,
    .project-card:active {
        transform: translateY(-8px);
        box-shadow: var(--shadow-xl);
    }
    
    .project-tech {
        gap: 0.5rem;
    }
    
    .tech-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Section spacing */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-content {
        text-align: center;
        font-size: 0.9rem;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .hero {
        padding: 80px 0 60px;
        min-height: 100vh;
    }
    
    .hero-container {
        padding: 0 0.5rem;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .name-text {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .btn {
        max-width: 100%;
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .tech-stack-visual {
        width: 220px;
        height: 220px;
        max-width: 80vw;
        overflow: hidden;
    }
    
    .tech-circle {
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
    
    .central-circle {
        width: 90px;
        height: 90px;
        font-size: 0.75rem;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat {
        margin: 0;
    }
    
    .container {
        padding: 0 0.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure all sections fit within viewport */
    section {
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Mobile animation keyframes */
    @keyframes mobileSlideUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes mobileFadeIn {
        0% {
            opacity: 0;
            transform: scale(0.9);
        }
        100% {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-container {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .name-text {
        font-size: 4rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark theme support (optional) */
.dark-theme {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
}

.dark-theme .navbar {
    background: rgba(26, 26, 26, 0.95);
}

.dark-theme .hero {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 10000;
    transition: width 0.3s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Safari-specific optimizations */
@supports (-webkit-appearance: none) {
    /* Reduce animation complexity on Safari */
    .floating-element {
        animation-duration: 10s;
        animation-timing-function: ease;
    }
    
    /* Optimize transforms for Safari */
    .project-card,
    .skill-category,
    .hero-content,
    .hero-visual {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    /* Reduce backdrop-filter usage on Safari */
    .hero {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    /* Optimize gradient animations for Safari */
    .gradient-text {
        animation-duration: 5s;
        background-size: 200% 200%;
    }
    
    /* Reduce motion on Safari if user prefers */
    @media (prefers-reduced-motion: reduce) {
        .floating-element,
        .gradient-text {
            animation: none;
        }
        
        .project-card:hover {
            transform: translateY(-5px) translateZ(0);
        }
    }
}

/* Safari-specific styles */
.safari-browser .floating-element {
    animation-duration: 12s;
    animation-timing-function: ease;
}

.safari-browser .gradient-text {
    animation-duration: 6s;
    background-size: 200% 200%;
}

.safari-browser .project-card {
    transition: transform 0.2s ease;
}

.safari-browser .project-card:hover {
    transform: translateY(-8px) translateZ(0);
}

/* Force hardware acceleration for key elements */
.hero,
.navbar,
.profile-card,
.floating-elements,
.project-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}
