/* CSS Variables for Light and Dark Mode */
:root {
    --bg-color: #f8fafc;
    --text-color: #1f2937;
    --header-bg: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    --card-bg: white;
    --shadow-color: rgba(0, 0, 0, 0.06);
    --link-color: #1d4ed8;
    --link-hover-color: #3b82f6;
    --btn-shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1f2937;
    --text-color: #e5e7eb;
    --header-bg: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    --card-bg: #2d3748;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --link-color: #60a5fa;
    --link-hover-color: #93c5fd;
    --btn-shadow: rgba(255, 255, 255, 0.1);
}

/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.02) 25%, transparent 25%), 
                      linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.02) 75%), 
                      linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.02) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header and Navigation */
header {
    background: var(--header-bg);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 2.5rem;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul li a:hover {
    color: #dbeafe;
    transform: scale(1.05);
}

nav ul li a.active {
    color: #93c5fd;
    border-bottom: 3px solid #93c5fd;
    padding-bottom: 5px;
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Main Content */
main {
    padding: 4rem 1rem;
    min-height: calc(100vh - 200px);
}

/* Fade-In Animation */
#home, #about, #research, #company-details {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
    background: var(--header-bg);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

/* Home Page Styles */
#home {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 6px 24px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    z-index: 0;
}

#home .site-title, #home .welcome-heading, #home .content {
    position: relative;
    z-index: 1;
}

.site-title {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1d4ed8;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
}

.welcome-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 2rem;
    text-align: center;
}

.content {
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: justify;
}

.content p {
    margin: 0.75rem 0;
}

.content ul {
    list-style-type: none;
    padding-left: 0;
    margin: 1rem 0;
}

.content li {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* About Page Styles */
#about {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 6px 24px var(--shadow-color);
}

#about h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    color: #1d4ed8;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

/* Research Page Styles */
#research {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
}

#research h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    color: #1d4ed8;
    margin-bottom: 1.5rem;
    text-align: center;
}

#research p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    text-align: center;
}

.company-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    list-style-type: none;
    padding: 0;
}

.company-list li {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-list li:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.company-list a {
    color: var(--link-color);
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
    transition: color 0.3s ease;
}

.company-list a:hover {
    color: var(--link-hover-color);
}

/* Company-Specific Page Styles */
#company-details {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 6px 24px var(--shadow-color);
}

#company-details h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    color: #1d4ed8;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

.company-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.9rem;
    color: #1d4ed8;
    margin: 1.5rem 0 0.75rem;
}

.company-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: #3b82f6;
    margin: 1.25rem 0 0.5rem;
}

.company-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0.75rem 0;
}

.company-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.company-content li {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.company-links {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.download-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 3px 10px var(--btn-shadow);
}

.btn:hover {
    transform: scale(1.05);
}

.btn:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.google-drive-btn {
    background: linear-gradient(135deg, #4285f4 0%, #60a5fa 100%);
    color: white;
}

.google-drive-btn:hover {
    background: linear-gradient(135deg, #3267d6 0%, #4b8efa 100%);
}

.excel-download-btn {
    background: linear-gradient(135deg, #28a745 0%, #34d058 100%);
    color: white;
}

.excel-download-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #2db44a 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul li a {
        font-size: 1.1rem;
    }

    main {
        padding: 3rem 1rem;
    }

    #home, #about, #research, #company-details {
        padding: 2rem;
    }

    .site-title, #home h1, #about h1, #research h1, #company-details h1 {
        font-size: 2.2rem;
    }

    .welcome-heading {
        font-size: 1.8rem;
    }

    .company-list {
        grid-template-columns: 1fr;
    }

    .company-list a {
        font-size: 1.2rem;
    }

    .company-content h2 {
        font-size: 1.7rem;
    }

    .company-content h3 {
        font-size: 1.4rem;
    }

    .company-content p, .company-content li, .content p, .content li {
        font-size: 1rem;
    }

    .company-links {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .site-title, #home h1, #about h1, #research h1, #company-details h1 {
        font-size: 1.8rem;
    }

    .welcome-heading {
        font-size: 1.6rem;
    }

    .company-list a {
        font-size: 1.1rem;
    }

    .company-content h2 {
        font-size: 1.5rem;
    }

    .company-content h3 {
        font-size: 1.3rem;
    }
}