/* Global Styles */
:root {
    /* Light Theme Variables */
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --text-color: #333333;
    --card-bg-color: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: #f1f1f1;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --primary-color: #4a8fff;
    --secondary-color: #a1a8ae;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --card-bg-color: #1e1e1e;
    --border-color: #444444;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-color: #2a2a2a;
}

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

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

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

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

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background-color: #004494;
    color: white;
}

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

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

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

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

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

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

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

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s ease;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #0056b3, #004494, #002a57);
    background-size: cover;
    background-position: center;
    color: white;
    margin-bottom: 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .lead {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-buttons .btn {
    margin: 0 10px;
}

/* Skills Section */
.skills-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    margin: 5px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

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

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

.skill-card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

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

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 20px;
}

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

.project-category {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    margin: 15px 0;
}

.project-tech span {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
}

.project-outcomes {
    margin: 15px 0;
}

.project-outcomes h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-outcomes ul {
    padding-left: 20px;
}

.project-outcomes li {
    margin-bottom: 5px;
}

.view-details {
    margin-top: 15px;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.cert-card {
    display: flex;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.cert-icon {
    margin-right: 20px;
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

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

.cert-issuer {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Talks Section */
.talks-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

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

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-content {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px var(--shadow-color);
}

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

.timeline-date {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

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

.contact-info {
    padding-right: 20px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

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

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

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

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

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

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    margin: 0 10px;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

/* 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 {
    background-color: var(--background-color);
    margin: 50px auto;
    padding: 30px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Content Pages (Terms, Privacy, FAQ) */
.content-container {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-bottom: 30px;
}

.content-container h3 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.content-container h4 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.content-container p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.content-container ul, 
.content-container ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-container li {
    margin-bottom: 10px;
}

.faq-item {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
}

.last-updated {
    font-style: italic;
    color: var(--secondary-color);
    text-align: right;
    margin-top: 40px;
    font-size: 0.9rem;
}

.instructions ol {
    counter-reset: item;
    list-style-type: none;
    padding-left: 0;
}

.instructions li {
    counter-increment: item;
    margin-bottom: 20px;
    position: relative;
    padding-left: 40px;
}

.instructions li:before {
    content: counter(item);
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 0;
}

.instructions strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 30px;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--background-color);
        flex-direction: column;
        align-items: center;
        padding-top: 30px;
        transition: left 0.3s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

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

    .section-title {
        font-size: 2rem;
    }

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

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

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

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

    .hero .lead {
        font-size: 1rem;
    }

    .cta-buttons .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
}
