/* ===== CSS Variables ===== */
:root {
    --primary-color: #1e3a8a;
    --primary-dark: #0f2b5c;
    --secondary-color: #2c3e50;
    --accent-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --bg-light: #ffffff;
    --bg-gray: #f3f4f6;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary-color: #9ca3af;
    --text-dark: #f3f4f6;
    --text-light: #9ca3af;
    --bg-light: #111827;
    --bg-gray: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

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

/* ===== Theme Toggle ===== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-toggle button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.theme-toggle button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg-light);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    padding: 1rem 0;
}

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

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-gray) 100%);
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Stats Section ===== */
.stats {
    padding: 4rem 0;
    background-color: var(--bg-gray);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===== Philosophy Section ===== */
.philosophy {
    padding: 4rem 0;
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 4rem 0;
    background-color: var(--bg-gray);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== Page Header ===== */
.page-header {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    text-align: center;
}

.page-header h1 {
    margin-bottom: 0;
}

/* ===== About Page ===== */
.about {
    padding: 4rem 0;
}

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

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

/* ===== Skills Section ===== */
.skills {
    padding: 4rem 0;
    background-color: var(--bg-gray);
}

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

.skill-category {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-category h3 i {
    margin-right: 0.5rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.skill-list li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ===== Timeline (Experience Page) ===== */
.timeline {
    padding: 4rem 0;
    position: relative;
}

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

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

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

.timeline-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

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

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.timeline-list {
    list-style: none;
}

.timeline-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.timeline-list li::before {
    content: '→';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* ===== Education Section ===== */
.education {
    padding: 4rem 0;
    background-color: var(--bg-gray);
}

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

.education-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.education-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.institution {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.date {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cert-list {
    list-style: none;
}

.cert-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    padding-left: 1.5rem;
    position: relative;
}

.cert-list li::before {
    content: '✓';
    color: var(--success);
    position: absolute;
    left: 0;
}

/* ===== Projects Page ===== */
.projects {
    padding: 4rem 0;
}

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

.project-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-tech {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-impact {
    background-color: var(--bg-gray);
    padding: 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
}

/* ===== Contact Page ===== */
.contact {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

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

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.info-item a,
.info-item p {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

.info-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.contact-form h2 {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ===== Alert Messages ===== */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

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

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

.footer-info p {
    color: var(--text-light);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-date {
        left: 30px;
        transform: translateX(0);
        top: 0;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-light);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}