:root {
    --primary-color: #001f3f;
    /* Navy Blue */
    --accent-color: #003366;
    /* Lighter Navy */
    --gold-accent: #d4af37;
    /* Gold/Bronze for premium feel */
    --text-color: #333333;
    --light-text: #ffffff;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-img {
    height: 40px;
    margin-right: 12px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:not(.btn-donate)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-donate {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 8px 16px;
    border-radius: 4px;
}

.btn-donate:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
    transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero */
.hero {
    position: relative;
    background: radial-gradient(circle at center, #002855 0%, #001f3f 100%);
    color: var(--light-text);
    padding: 160px 0 120px;
    text-align: center;
    overflow: hidden;
}

#graphene-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.35rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--light-text);
    color: var(--primary-color);
    border: 2px solid var(--light-text);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--light-text);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.btn-large {
    font-size: 1.1rem;
    padding: 16px 48px;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
    font-size: 1.1rem;
    color: #666;
}

/* Philosophy */
.philosophy-section {
    background-color: #fff;
}

.lead-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-family: var(--font-heading);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: #444;
}

.about-content p {
    margin-bottom: 24px;
}

/* Research */
.research-section {
    background-color: #f0f4f8;
}

.grid {
    display: grid;
    gap: 30px;
}

.research-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card-title {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 1.35rem;
    font-weight: 700;
}

.card-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
}

/* Open Source */
.opensource-section {
    background-color: #fff;
}

.repo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.repo-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.repo-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 31, 63, 0.1);
}

.repo-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.repo-header i {
    font-size: 1.5rem;
    margin-right: 10px;
}

.repo-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.repo-link-text {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Outreach */
.outreach-section {
    background-color: #f8f9fa;
    text-align: center;
}

.outreach-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Donate */
.donate-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: #fff;
    text-align: center;
}

.donate-box h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.donate-box p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.donate-box .btn-primary {
    background-color: var(--gold-accent);
    color: var(--primary-color);
    border: none;
}

.donate-box .btn-primary:hover {
    background-color: #f0c945;
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Footer */
.footer {
    background-color: #0b1116;
    /* Darker than primary for footer */
    color: #aaa;
    padding: 60px 0 30px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 30px;
}

.footer-info h3 {
    color: #fff;
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--gold-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .nav {
        position: fixed;
        right: -100%;
        top: 80px;
        background-color: #fff;
        width: 100%;
        height: calc(100vh - 80px);
        transition: 0.3s;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        padding-top: 60px;
    }

    .btn-donate {
        width: 80%;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .footer-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}