/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Loading Animation */
.loading-screen {
    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 ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark Mode Styles */
.dark-mode {
    --dark-color: #f8fafc;
    --light-color: #0f172a;
    --gray-color: #cbd5e1;
    --border-color: #334155;
    background-color: #0f172a;
    color: #f8fafc;
}

.dark-mode .navbar,
.dark-mode .skill-category,
.dark-mode .project-card,
.dark-mode .resume-card,
.dark-mode .resume-preview,
.dark-mode .contact-form,
.dark-mode .education-card {
    background-color: #1e293b;
    border: 1px solid #334155;
}

.dark-mode .skill-tag {
    background-color: #334155;
    color: #e2e8f0;
}

.dark-mode .project-tech span {
    background-color: #334155;
    color: #e2e8f0;
}

.dark-mode .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.dark-mode .contact-form h3,
.dark-mode .resume-preview h3,
.dark-mode .education-header h3,
.dark-mode .skill-category h3,
.dark-mode .project-header h3 {
    color: #f8fafc;
}

.dark-mode .education-body h4,
.dark-mode .company,
.dark-mode .contact-item h4 {
    color: #cbd5e1;
}

.dark-mode .date {
    background-color: #334155;
    color: #60a5fa;
}

.dark-mode .project-date {
    background-color: #334155;
    color: #cbd5e1;
}

.dark-mode .hero-title {
    color: #f8fafc;
}

.dark-mode .hero-subtitle {
    color: #60a5fa;
}

.dark-mode .hero-description {
    color: #cbd5e1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: 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: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
}

.theme-switch {
    display: none;
}

.theme-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 60px;
    height: 30px;
    background-color: #334155;
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-label i {
    font-size: 0.9rem;
    color: white;
    z-index: 1;
}

.theme-label .fa-sun {
    color: #fbbf24;
}

.theme-label .fa-moon {
    color: #cbd5e1;
}

.theme-ball {
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    left: 4px;
    transition: transform 0.3s ease;
}

.theme-switch:checked + .theme-label .theme-ball {
    transform: translateX(30px);
}

.theme-switch:checked + .theme-label {
    background-color: var(--primary-color);
}

.dark-mode .theme-label {
    background-color: var(--primary-color);
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: background-color 0.3s ease;
}

.dark-mode .navbar {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.dark-mode .nav-links a {
    color: #f8fafc;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.dark-mode .menu-toggle {
    color: #f8fafc;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 100px 0;
    transition: background 0.3s ease;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 30px;
    max-width: 600px;
    transition: color 0.3s ease;
}

.hero-cta {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8rem;
    box-shadow: var(--shadow);
    transition: background 0.3s ease;
}

/* Education Section */
.education-card {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.education-header h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.date {
    background-color: #dbeafe;
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.education-body h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--gray-color);
    transition: color 0.3s ease;
}

.education-details {
    list-style: none;
    padding-left: 20px;
}

.education-details li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    transition: color 0.3s ease;
}

.dark-mode .education-details li {
    color: #cbd5e1;
}

.education-details li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.education-details li:first-child {
    font-weight: 600;
    color: var(--dark-color);
    margin-top: 10px;
}

.dark-mode .education-details li:first-child {
    color: #f8fafc;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.skill-category h3 i {
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: #e0f2fe;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Skill Bars */
.skill-bars {
    margin-top: 15px;
}

.skill-bar {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.dark-mode .skill-info {
    color: #cbd5e1;
}

.skill-progress {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.dark-mode .skill-progress {
    background-color: #334155;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1.5s ease-in-out;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-header {
    padding: 25px 25px 15px;
    border-bottom: 1px solid var(--border-color);
}

.project-header h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.project-date {
    font-size: 0.9rem;
    color: var(--gray-color);
    background-color: #f1f5f9;
    padding: 3px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.project-body {
    padding: 20px 25px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-body p {
    margin-bottom: 15px;
    color: var(--gray-color);
    transition: color 0.3s ease;
}

.dark-mode .project-body p {
    color: #cbd5e1;
}

.project-features {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-features li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.dark-mode .project-features li {
    color: #cbd5e1;
}

.project-features li::before {
    content: '→';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.project-tech span {
    background-color: #f1f5f9;
    color: var(--dark-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Resume Section */
.resume-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.resume-card {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.resume-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.resume-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.resume-card p {
    color: var(--gray-color);
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.resume-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.resume-preview {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.resume-preview h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.3s ease;
}

.experience-item {
    margin-bottom: 25px;
}

.experience-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.company {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.experience-item ul {
    list-style: none;
    padding-left: 20px;
}

.experience-item li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    transition: color 0.3s ease;
}

.dark-mode .experience-item li {
    color: #cbd5e1;
}

.experience-item li::before {
    content: '▸';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.contact-item a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: white;
    color: var(--dark-color);
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.form-status.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.dark-mode .form-status.success {
    background-color: #064e3b;
    color: #a7f3d0;
    border-color: #065f46;
}

.form-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dark-mode .form-status.error {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #991b1b;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

.dark-mode .footer {
    background-color: #0f172a;
    border-top: 1px solid #334155;
}

.footer p {
    margin-bottom: 10px;
    color: #cbd5e1;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .resume-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .theme-toggle {
        bottom: 90px;
    }
    
    .back-to-top {
        bottom: 90px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    .dark-mode .nav-links {
        background-color: #1e293b;
        border: 1px solid #334155;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle {
        bottom: 90px;
        left: 20px;
    }
    
    .back-to-top {
        bottom: 90px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .image-placeholder {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }
    
    .resume-actions {
        flex-direction: column;
    }
    
    .theme-toggle {
        bottom: 90px;
        left: 15px;
    }
    
    .back-to-top {
        bottom: 90px;
        right: 15px;
    }
}

/* Animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.8s ease-out;
}