/* Variables */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #f50057;
    --dark-color: #2c2c54;
    --light-color: #f5f6fa;
    --success-color: #00b894;
    --gradient-1: linear-gradient(135deg, #6c63ff, #4834d4);
    --gradient-2: linear-gradient(135deg, #f50057, #bb0048);
    --gradient-hover: linear-gradient(135deg, #4834d4, #6c63ff);
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --photo-border: 4px solid var(--primary-color);
    
    /* Dark Mode Variables */
    --bg-color: #ffffff;
    --text-color: #2c2c54;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --hero-bg: linear-gradient(135deg, #f8f9fa, #f2f2f2);
    --section-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --text-color: #eaeaea;
    --card-bg: #16213e;
    --border-color: #2d2d3a;
    --hero-bg: linear-gradient(135deg, #1a1a2e, #16213e);
    --section-bg: #0f3460;
    --light-color: #16213e;
    --dark-color: #eaeaea;
}

/* Enhanced Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

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

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--hero-bg);
    overflow-x: hidden;
    transition: var(--transition);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    background: var(--section-bg);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease forwards;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(108, 99, 255, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    outline: none;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
}

.btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.15);
}

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

.primary-btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(108, 99, 255, 0.2);
}

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

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(108, 99, 255, 0.2);
}

.project-btn {
    padding: 8px 16px;
    font-size: 14px;
    margin-right: 10px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* Resume Button */
.resume-btn {
    background: var(--gradient-2);
    color: white;
    position: relative;
    overflow: hidden;
}

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

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

.resume-btn:hover {
    background: linear-gradient(135deg, #bb0048, #f50057);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(245, 0, 87, 0.3);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary-color);
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    position: relative;
    padding: 5px;
    transition: var(--transition);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

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

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

.toggle-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark-color);
}

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

.hero:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.05) 0%, transparent 60%);
    animation: rotate 25s linear infinite;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 0, 87, 0.05), rgba(108, 99, 255, 0.05));
    z-index: 0;
    animation: pulse 4s ease-in-out infinite;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.text-content {
    flex: 1;
    max-width: 600px;
}

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

.hero-image-container {
    width: 100%;
    max-width: 450px;
    animation: slideInRight 1s ease-out 0.5s backwards, float 3s ease-in-out infinite 1.5s;
}

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

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeIn 1s ease;
}

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

.hero .typed-container {
    font-size: 1.8rem;
    font-weight: 600;
    height: 60px;
    margin-bottom: 20px;
    animation: slideInLeft 1s ease-out 0.2s backwards;
}

.hero .typed-text::after {
    content: '';
    border-right: 2px solid var(--primary-color);
    animation: blink 0.7s infinite;
}

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

.hero .tagline {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
    animation: slideInLeft 1s ease-out 0.4s backwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero .quote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    animation: fadeIn 1s ease 0.4s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero .cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeIn 1s ease 0.6s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero .social-icons {
    display: flex;
    gap: 15px;
    animation: slideInLeft 1s ease-out 1s backwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--gradient-1);
    color: white;
    transform: translateY(-5px);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 5;
}

.scroll-down a {
    display: block;
    font-size: 24px;
    color: var(--primary-color);
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

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

/* Profile Photo Styling */
.profile-photo img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    border: var(--photo-border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.profile-photo img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.hero-profile-photo {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-profile-photo img {
    width: 85%;
    height: auto;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
    animation: morph 8s ease-in-out infinite;
}

.hero-profile-photo img {
    transition: transform 0.5s ease-out;
}

.hero-profile-photo:before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: var(--gradient-1);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.3;
    z-index: -1;
    animation: morph 8s ease-in-out infinite 1s;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Additional Photo Effects */
.about-image .profile-photo img {
    transition: all 0.5s ease;
    filter: brightness(1) contrast(1);
}

.about-image .profile-photo img:hover {
    filter: brightness(1.05) contrast(1.05);
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 20px 40px rgba(108, 99, 255, 0.2);
}

/* Photo Caption Styling */
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(44, 44, 84, 0.8), transparent);
    color: white;
    text-align: center;
    padding: 15px 10px 10px;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.image-wrapper:hover .photo-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.underline {
    width: 80px;
    height: 4px;
    background: var(--gradient-1);
    margin: 0 auto;
    border-radius: 2px;
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    max-width: 400px;
}

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

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), transparent);
    z-index: -1;
    opacity: 0.8;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), transparent);
    z-index: -1;
    opacity: 0.8;
}

.about-image .image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.about-image .image-wrapper:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(108, 99, 255, 0.2), rgba(245, 0, 87, 0.2));
    opacity: 0;
    transition: var(--transition);
}

.about-image .image-wrapper:hover:after {
    opacity: 1;
}

.about-text {
    flex: 1;
}

.about-text > p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #666;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item .icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-item h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.detail-item p {
    color: #666;
}

/* Skills Section */
.skills {
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), transparent);
    z-index: 0;
}

.skills-container {
    position: relative;
    z-index: 2;
}

.skills-category {
    margin-bottom: 40px;
}

.skills-category h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-category h3 i {
    color: var(--primary-color);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    transition: var(--transition);
    z-index: -1;
}

.skill-item:hover {
    color: white;
    transform: translateY(-5px);
}

.skill-item:hover::before {
    left: 0;
}

/* Projects Section */
.projects {
    background-color: white;
    position: relative;
    overflow: hidden;
}

.projects::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 0, 87, 0.1), transparent);
    z-index: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-header {
    background: var(--gradient-1);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-header i {
    font-size: 1.8rem;
}

.project-body {
    padding: 20px;
    flex-grow: 1;
}

.project-body p {
    margin-bottom: 15px;
    color: #666;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tech-stack span {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--dark-color);
}

.project-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    display: flex;
    gap: 10px;
}

/* Contact Section */
.contact {
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), transparent);
    z-index: 0;
}

.contact-content {
    display: flex;
    gap: 50px;
    position: relative;
    z-index: 2;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-info h3 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.contact-info > p {
    margin-bottom: 30px;
    color: #666;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 15px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 5px;
}

.contact-item .detail {
    display: flex;
    flex-direction: column;
}

.contact-item .detail a {
    color: #666;
    transition: var(--transition);
}

.contact-item .detail a:hover {
    color: var(--primary-color);
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

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

.submit-btn {
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo p {
    color: #aaa;
    font-style: italic;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-1);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Scroll Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow);
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--gradient-hover);
    transform: translateY(-5px);
}

/* Enhanced Interactive Elements */
.text-content h1 {
    animation: slideInLeft 1s ease-out;
}

.text-content .typed-container {
    animation: slideInLeft 1s ease-out 0.2s backwards;
}

.text-content .tagline {
    animation: slideInLeft 1s ease-out 0.4s backwards;
}

.achievements-badge {
    animation: slideInLeft 1s ease-out 0.6s backwards;
}

.cta-buttons {
    animation: slideInLeft 1s ease-out 0.8s backwards;
}

.social-icons {
    animation: slideInLeft 1s ease-out 1s backwards;
}

/* Particle Animation Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(108, 99, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 0, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 184, 148, 0.1) 0%, transparent 50%);
    animation: particleMove 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes particleMove {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 50% 50%; 
    }
    33% { 
        background-position: 100% 0%, 0% 100%, 100% 50%; 
    }
    66% { 
        background-position: 0% 100%, 100% 0%, 0% 50%; 
    }
}

/* Enhanced Card Animations */
.project-card, .skill-item {
    transition: var(--transition);
    transform: perspective(1000px) rotateX(0deg);
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.skill-item:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 15px 30px rgba(108, 99, 255, 0.2);
}

/* Typing Animation Enhancement */
.typed-text::after {
    content: '|';
    color: var(--primary-color);
    animation: blink 1s infinite;
}

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

/* Achievement Badge Animations */
.achievements-badge .badge {
    animation: slideInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--delay) * 0.2s);
}

.badge:nth-child(1) { --delay: 1; }
.badge:nth-child(2) { --delay: 2; }
.badge:nth-child(3) { --delay: 3; }

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

/* Enhanced Mobile-First Responsive Design */

/* Base Mobile Styles (320px and up) */
@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    nav {
        padding: 15px 0;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    .hero {
        min-height: 90vh;
        padding: 80px 0 40px;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .text-content {
        order: 2;
    }
    
    .image-content {
        order: 1;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .achievements-badge {
        flex-direction: column;
        gap: 10px;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Tablet Portrait (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .nav-links {
        gap: 20px;
    }
}

/* Tablet Landscape / Small Desktop (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-content {
        gap: 60px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop (1025px and up) */
@media (min-width: 1025px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    /* Add hover effects only for large screens */
    .project-card:hover {
        transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    }
    
    .skill-item:hover {
        transform: scale(1.1) rotate(5deg);
    }
}

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

/* Print Styles */
@media print {
    .loader-wrapper,
    header,
    .theme-toggle,
    .social-icons,
    .cta-buttons {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        break-inside: avoid;
        padding: 20px 0;
    }
    
    .hero {
        min-height: auto;
    }
}

/* Enhanced Loading Animation */
.animate-in {
    animation: slideInFade 0.6s ease-out forwards;
}

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

/* Advanced Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero:before,
    .hero::after {
        animation: none;
    }
    
    .hero-image-container {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.theme-toggle:focus,
a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #ff0000;
        --text-color: #000000;
        --bg-color: #ffffff;
    }
    
    [data-theme="dark"] {
        --primary-color: #00ffff;
        --secondary-color: #ffff00;
        --text-color: #ffffff;
        --bg-color: #000000;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Selection Styles */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
