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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #7c3aed;
    --secondary-dark: #5b21b6;
    --dark: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

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

.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s;
}

.logo a:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

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

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: 0.3s;
}

.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);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    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 200 200"><path fill="rgba(255,255,255,0.05)" d="M100 0L120 60H180L135 95L150 155L100 125L50 155L65 95L20 60H80L100 0Z"/></svg>');
    background-repeat: repeat;
    opacity: 0.1;
    animation: float 20s linear infinite;
}

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

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

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

.hero-content {
    color: white;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
    animation: slideInLeft 0.8s ease;
}

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

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
    animation: slideInLeft 0.8s ease 0.2s both;
}

.hero h1 .highlight {
    color: #fbbf24;
    position: relative;
    display: inline-block;
}

.hero h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(251, 191, 36, 0.3);
    z-index: -1;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInLeft 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease 0.6s both;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    animation: slideInLeft 0.8s ease 0.8s both;
}

.social-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.social-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

.social-links a:hover::after {
    width: 100%;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.hero-image {
    text-align: center;
    animation: slideInRight 0.8s ease;
}

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

/* Profile Image - Perfectly Circular */
.profile-image {
    width: 100%;
    max-width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeInScale 0.8s ease;
}

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

.profile-image:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
}

/* Projects Section */
.projects {
    padding: 5rem 0;
    background: var(--light-gray);
}

.projects h2, .contact h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
    width: 100%;
}

.projects h2::after, .contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

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

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: transform 0.6s;
}

.project-card:hover .project-image::before {
    transform: rotate(45deg) translate(100%, 100%);
}

.project-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    z-index: 1;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.project-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-stack span {
    background: var(--light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s;
}

.tech-stack span:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

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

.project-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

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

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

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

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

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

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    font-size: 1.125rem;
    line-height: 1.8;
}

.skills {
    margin: 3rem 0;
}

.skills h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--dark);
}

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

.skills-grid span {
    background: var(--light-gray);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.skills-grid span:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1%, transparent 1%);
    background-size: 50px 50px;
    animation: shift 20s linear infinite;
}

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

.contact h2, .contact .section-subtitle {
    color: white;
    position: relative;
    z-index: 1;
}

.contact .section-subtitle {
    opacity: 0.9;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 100%;
}

.contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.form-message {
    text-align: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    animation: slideInUp 0.5s ease;
    position: relative;
    z-index: 1;
}

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

.form-message.success {
    background: var(--success);
    color: white;
    display: block;
}

.form-message.error {
    background: var(--error);
    color: white;
    display: block;
}

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

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .profile-image {
        max-width: 250px;
        height: 250px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid span {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .project-card {
        margin: 0 1rem;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .profile-image {
        max-width: 280px;
        height: 280px;
    }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loading.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print Styles */
@media print {
    .navbar, .hero-buttons, .contact, .footer-links {
        display: none;
    }
    
    body {
        color: black;
    }
    
    .hero {
        background: white;
        color: black;
    }
}