/* ===================================
   CRE 2026 Tokyo - Cyber-Modern Design (Fixed Neon)
   =================================== */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&family=Shippori+Mincho+B1:wght@500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
    /* Glass Effect Colors */
    --glass-surface: #ffffff; 
    --glass-border: rgba(255, 255, 255, 0.6); 
    --glass-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Text Colors */
    --text-primary: #050505;
    --text-secondary: #333333;
    --text-light: #ffffff;
    --text-light-muted: #e5e7eb;
    
    /* Brand Colors */
    --brand-primary: #bc002d; /* Japan Red */
    --brand-secondary: #D4AF37; /* Gold */
    --brand-accent: #2C7A7B; /* Teal */
    
    /* Future Gimmick Colors */
    --future-cyan: #00f2ff;
    --neon-gradient: linear-gradient(90deg, #bc002d, #00f2ff, #bc002d);
    
    /* Spacing & Layout */
    --container-width: 1100px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --radius-pill: 50px;
}

/* ===================================
   Animations
   =================================== */
@keyframes neon-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================================
   Base & Reset
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    background-color: #0f172a;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6, 
.section-title, 
.logo-title, 
.museum-title-group h3,
.hero-glass h1 {
    font-family: 'Shippori Mincho B1', serif;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb {
    background: var(--neon-gradient);
    background-size: 200% 200%;
    animation: neon-flow 3s linear infinite;
    border-radius: 4px;
    border: 1px solid #1a1a1a;
}

/* ===================================
   Backgrounds & Overlays
   =================================== */
.bg-study { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/bg-study.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.bg-venue { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/bg-venue.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.bg-museum { background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/bg-museum.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.bg-tokyo-day { background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/bg-tokyo-day.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }

#bg-slideshow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.bg-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 2s ease-in-out; transform: scale(1.05); }
.bg-slide.active { opacity: 1; transform: scale(1); transition: opacity 2s ease-in-out, transform 10s linear; }
.bg-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); z-index: -1; }

/* ===================================
   Glass Components (Cards) - ROTATING BORDER FIX
   =================================== */
.glass-card, .info-card, .museum-card, .hero-glass {
    position: relative;
    background: transparent; /* Must be transparent for layers to work */
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
    overflow: hidden; /* Clips the rotating light */
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none; /* No default border */
    display: flex;
    flex-direction: column;
}

/* Special sizing for Hero */
.hero-glass {
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    /* Stronger Neon Glow Shadow */
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5), 
        0 0 30px rgba(0, 242, 255, 0.3), 
        0 0 15px rgba(188, 0, 45, 0.3);
}

/* Layer 1: The Rotating Light (Background) */
.glass-card::before, .info-card::before, .museum-card::before, .hero-glass::before {
    content: '';
    position: absolute;
    z-index: -2;
    top: 50%;
    left: 50%;
    width: 200%; /* Much larger than card */
    height: 200%;
    /* Conic gradient creates the beam of light */
    background: conic-gradient(
        transparent, 
        transparent 70%, 
        var(--brand-primary), 
        var(--future-cyan),
        var(--brand-primary)
    );
    animation: rotate 4s linear infinite;
    /* Hero is always visible, others on hover or slightly visible */
    opacity: 0; 
    transition: opacity 0.3s ease;
}

.hero-glass::before {
    opacity: 1; /* Hero always bright */
}

/* Layer 2: The White Plate (Mask) */
.glass-card::after, .info-card::after, .museum-card::after, .hero-glass::after {
    content: '';
    position: absolute;
    z-index: -1;
    /* Create the gap for the border */
    inset: 3px; 
    background: #ffffff; /* Solid White */
    border-radius: calc(var(--radius-md) - 3px);
}

.hero-glass::after {
    border-radius: calc(var(--radius-lg) - 4px); /* Match thicker hero border */
    inset: 4px;
}

/* Hover Effects */
.glass-card:hover, .info-card:hover, .museum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 25px rgba(0, 242, 255, 0.3);
    background: transparent; 
}

.glass-card:hover::before, .info-card:hover::before, .museum-card:hover::before {
    opacity: 1; /* Light up on hover */
    filter: brightness(1.3);
}

/* Spacing for buttons inside cards */
.glass-card .btn, .info-card .btn, .museum-card .btn {
    margin-top: 2rem; /* Ensure minimum space */
    align-self: flex-start; /* Or center, depending on design */
    width: auto;
}

/* Text Colors inside Cards */
.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4, .glass-card h5, .glass-card h6,
.info-card h3, .museum-card h3, .museum-card h4, .hero-glass h1 { 
    color: var(--text-primary); 
    font-family: 'Shippori Mincho B1', serif;
    font-weight: 700;
    margin-bottom: 1.5rem; /* Increased spacing */
}

/* Override font for Contact section headers to be Sans-Serif */
#t-home-contact .glass-card h4 {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.glass-card p, .glass-card li, .glass-card span,
.info-card p, .museum-card p, .museum-card li, .museum-card span,
.hero-glass p, .hero-glass strong, .hero-glass span { 
    color: var(--text-secondary); 
}

.info-card { text-align: center; align-items: center; }
.info-card-icon { font-size: 2rem; margin-bottom: 1rem; display: block; color: var(--brand-primary); }

/* Museum Card specifics */
.museum-header { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.museum-icon { font-size: 2.2rem; color: var(--brand-primary); flex-shrink: 0; }
.museum-title-group h3 { margin-bottom: 0.25rem; font-size: 1.3rem; color: var(--text-primary); }
.museum-title-en { font-size: 0.9rem; font-style: italic; color: var(--text-secondary); font-family: 'Inter', sans-serif; }
.museum-info-item { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.museum-info-item i { color: var(--brand-primary); font-size: 1.1rem; margin-top: 0.25rem; }
.museum-highlights { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.museum-highlights h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.museum-highlights ul { padding: 0; list-style: none; }
.museum-highlights li { padding-left: 1.25rem; margin-bottom: 0.25rem; position: relative; color: var(--text-secondary); font-size: 0.95rem; }
.museum-highlights li::before { content: '•'; color: var(--brand-secondary); position: absolute; left: 0; font-weight: bold; }
.museum-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brand-primary); font-weight: 700; margin-top: auto; padding-top: 1rem; transition: gap 0.3s ease; font-size: 0.9rem; }
.museum-link:hover { gap: 0.75rem; }

.section { padding: 3rem 0; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent; 
}

/* Primary Button */
.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(188, 0, 45, 0.4);
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: var(--future-cyan);
    border-color: var(--future-cyan);
    box-shadow: 0 0 20px var(--future-cyan), 0 0 40px var(--future-cyan);
    color: #000;
}

/* Secondary Button (Dark text for white backgrounds) */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
    backdrop-filter: none;
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 0 15px var(--brand-primary);
}

/* ===================================
   Header & Logo
   =================================== */
header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    z-index: 100; transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px); border-bottom: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); color: var(--text-primary);
}

header::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
    background: var(--neon-gradient); background-size: 200% 200%;
    animation: neon-flow 3s linear infinite; box-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.header-container {
    max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem;
    height: 100%; display: grid; grid-template-columns: auto 1fr auto;
    align-items: center; position: relative;
}

@media (max-width: 900px) {
    .header-container { display: flex; justify-content: center; position: relative; }
}

.logo { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; z-index: 101; position: relative; left: auto; }
.logo-image { height: 40px; width: auto; transition: transform 0.3s ease; } 
.logo:hover .logo-image { transform: scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-title { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 1.25rem; color: var(--text-primary); letter-spacing: -0.02em; }
.logo-subtitle { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.75rem; color: var(--brand-primary); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1px; }

/* ===================================
   Navigation
   =================================== */
nav { display: flex; justify-content: center; }
nav ul { display: flex; gap: 0.5rem; list-style: none; align-items: center; }
nav ul li { position: relative; height: 100%; display: flex; align-items: center; }

nav ul li > a {
    font-weight: 600; font-size: 0.9rem; color: var(--text-primary);
    padding: 0.5rem 1rem; position: relative; letter-spacing: 0.02em;
    border-radius: var(--radius-pill); transition: all 0.3s ease;
    overflow: hidden; z-index: 1;
}

nav ul li > a::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--neon-gradient); background-size: 200% 200%;
    animation: neon-flow 3s linear infinite; z-index: -1; opacity: 0;
    transition: opacity 0.3s ease; border-radius: var(--radius-pill);
}

nav ul li:hover > a {
    color: white; transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
nav ul li:hover > a::before { opacity: 1; }
nav ul li > a::after { display: none; }

nav ul li.has-dropdown > a { padding-right: 1.6rem; }
nav ul li.has-dropdown > a::after {
    content: '▾'; position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
    font-size: 0.8em; transition: transform 0.3s ease; display: block; width: auto; height: auto; background: none; color: inherit;
}
nav ul li.has-dropdown:hover > a::after { transform: translateY(-50%) rotate(180deg); }

.dropdown {
    position: absolute; top: 110%; left: 50%; transform: translateX(-50%) translateY(10px);
    min-width: 180px; background: rgba(255, 255, 255, 0.98); border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.05);
    opacity: 0; visibility: hidden; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem; display: flex; flex-direction: column; gap: 0.1rem;
    z-index: 200; overflow: hidden;
}
.dropdown::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: var(--neon-gradient); background-size: 200% 200%; animation: neon-flow 2s linear infinite;
}
nav ul li.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown li a { display: block; padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text-secondary); border-radius: 4px; }
.dropdown li a:hover { background: rgba(0, 242, 255, 0.08); color: var(--brand-primary); padding-left: 1.2rem; text-shadow: none; }

/* Mobile Menu */
.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.5rem; justify-self: end; }
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s ease; }
@media (max-width: 900px) {
    .mobile-menu-toggle { display: flex; position: absolute; right: 1.5rem; }
    nav { position: absolute; top: 100%; left: 0; width: 100%; background: #ffffff; padding: 1rem; display: none; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
    nav.active { display: flex; }
    nav ul { flex-direction: column; gap: 0.5rem; width: 100%; }
    nav ul li { width: 100%; }
    nav ul li > a { display: block; padding: 1rem; width: 100%; border-radius: 8px; text-align: left; }
    .dropdown { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; background: #f9fafb; display: none; width: 100%; padding-left: 1rem; }
    nav ul li.active .dropdown { display: block; }
}

/* ===================================
   Hero & Sections
   =================================== */
.hero { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding-top: var(--header-height); position: relative; }
.hero-content { width: 100%; max-width: 900px; padding: 0 2rem; text-align: center; }

.hero-logo-large { margin-bottom: 1rem; animation: fadeIn 1.2s ease; position: relative; z-index: 2; }
.hero-logo-large img { max-height: 120px; width: auto; }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; color: var(--text-primary); position: relative; z-index: 2; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; position: relative; z-index: 2; }
.hero-details { position: relative; z-index: 2; display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; padding: 1rem 0; border-top: 1px solid rgba(0,0,0,0.1); border-bottom: 1px solid rgba(0,0,0,0.1); }
.hero-detail-item .icon { font-size: 1.2rem; margin-bottom: 0.25rem; }
.hero-detail-item strong { font-size: 0.95rem; }
.hero-detail-item span { font-size: 0.85rem; }
.hero-cta { position: relative; z-index: 2; display: flex; justify-content: center; gap: 1rem; }

/* Section Headers - Compact */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-title { font-size: 1.8rem; margin-bottom: 0.25rem; position: relative; display: inline-block; color: var(--text-light); }
.section-title::after { content: ''; display: block; width: 120px; height: 4px; background: var(--neon-gradient); background-size: 200% 200%; animation: neon-flow 2s linear infinite; margin: 0.5rem auto 0; border-radius: 2px; }
.section-description { font-size: 1rem; color: var(--text-light-muted); }

/* Timeline */
.timeline { position: relative; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.timeline-item { 
    padding: 0; margin: 0; display: flex; align-items: stretch; 
    background: transparent; 
}
.timeline-item::before { display: none; }

/* Date Box */
.timeline-date {
    writing-mode: horizontal-tb; 
    width: 150px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-light);
    background: rgba(0,0,0,0.3); 
    border-radius: var(--radius-md);
    margin-right: 1rem;
    border: 1px solid var(--glass-border);
}

.timeline-content { 
    position: relative;
    background: transparent;
    padding: 1.5rem; 
    border-radius: var(--radius-md); 
    box-shadow: var(--glass-shadow); 
    color: var(--text-primary); 
    overflow: hidden; z-index: 1; flex-grow: 1;
    transition: transform 0.3s ease;
}
/* Neon Logic for Timeline Content */
.timeline-content::before {
    content: ''; position: absolute; z-index: -2; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent 80%, var(--brand-primary), var(--future-cyan));
    animation: rotate 4s linear infinite; opacity: 0.5; transition: opacity 0.3s ease;
}
.timeline-content::after {
    content: ''; position: absolute; z-index: -1; inset: 3px;
    background: var(--glass-surface); border-radius: calc(var(--radius-md) - 3px);
}

.timeline-content:hover { transform: translateX(5px); }
.timeline-content:hover::before { opacity: 1; filter: brightness(1.2); }
.timeline-content h3 { color: var(--text-primary); margin-bottom: 0.25rem; font-size: 1.1rem; }
.timeline-content p { color: var(--text-secondary); margin: 0; font-size: 0.9rem; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { 
    .grid-2, .grid-3 { grid-template-columns: 1fr; } 
    .timeline-item { flex-direction: column; }
    .timeline-date { width: 100%; margin-right: 0; margin-bottom: 0.5rem; height: auto; padding: 0.5rem; }
}

/* Footer */
footer { background: #ffffff; padding: 2rem 0 1rem; margin-top: 3rem; color: var(--text-primary); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }
.footer-section h3 { margin-bottom: 0.75rem; font-size: 1rem; color: var(--text-primary); font-family: 'Shippori Mincho B1', serif; }
.footer-bottom { text-align: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.1); color: var(--text-muted); font-size: 0.8rem; }

/* Scroll to top */
.scroll-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 40px; height: 40px; background: var(--brand-primary); color: white; border: none; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: none; align-items: center; justify-content: center; font-size: 1rem; z-index: 99; transition: all 0.3s ease; }
.scroll-to-top:hover { transform: translateY(-3px); background: var(--future-cyan); box-shadow: 0 0 20px var(--future-cyan); }

/* ===================================
   Page Specific Styles
   =================================== */
/* Committee Grid (committee.html) */
.committee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.member-card { display: flex; flex-direction: column; height: 100%; }
.member-image { width: 100%; height: 350px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.member-info h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.member-affiliation { font-size: 0.9rem; color: var(--brand-primary); font-weight: 600; margin-bottom: 1rem; display: block; }
.member-bio { font-size: 0.95rem; line-height: 1.7; color: var(--text-secondary); }
.chair-card { grid-column: 1 / -1; display: grid; grid-template-columns: 300px 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .chair-card { grid-template-columns: 1fr; gap: 1.5rem; } .chair-card .member-image { height: 400px; } }
.iframe-container { position: relative; width: 100%; height: 800px; overflow: hidden; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--glass-border); }
.iframe-container iframe { width: 100%; height: 100%; border: none; }
