/* CSS Variables for theming */
:root {
    --primary: #499d23;
    --primary-dark: #3a7d1c;
    --primary-light: #5cb830;
    --text: #000000;
    --bg: #F7F9F9;
    --surface: #ffffff;
    --subtle: #6D6D6D;
    --border: #E2E2E2;
    --shadow: rgba(0, 0, 0, 0.1);
    --menu-bg: #ffffff;
    --hero-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    --hero-text: #ffffff;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

.dark-mode {
    --text: #ffffff;
    --bg: #121212;
    --surface: #1e1e1e;
    --subtle: #A0A0A0;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
    --menu-bg: #111111;
    --hero-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    --hero-text: #ffffff;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

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

a:hover {
    color: var(--primary-light);
}

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

/* Radical Banner */
.radical-banner {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.radical-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0) 20%, 
        rgba(255,255,255,0) 80%, 
        rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.banner-network-count {
    background-color: rgba(0,0,0,0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
}

/* Navigation */
.navbar {
    background-color: var(--menu-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: var(--menu-bg);
    box-shadow: 0 5px 20px var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    font-family: 'Roboto Mono', monospace;
}

.logo-yetu {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.blinking-underscore {
    display: inline-block;
    color: var(--primary);
    animation: blink 1s step-end infinite;
    margin-right: 0.2rem;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.logo-tagline {
    font-size: 0.8rem;
    color: var(--subtle);
    position: relative;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: relative;
    padding: 0.5rem 0;
    font-family: 'Roboto Mono', monospace;
}

.nav-links a:before {
    content: '_';
    margin-right: 0.3rem;
    color: var(--primary);
}

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

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(73, 157, 35, 0.1);
    transform: rotate(15deg);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    padding: 0;
}

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

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
    background: var(--hero-bg);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--hero-text);
}

.hero h1 span {
    color: var(--primary);
    position: relative;
}

.hero h1 span:after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(73, 157, 35, 0.3);
    z-index: -1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 90%;
}

.hero-image {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0);
}

#networkCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.network-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    padding: 1.5rem;
    color: white;
}

.network-stats .stat {
    text-align: center;
    flex: 1;
    position: relative;
}

.network-stats .stat:not(:last-child):after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background-color: rgba(255,255,255,0.2);
}

.network-stats .number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.3rem;
}

.network-stats .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Buttons */
.btn-radical {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-radical:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-radical:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(73, 157, 35, 0.3);
}

.btn-radical:hover:before {
    opacity: 1;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(73, 157, 35, 0.2);
}

.btn-text {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.btn-text:hover {
    color: var(--primary-light);
    gap: 0.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Section Styles */
section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.section-intro {
    text-align: center;
    margin-bottom: 5rem;
}

.section-intro h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.section-intro h2:after {
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
}

.section-intro p {
    color: var(--subtle);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 1rem auto 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background-color: var(--surface);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow);
}

.about-card h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
}

.about-card h3 i {
    color: var(--primary);
    font-size: 1.3rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

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

.project-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--subtle);
    margin-bottom: 1.5rem;
}

/* Collective Section */
.collective-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.collective-card {
    background-color: var(--surface);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px var(--shadow);
    border: 1px solid var(--border);
}

.collective-card h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.collective-card h3 i {
    color: var(--primary);
}

.collective-card ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.collective-card li {
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method i {
    color: var(--primary);
    font-size: 1.2rem;
    width: 24px;
}

.social-links h3 {
    margin-bottom: 1rem;
}

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

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface);
    color: var(--primary);
    transition: all 0.3s ease;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

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

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

/* Footer */
footer {
    background-color: var(--surface);
    color: var(--text);
    padding: 5rem 0 0;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-about .logo-yetu {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-about p {
    margin: 1rem 0;
    opacity: 0.8;
}

.footer-links h3,
.footer-newsletter h3 {
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--subtle);
    transition: color 0.3s ease;
    display: inline-block;
    padding: 0.3rem 0;
}

.footer-links a:hover {
    color: var(--text);
    transform: translateX(5px);
}

.footer-newsletter input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    background-color: rgba(0,0,0,0.1);
    color: var(--text);
}

.dark-mode .footer-newsletter input {
    background-color: rgba(255,255,255,0.1);
}

.footer-newsletter input::placeholder {
    color: var(--subtle);
}

.footer-newsletter button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-newsletter button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(73, 157, 35, 0.3);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 80%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    color: var(--subtle);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close-modal:hover {
    color: var(--text);
}

#modal-body {
    margin-top: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--surface);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px var(--shadow);
        gap: 1rem;
        border-top: 1px solid var(--border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .radical-banner {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .network-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .network-stats .stat:not(:last-child):after {
        display: none;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section-intro h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .about-card, .project-card, .collective-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}
