/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette - Deep Water Blue & Bronze (Academic & Traditional) */
    --primary-hue: 215;
    --primary-sat: 65%;
    --primary-lightness: 25%;
    
    --primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-lightness)); /* #16365c Deep Indigo / Navy */
    --primary-hover: hsl(var(--primary-hue), var(--primary-sat), calc(var(--primary-lightness) - 8%));
    --primary-light: #f1f5f9;
    --primary-glow: hsla(var(--primary-hue), var(--primary-sat), var(--primary-lightness), 0.15);
    
    --secondary: #b45309; /* Bronze / Dark Amber */
    --secondary-hover: #92400e;
    
    --dark: #0f172a; /* Slate 900 */
    --text: #334155; /* Slate 700 */
    --text-muted: #64748b; /* Slate 500 */
    --light: #f8fafc; /* Slate 50 */
    --white: #ffffff;
    
    --success: #059669; /* Emerald 600 */
    --border-color: #e2e8f0; /* Slate 200 */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-soft: linear-gradient(180deg, var(--white) 0%, var(--primary-light) 100%);
    
    /* Fonts - Serif for headings (Traditional feel), Sans-serif for body */
    --font-heading: 'Noto Serif JP', 'Sawarabi Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', 'MS Mincho', serif;
    --font-body: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    --shadow-primary: 0 10px 20px -5px hsla(var(--primary-hue), var(--primary-sat), var(--primary-lightness), 0.3);
    
    /* Layout */
    --container-width: 1200px;
    --border-radius-sm: 6px; /* Slightly sharper corners for academic feel */
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   REUSABLE UTILITIES
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hide { display: none !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    padding: 12px 28px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.125rem;
    border-radius: var(--border-radius-md);
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 24px -5px hsla(var(--primary-hue), var(--primary-sat), var(--primary-lightness), 0.4);
}

.btn-secondary {
    background-color: var(--light);
    color: var(--dark);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

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

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

.btn-block {
    display: flex;
    width: 100%;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(3, 105, 161, 0.1); /* Subtle Blue */
    color: #0369a1;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.badge-light {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

/* Sections General */
section {
    padding: 100px 0;
}

.section-header {
    max-width: 650px;
    margin-bottom: 60px;
}

.section-header.text-center {
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--secondary); /* Bronze accent */
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text);
    font-family: var(--font-body);
}

.nav-link:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: 180px;
    padding-bottom: 100px;
    background: var(--gradient-soft);
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    position: relative;
    z-index: 2;
}

.hero-image-bg-effect {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
}

.hero-img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    animation: floatAnimation 8s ease-in-out infinite;
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   STATS BAR
   ========================================================================== */
.stats-section {
    padding: 50px 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 16px;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ==========================================================================
   ABOUT & MISSION
   ========================================================================== */
.about-section {
    background-color: var(--white);
}

.about-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.about-card {
    padding: 40px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 24px;
}

.icon-blue {
    background-color: #f0f9ff;
    color: #0284c7;
}

.icon-green {
    background-color: #f0fdf4;
    color: #16a34a;
}

.icon-orange {
    background-color: #fffbeb;
    color: #d97706;
}

.about-card h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    font-family: var(--font-heading);
}

.about-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-section {
    background-color: var(--light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-img-container {
    height: 200px;
    position: relative;
}

.project-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.project-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
    opacity: 0.9;
}

.project-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-progress {
    margin-bottom: 24px;
}

.progress-bar-wrapper {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 50px;
    transition: width 1s ease-out;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   JOIN US / FORM SECTION
   ========================================================================== */
.join-section {
    background-color: var(--primary); /* Deep Indigo */
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.join-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
}

.join-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.join-info h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.join-info p {
    color: #cbd5e1; /* Slate 300 */
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.contact-points {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.contact-item h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: var(--font-heading);
}

.contact-item p {
    color: #cbd5e1;
    margin: 0;
    font-size: 0.95rem;
}

.join-form-wrapper {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.join-form-wrapper h3 {
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
    background-color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.success-message {
    text-align: center;
    padding: 30px 10px;
}

.success-message i {
    font-size: 3.5rem;
    color: var(--success);
    margin-bottom: 16px;
}

.success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.success-message p {
    color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
#main-footer {
    background-color: #0b0f19;
    color: #94a3b8;
    padding: 80px 0 0 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.footer-brand p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.1rem;
}

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

.footer-links h4,
.footer-newsletter h4 {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

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

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-newsletter p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    position: relative;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 50px 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--white);
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--secondary);
}

.newsletter-form button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 40px;
    background-color: var(--secondary);
    border: none;
    border-radius: 4px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--secondary-hover);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0;
    font-size: 0.875rem;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom-flex a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    section { padding: 80px 0; }
    .hero-title { font-size: 2.75rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .navbar { height: 70px; }
    .mobile-menu-toggle { display: block; }
    
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 30px 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .about-cards-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .join-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .join-form-wrapper {
        padding: 30px 20px;
    }
    
    .footer-bottom-flex {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.25rem; }
    .hero-actions { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
