/* 
   Mukai Lab Website - Global Styles 
   Theme: Minimal, Modern, Tricolor
*/

:root {
    /* Color Palette */
    --color-base: #FFFFFF;
    --color-contrast: #333333;
    --color-accent: #007AB8;
    --color-light-gray: #F5F7FA;
    --color-text-body: #444444;
    --color-text-muted: #888888;

    /* Typography */
    --font-heading: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    --font-body: "Helvetica Neue", "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    /* Container */
    --container-width: 1100px;
    --header-height: 70px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    background-color: var(--color-base);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #005a87;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-contrast);
    font-weight: 700;
    line-height: 1.4;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-light {
    background-color: var(--color-light-gray);
}

/* Header & Navigation */
header {
    height: var(--header-height);
    background: var(--color-base);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-contrast);
    letter-spacing: 0.05em;
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-links a {
    color: var(--color-contrast);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--color-contrast);
    color: #ffffff;
    padding: var(--spacing-xl) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--color-accent);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #005a87;
    color: white;
    transform: translateY(-2px);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-sm);
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--color-base) 0%, var(--color-light-gray) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* Blur Layer for Hero Background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    animation: heroBlurIn 1.5s ease-out forwards;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeUp 1s ease forwards;
    /* Add white glow for readability */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.5);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-body);
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
    /* Add white glow for readability */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes heroBlurIn {
    0% {
        backdrop-filter: blur(20px);
        background-color: rgba(255, 255, 255, 0.2);
    }

    100% {
        backdrop-filter: blur(0px);
        background-color: rgba(255, 255, 255, 0);
    }
}

/* Cards (for updates, etc) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.card {
    background: white;
    border: 1px solid #eeeeee;
    padding: var(--spacing-lg);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: transparent;
}

.card-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

/* Key features / Topics */
.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.topic-tag {
    background-color: var(--color-light-gray);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-contrast);
}

/* Profile specific */
.profile-header {
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
}

.profile-info h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.profile-role {
    font-size: 1.2rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
}

/* Activity specific */
.activity-item {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid #eeeeee;
}

.activity-item:last-child {
    border-bottom: none;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activities-side .image-placeholder {
    /* Height is handled by aspect-ratio/padding hack in HTML */
    border-radius: 8px;
    /* Optional: adds a bit of polish */
}

/* Responsive */
@media (max-width: 900px) {
    .activities-layout {
        flex-direction: column;
    }

    .activities-side {
        width: 100%;
        height: auto;
        /* Allow auto height */
        position: static;
    }
}

/* Mobile Menu Button (Floating) */
#mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2000;
    /* Highest priority */
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
}

#mobile-menu-btn:hover {
    background-color: #005a87;
    transform: scale(1.05);
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.25rem;
    }

    .profile-header {
        flex-direction: column;
    }

    .nav-container {
        /* Keep flex row for header if we want logo left? 
           Actually current CSS for nav-container is flex row.
           Let's keep logo visible. */
        padding-bottom: 0;
    }

    .nav-links {
        /* Hide by default on mobile */
        display: none;
        flex-direction: column;
        position: fixed;
        bottom: 80px;
        /* Above the button */
        right: 20px;
        background-color: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        z-index: 1999;
    }

    .nav-links.nav-open {
        display: flex;
        animation: fadeUp 0.3s ease forwards;
    }

    .nav-links a {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    #mobile-menu-btn {
        display: flex;
        /* Show on mobile */
    }
}