/* Base Styles and Variables */
:root {
    /* Light Theme Colors */
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --text-color: #333333;
    --card-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --footer-bg: #f8f9fa;
    
    /* Common Variables */
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

/* Dark Theme Colors */
.dark-mode {
    --primary-color: #6d8dff;
    --secondary-color: #adb5bd;
    --background-color: #121212;
    --text-color: #f8f9fa;
    --card-bg: #1e1e1e;
    --border-color: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: #1a1a1a;
    --footer-bg: #1a1a1a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.primary-btn:hover {
    background-color: #3a5bd9;
    transform: translateY(-2px);
}

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

.resume-btn {
    background-color: #34A853;
    color: white;
    margin-left: 10px;
}

.resume-btn:hover {
    background-color: #2E8B57;
    transform: translateY(-2px);
}

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

.small-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

nav {
    display: flex;
    align-items: center;
}

.menu {
    display: flex;
    margin-right: 30px;
}

.menu li {
    margin-left: 25px;
}

.menu a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.menu a:hover, .menu a.active {
    color: var(--primary-color);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.menu a:hover::after, .menu a.active::after {
    width: 100%;
}

/* Theme Toggle Switch */
.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle i {
    color: var(--text-color);
    margin: 0 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.1) 0%, rgba(74, 108, 247, 0.05) 100%);
}

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

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    text-align: right;
    max-width: 500px;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.underline {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 0 auto;
}

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

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

.about-text {
    flex: 1;
}

.about-text h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.skills {
    margin-top: 30px;
}

.skill-category {
    margin-bottom: 20px;
}

.skill-category h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

/* Skill Bars */
.skill-bars {
    margin-top: 15px;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background-color: var(--card-bg);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Project Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: var(--background-color);
    margin: 50px auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

.modal-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-info {
    flex: 1;
}

.modal-details {
    margin-top: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.modal-section ul {
    padding-left: 20px;
}

.modal-section ul li {
    margin-bottom: 5px;
}

.modal-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
        gap: 30px;
    }
    
    .modal-image {
        width: 45%;
        margin-bottom: 0;
    }
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.project-info p {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tags span {
    background-color: rgba(74, 108, 247, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* Certificates Section */
.certificates-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.certificate-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.certificate-image {
    height: 180px;
    overflow: hidden;
   
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-image img {
    max-height: 100%;
    transition: var(--transition);
}

.certificate-info {
    padding: 20px;
}

.certificate-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.certificate-info p {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.certificate-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.contact-info p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background-color: rgba(74, 108, 247, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: none;
}

.form-status.sending {
    display: block;
    background-color: #f8f9fa;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.form-status.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contact Form Status */
.form-status {
    margin-top: 12px;
    font-weight: 600;
}
.form-status.success {
    color: #2e7d32; /* green */
}
.form-status.error {
    color: #c62828; /* red */
}
.direct-email-fallback {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}
.direct-email-fallback a {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-logo h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.footer-logo p {
    color: var(--secondary-color);
}

.footer-links {
    display: flex;
    gap: 50px;
}

.footer-nav h3, .footer-social h3 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.footer-nav ul li {
    margin-bottom: 10px;
}

.footer-nav ul li a {
    color: var(--secondary-color);
    transition: var(--transition);
}

.footer-nav ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-social .social-links {
    flex-direction: column;
    gap: 10px;
}

.footer-social .social-link {
    width: auto;
    height: auto;
    background-color: transparent;
    border: none;
    justify-content: flex-start;
}

.footer-social .social-link i {
    margin-right: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        max-width: 300px;
        margin-bottom: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px var(--shadow-color);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .menu li {
        margin: 15px 0;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .projects-grid, .certificates-slider {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
}