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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}



/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(120, 12, 38, 0.95); /* Darker red */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.logo-text {
    white-space: nowrap;
    letter-spacing: 0.5px;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-2px);
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #C0C0C0; /* Silver color */
    text-shadow: 0 0 25px rgba(192, 192, 192, 0.4);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2.4rem); /* Smaller minimum size */
    font-weight: 600;
    margin-bottom: 2rem;
    opacity: 0.95;
    letter-spacing: clamp(1px, 0.5vw, 2px); /* Responsive letter spacing */
    color: #C0C0C0; /* Silver color */
    text-shadow: 0 0 15px rgba(192, 192, 192, 0.3);
    display: inline-block; /* Allow for better text wrapping */
    max-width: 100%; /* Ensure it fits container */
    text-align: center; /* Keep centered */
    line-height: 1.2; /* Better line spacing */
}

.hero-description {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    font-weight: 500;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    letter-spacing: 0.3px;
    color: #C0C0C0; /* Silver color */
    min-height: 4rem; /* More space for two lines */
    text-align: center; /* Perfect alignment */
}

/* Typewriter cursor animation */
.typewriter-cursor {
    display: inline-block;
    background-color: #C0C0C0;
    width: 2px;
    height: 1.2em;
    margin-left: 2px;
    animation: blink 1s infinite; /* Slightly slower blink for better visibility */
    box-shadow: 0 0 5px rgba(192, 192, 192, 0.5);
}

@keyframes blink {
    0%, 50% { 
        opacity: 1; 
        background-color: #C0C0C0;
    }
    51%, 100% { 
        opacity: 0; 
        background-color: transparent;
    }
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

/* Mission section needs extra space for triangle */
.mission-section {
    padding: 8rem 0;
}

/* Contact and donate sections need more spacing */
.contact-section {
    padding: 8rem 0;
    margin-top: 30vh; /* Push down by 30% for better centering */
}

.donate-section {
    padding: 8rem 0;
    margin-top: 30vh; /* Push down by 30% of viewport height */
    margin-bottom: 20vh; /* Add 20% space before footer */
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #C0C0C0; /* Silver color */
    text-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

/* Mission Section */
.mission-intro {
    font-size: clamp(1rem, 2.5vw, 1.2rem); /* Responsive font size */
    text-align: center;
    max-width: 90%; /* More responsive width */
    margin: 0 auto 4rem;
    opacity: 0.9;
    line-height: 1.8;
    color: #C0C0C0; /* Silver color */
    min-height: 3rem; /* Space for typewriter */
    padding: 0 1rem; /* Add padding for mobile */
    box-sizing: border-box; /* Include padding in width */
}

.triangle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.mission-triangle {
    position: relative;
    width: 500px; /* 1.25x bigger (400 * 1.25) */
    height: 437px; /* 1.25x bigger (350 * 1.25) */
}

.triangle-svg {
    width: 100%;
    height: 100%;
}

.triangle-edge {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 2;
    transition: all 0.3s ease;
}

.triangle-edge.glow {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: edgeGlow 2s ease-in-out infinite;
}

@keyframes edgeGlow {
    0%, 100% {
        stroke: rgba(255, 255, 255, 0.7);
        stroke-width: 2.5;
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
    }
    50% {
        stroke: rgba(255, 255, 255, 1);
        stroke-width: 3.5;
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
    }
}

.vertex {
    fill: rgba(255, 255, 255, 0.6);
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
    will-change: fill, stroke, filter;
    outline: none; /* Remove default focus outline */
}

.vertex:focus {
    outline: 2px solid #A41034; /* Crimson focus border */
    outline-offset: 2px;
}

.vertex:hover {
    fill: rgba(255, 255, 255, 0.9);
    stroke: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.7));
}

.vertex.active {
    fill: rgba(255, 255, 255, 1);
    stroke: #FFFFFF;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
}

/* Remove vertex highlight since we're focusing on edges */

.mission-box {
    position: absolute;
    width: 280px; /* Clean, consistent width */
    padding: 1.5rem; /* Clean padding */
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}

.mission-box.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mission-box h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem; /* Clean spacing */
    color: #C0C0C0; /* Silver color */
    text-align: center;
    letter-spacing: 0.3px; /* Subtle letter spacing */
}

.mission-box p {
    font-size: 0.95rem;
    line-height: 1.6; /* Clean line spacing */
    color: #C0C0C0; /* Silver color */
    opacity: 0.9;
    text-align: left; /* Clean left alignment */
    padding: 0; /* Remove extra padding */
    margin: 0; /* Clean margins */
}

/* Position each mission box near its corresponding vertex */
.mission-box-education {
    top: -120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.9);
}

.mission-box-education.active {
    transform: translateX(-50%) translateY(0) scale(1);
}

.mission-box-community {
    bottom: -120px;
    right: -140px;
}

.mission-box-career {
    bottom: -120px;
    left: -140px;
}

/* Leadership Section */
.leadership-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column for longer boxes */
    gap: 2rem;
    margin-top: 3rem;
    max-width: 600px; /* Limit width for better readability */
    margin-left: auto;
    margin-right: auto;
}

.leader-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.leader-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border: 1px solid rgba(192, 192, 192, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    will-change: transform; /* Optimize for animations */
    position: relative; /* For LinkedIn indicator positioning */
}

.leader-card:hover {
    transform: translateY(-10px);
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(192, 192, 192, 0.5);
}

/* Add subtle LinkedIn indicator on hover */
.leader-card:hover::after {
    content: "→ LinkedIn";
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 0.8rem;
    color: rgba(192, 192, 192, 0.7);
    opacity: 0;
    animation: fadeInLinkedIn 0.3s ease forwards;
}

@keyframes fadeInLinkedIn {
    to {
        opacity: 1;
    }
}

.leader-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #C0C0C0; /* Silver text */
}

.leader-info h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #E8E8E8; /* Light silver/white for names */
    opacity: 0.95;
}

.leader-info p {
    color: #C0C0C0; /* Silver text */
    opacity: 0.9;
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: #C0C0C0; /* Silver color */
}

.contact-email {
    display: inline-block;
    font-size: clamp(1rem, 3vw, 1.5rem); /* Larger font since it's just "Email" */
    font-weight: 600;
    color: #C0C0C0;
    text-decoration: none;
    padding: clamp(0.8rem, 2.5vw, 1.2rem) clamp(1.5rem, 4vw, 2.5rem); /* More generous padding */
    border: 2px solid #C0C0C0;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    cursor: pointer; /* Show it's clickable */
}

.contact-email:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Donate Section */
.donate-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.donate-content p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: #C0C0C0; /* Silver color */
}

.wallet-selector {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.crypto-dropdown {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(192, 192, 192, 0.3);
    border-radius: 10px;
    padding: 1rem 2.5rem 1rem 1.5rem; /* More right padding for arrow */
    font-size: 1.1rem;
    color: #C0C0C0;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0C0C0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center; /* Position arrow inside the box */
    background-size: 1rem;
}

.crypto-dropdown:focus {
    outline: none;
    border-color: #FFFFFF;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.9);
}

.crypto-dropdown option {
    background: rgba(0, 0, 0, 0.9);
    color: #C0C0C0;
}

.wallet-display {
    display: none;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    border: 1px solid rgba(192, 192, 192, 0.3);
    min-width: 400px;
}

.wallet-display.show {
    display: flex;
    animation: fadeInUp 0.5s ease;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 8px;
    word-break: break-all;
    border: 1px solid rgba(192, 192, 192, 0.3);
    width: 100%;
    text-align: center;
    color: #C0C0C0;
}

.copy-button {
    background: rgba(192, 192, 192, 0.9);
    color: #000000;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.copy-button:hover {
    background: #FFFFFF;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.copy-button.copied {
    background: #4CAF50;
    color: white;
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(120, 12, 38, 0.95); /* Same as navbar */
}

.footer p {
    color: white; /* White text */
    opacity: 1;
    font-size: 0.9rem;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

/* Performance optimizations */
.hero-title,
.section-title,
.vertex,
.leader-card,
.contact-email,
.copy-button {
    will-change: transform;
}

/* Hardware acceleration for smooth animations */
.triangle-svg,
.vertex,
.mission-point {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    margin-right: 0.3rem; /* Closer to right edge but with small distance */
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(120, 12, 38, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 0;
        margin: 0;
        list-style: none;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        text-align: center;
        width: 100%;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    /* Responsive section spacing for tablet */
    .mission-section {
        padding: 6rem 0;
    }
    
    .contact-section {
        margin-top: 20vh; /* Reduced for tablet */
        padding: 6rem 0;
    }
    
    .donate-section {
        margin-top: 20vh; /* Reduced for tablet */
        margin-bottom: 15vh; /* Reduced for tablet */
        padding: 6rem 0;
    }
    
    .mission-triangle {
        width: 350px; /* Responsive triangle size for tablet */
        height: 300px;
    }
    
    .triangle-container {
        min-height: 450px; /* Ensure enough space */
        padding: 2rem 0;
    }
    
    .mission-box {
        width: 260px; /* Tablet width */
        padding: 1.3rem;
    }
    
    .mission-box-education {
        top: -100px;
        left: 50%;
        transform: translateX(-50%) translateY(20px) scale(0.9);
    }
    
    .mission-box-education.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .mission-box-community {
        bottom: -100px;
        right: 15px; /* Keep within screen bounds */
        max-width: calc(100vw - 40px); /* Ensure it doesn't overflow */
    }
    
    .mission-box-career {
        bottom: -100px;
        left: 15px; /* Keep within screen bounds */
        max-width: calc(100vw - 40px); /* Ensure it doesn't overflow */
    }
    
    .wallet-display {
        min-width: 320px;
    }
    
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%; /* Full width on tablet */
    }
    
    .leader-card {
        padding: 1.8rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1rem;
    }
    
    .hero {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
        scroll-margin-top: 80px; /* Adjust scroll target for mobile */
    }
    
    .section-title {
        scroll-margin-top: 100px; /* Better alignment for mobile navigation */
        margin-bottom: 2rem; /* Reduce bottom margin on mobile */
    }
    
    /* Mobile section spacing */
    .mission-section {
        padding: 4rem 0;
    }
    
    .contact-section {
        margin-top: 15vh; /* Further reduced for mobile */
        padding: 4rem 0;
    }
    
    .donate-section {
        margin-top: 15vh; /* Further reduced for mobile */
        margin-bottom: 10vh; /* Further reduced for mobile */
        padding: 4rem 0;
    }
    
    .mission-triangle {
        width: 280px; /* Mobile triangle size */
        height: 245px;
    }
    
    .triangle-container {
        min-height: 380px; /* Increased height to accommodate boxes */
        padding: 1.5rem 0 2rem 0; /* Added bottom padding for box space */
        overflow: visible; /* Allow boxes to show properly */
        position: relative; /* Ensure proper positioning context */
    }
    
    .mission-box {
        width: 220px; /* Mobile width */
        padding: 1.1rem;
        font-size: 0.9rem;
        word-wrap: break-word; /* Ensure text wraps properly */
        overflow-wrap: break-word; /* Additional text wrapping */
        box-sizing: border-box; /* Include padding in width calculation */
    }
    
    .mission-box-education {
        top: -80px;
        left: 50%;
        transform: translateX(-50%) translateY(20px) scale(0.9);
    }
    
    .mission-box-education.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .mission-box-community {
        bottom: -60px; /* Moved up to prevent bottom cutoff */
        right: 10px; /* Keep within screen bounds */
        max-width: calc(100vw - 30px); /* Ensure it doesn't overflow */
    }
    
    .mission-box-career {
        bottom: -60px; /* Moved up to prevent bottom cutoff */
        left: 10px; /* Keep within screen bounds */
        max-width: calc(100vw - 30px); /* Ensure it doesn't overflow */
    }
    
    .wallet-display {
        min-width: 280px;
        padding: 1.5rem;
    }
    
    .leadership-grid {
        gap: 1.2rem;
        max-width: 100%; /* Full width on mobile */
    }
    
    .leader-card {
        padding: 1.5rem;
    }
    
    /* Mobile-specific contact email styling */
    .contact-email {
        font-size: clamp(0.9rem, 3.5vw, 1.2rem); /* Good size for "Email" button */
        padding: 0.8rem 1.5rem; /* Comfortable padding for button */
        min-width: 120px; /* Ensure button has good size */
    }
    
    .contact-content {
        padding: 0 0.5rem; /* Add side padding to container */
    }
    
    /* Mobile hero subtitle adjustments */
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.8rem); /* Even smaller on mobile */
        letter-spacing: 1px; /* Reduced letter spacing */
        line-height: 1.3; /* Better mobile line height */
        padding: 0 0.5rem; /* Add padding to prevent edge touching */
        word-spacing: 0.2em; /* Better word spacing for mobile */
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}