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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-alt: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --secondary-color: #2563eb;
    --accent-color: #60a5fa;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-accent: #374151;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --gradient-alt: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
}

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

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

/* Dark mode navbar */
[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

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

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

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

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--bg-accent);
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    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><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-text .description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

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

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

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

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

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

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.profile-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 10s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.university-logo {
    width: 120px;
    height: auto;
    margin: 0.5rem 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.university-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Sections */
.section {
    padding: 5rem 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

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

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

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Different colors for each skill category */
.skill-category:nth-child(1) {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.skill-category:nth-child(2) {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border: 1px solid rgba(192, 38, 211, 0.2);
}

.skill-category:nth-child(3) {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Dark mode skill category colors */
[data-theme="dark"] .skill-category:nth-child(1) {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .skill-category:nth-child(2) {
    background: linear-gradient(135deg, #7c2d12 0%, #dc2626 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .skill-category:nth-child(3) {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.skill-tag {
    background: var(--bg-accent);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.skill-icons img {
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    filter: grayscale(20%);
    border-radius: 8px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.skill-icons img:hover {
    transform: translateY(-3px) scale(1.1);
    filter: grayscale(0%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

/* Experience Section */
.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd)::before {
    right: -8px;
}

.timeline-item:nth-child(even)::before {
    left: -8px;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--border-color);
}

/* Different colors for each timeline item */
.timeline-item:nth-child(1) .timeline-content {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.timeline-item:nth-child(2) .timeline-content {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-item:nth-child(3) .timeline-content {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* Dark mode timeline colors */
[data-theme="dark"] .timeline-item:nth-child(1) .timeline-content {
    background: linear-gradient(135deg, #451a03 0%, #92400e 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .timeline-item:nth-child(2) .timeline-content {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .timeline-item:nth-child(3) .timeline-content {
    background: linear-gradient(135deg, #581c87 0%, #7c3aed 100%);
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: #f8fafc;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: #f8fafc;
}

/* Update arrow colors for each timeline item */
.timeline-item:nth-child(1) .timeline-content::before {
    border-left-color: #fef3c7;
}

.timeline-item:nth-child(2) .timeline-content::before {
    border-right-color: #dbeafe;
}

.timeline-item:nth-child(3) .timeline-content::before {
    border-left-color: #f3e8ff;
}

.company-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 500;
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-description ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-description li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-description li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

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

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

.project-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

/* Different colors for each project card */
.project-card:nth-child(1) {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.project-card:nth-child(2) {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.project-card:nth-child(3) {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(23, 197, 139, 0.2);
}

.project-card:nth-child(4) {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dark mode project card colors */
[data-theme="dark"] .project-card:nth-child(1) {
    background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .project-card:nth-child(2) {
    background: linear-gradient(135deg, #7c2d12 0%, #dc2626 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .project-card:nth-child(3) {
    background: linear-gradient(135deg, #674800 0%, #b46901e2 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="dark"] .project-card:nth-child(4) {
    background: linear-gradient(135deg, #66017d 0%, #a5007f 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

/* Enhanced hover effects for timeline items */
.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.project-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.project-title a {
    color: inherit;
    text-decoration: none;
}

.project-title a:hover {
    color: var(--primary-color);
}

.project-tech {
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-description {
    padding: 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-description ul {
    list-style: none;
    margin-top: 1rem;
}

.project-description li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-description li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Contact Section */
.contact {
    background: var(--gradient);
    color: white;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact h2 {
    color: white;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .about-content {
        gap: 2rem;
    }

    .about-text {
        max-width: 100%;
        padding: 0 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }

    .experience-timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
    }

    .timeline-item::before {
        left: 12px !important;
    }

    .timeline-content::before {
        left: -20px !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .skill-icons {
        gap: 0.75rem;
    }

    .skill-icons img {
        width: 35px;
        height: 35px;
    }

    .university-logo {
        width: 100px;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

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

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
