/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --border-color: #e9ecef;
    --success-color: #38b000;
    --warning-color: #ffaa00;
    --danger-color: #d90429;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --section-padding: 80px 0;
}

.dark-mode {
    --primary-color: #4cc9f0;
    --secondary-color: #4361ee;
    --accent-color: #3a0ca3;
    --text-color: #f8f9fa;
    --text-light: #e9ecef;
    --bg-color: #121212;
    --bg-light: #212529;
    --bg-dark: #343a40;
    --border-color: #495057;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-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;
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    left: 50%;
    transform: translateX(-50%);
}

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

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    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-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.primary-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

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

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

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

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

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

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

.theme-toggle {
    margin-left: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-left: 20px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    box-shadow: var(--shadow);
    padding: 20px 0;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 999;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: var(--bg-light);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding-top: 120px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-color) 100%);
    position: relative;
    overflow: hidden;
}

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

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
}

.animate-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient 3s linear infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

.hero-text p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

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

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

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

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

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

.profile-img-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.profile-img-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    animation: pulse 2s infinite;
}

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

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

.scroll-down a {
    display: block;
    color: var(--primary-color);
    font-size: 1.5rem;
}

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

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

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

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

/* Education Section */
.education {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    z-index: 1;
}

.timeline-content {
    position: relative;
    width: calc(50% - 40px);
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-content {
    left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    left: calc(50% + 40px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 10px;
}

.timeline-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
}

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

.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

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

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

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

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

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

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

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

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

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.project-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.project-desc {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-light);
}

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

.project-tech span {
    padding: 4px 10px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-color);
}

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

.project-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Skills Section */
.skills {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.skills-container {
    max-width: 800px;
    margin: 0 auto;
}

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

.skills-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

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

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

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

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

.skills-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.skill-badge {
    padding: 10px 20px;
    background: var(--bg-color);
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-badge:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

/* Certifications Section */
.certifications {
    padding: var(--section-padding);
    background: var(--bg-color);
}

.cert-container {
    max-width: 800px;
    margin: 0 auto;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.cert-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.cert-date {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.cert-desc {
    margin-bottom: 15px;
    color: var(--text-light);
}

.cert-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

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

.contact-social {
    margin-top: 40px;
}

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

.contact-form {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

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

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

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

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

.footer-links a {
    color: white;
    font-size: 0.9rem;
}

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

.back-to-top {
    position: absolute;
    right: 30px;
    bottom: 30px;
}

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

.back-to-top a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-buttons, .social-links {
        justify-content: center;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        left: 80px !important;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .theme-toggle {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cert-card {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .profile-img-container {
        width: 250px;
        height: 250px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}