:root {
    /* Light theme (default) */
    --primary-color: #3b82f6;
    --secondary-color: #1d4ed8;
    --accent-color: #06b6d4;
    --text-color: #1f2937;
    --light-text: #4b5563;
    --background: #f8fafc;
    --light-background: #f1f5f9;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --gradient-start: #eef2ff;
    --gradient-end: #f8fafc;
    --navbar-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
    --text-color: #e5e7eb;
    --light-text: #9ca3af;
    --background: #111827;
    --light-background: #1f2937;
    --card-background: #1f2937;
    --border-color: #374151;
    --gradient-start: #111827;
    --gradient-end: #1f2937;
    --navbar-bg: rgba(17, 24, 39, 0.8);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    min-height: 100vh;
}

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

/* Navbar Styles */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.name {
    font-weight: 600;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    gap: 2.5rem;
}

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

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

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

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.social-links a {
    color: var(--light-text);
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

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

.hero-image {
    flex: 0.8;
    max-width: 400px;
    position: relative;
}

.main-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--card-background);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
    font-size: 1.1rem;
}

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

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

/* Project Card Styles */
.project-header {
    margin-bottom: 1rem;
}

.project-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.project-title h3 {
    flex-grow: 1;
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.external-link {
    color: var(--light-text);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.external-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.1);
}

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

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.project-content {
    padding: 2rem;
}

.project-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.tech-stack {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tech-stack span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Section Headers */
h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
footer {
    background: var(--light-background);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-right {
        gap: 1.5rem;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-image {
        max-width: 250px;
        margin: 0 auto;
    }

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

    .subtitle {
        font-size: 1.25rem;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .project-title {
        gap: 0.5rem;
    }
    
    .project-logo {
        width: 25px;
        height: 25px;
    }
    
    .project-title h3 {
        font-size: 1.25rem;
    }
}

/* Theme toggle button */
.theme-toggle-wrapper {
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 56px;
    height: 28px;
    position: relative;
}

.toggle-track {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    border-radius: 14px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-sun, .toggle-moon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-sun {
    right: 4px;
}

.toggle-moon {
    left: 4px;
}

/* Dark mode styles */
.theme-toggle.dark-mode .toggle-track {
    background: #4299e1;
}

.theme-toggle.dark-mode .toggle-thumb {
    transform: translateX(28px);
}

/* Icon colors */
.toggle-sun i, .toggle-moon i {
    color: #4a5568;
}

[data-theme="dark"] .toggle-sun i,
[data-theme="dark"] .toggle-moon i {
    color: #fff;
}

/* Set initial dark theme */
:root {
    color-scheme: dark;
}

html {
    data-theme: "dark";
}

/* Contact Page Styles */
.contact-section {
    padding: 8rem 0 4rem;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Contact Info Card Styles */
.contact-info-card {
    background: var(--primary-color);
    color: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    height: 100%;
}

.contact-info-card h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    -webkit-text-fill-color: white;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
}

.info-item p {
    font-size: 1.1rem;
}

.connect-section {
    margin-top: 4rem;
}

.connect-section h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

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

/* Contact Form Styles */
.contact-form-container {
    padding: 2rem;
}

.contact-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 1rem;
}

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

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .contact-section {
        padding: 6rem 0 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-info-card {
        padding: 2rem;
    }
    
    .contact-form-container {
        padding: 1rem;
    }
}
