:root {
    --bg-deep: #1a1410;
    --bg-panel: rgba(255, 248, 240, 0.94);
    --ink: #1f1712;
    --ink-soft: #5c4c40;
    --accent: #b42318;
    --accent-deep: #7a160f;
    --gold: #c9a227;
    --line: rgba(31, 23, 18, 0.12);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --radius: 18px;
    --font-display: "Outfit", "Noto Sans TC", sans-serif;
    --font-body: "Noto Sans TC", "Outfit", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg-deep);
    line-height: 1.5;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(180, 35, 24, 0.45), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(201, 162, 39, 0.22), transparent 50%),
        linear-gradient(165deg, #2a1c16 0%, #120e0c 45%, #1a1410 100%),
        repeating-linear-gradient(
            -18deg,
            transparent,
            transparent 11px,
            rgba(255, 255, 255, 0.015) 11px,
            rgba(255, 255, 255, 0.015) 12px
        );
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2rem;
    color: #fff8f0;
    animation: rise 0.7s ease-out both;
}

.brand-mark {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.8rem, 8vw, 4.5rem);
    letter-spacing: 0.08em;
    line-height: 0.9;
    color: #fff;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.brand-name {
    margin: 0.15rem 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.brand-tagline {
    margin: 0.65rem 0 0;
    font-size: 1rem;
    color: rgba(255, 248, 240, 0.78);
}

.category-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
    padding: 0 1.5rem;
    animation: rise 0.8s ease-out 0.1s both;
}

.category-nav a {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: #fff8f0;
    background: rgba(255, 248, 240, 0.08);
    border: 1px solid rgba(255, 248, 240, 0.14);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-nav a:hover,
.category-nav a:focus-visible {
    background: rgba(180, 35, 24, 0.35);
    border-color: rgba(201, 162, 39, 0.55);
    transform: translateY(-2px);
    outline: none;
}

.nav-id {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gold);
}

.nav-name {
    font-size: 0.9rem;
    line-height: 1.3;
}

.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.category-section {
    margin-bottom: 1.25rem;
    padding: 1.4rem 1.5rem 1.5rem;
    background: var(--bg-panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: rise 0.75s ease-out both;
}

.category-section:nth-child(1) { animation-delay: 0.12s; }
.category-section:nth-child(2) { animation-delay: 0.16s; }
.category-section:nth-child(3) { animation-delay: 0.2s; }
.category-section:nth-child(4) { animation-delay: 0.24s; }
.category-section:nth-child(5) { animation-delay: 0.28s; }
.category-section:nth-child(6) { animation-delay: 0.32s; }
.category-section:nth-child(7) { animation-delay: 0.36s; }
.category-section:nth-child(8) { animation-delay: 0.4s; }
.category-section:nth-child(9) { animation-delay: 0.44s; }

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.category-id {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.category-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(31, 23, 18, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 23, 18, 0.1);
}

.member-name {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
}

.member-profession {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.4;
}

.empty-state {
    margin: 0;
    padding: 1.5rem;
    color: rgba(255, 248, 240, 0.7);
    background: rgba(255, 248, 240, 0.08);
    border-radius: var(--radius);
}

.error-panel {
    padding: 1.75rem;
    background: var(--bg-panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-panel h2 {
    margin: 0 0 0.5rem;
    color: var(--accent);
}

.error-panel .hint {
    margin-bottom: 0;
    color: var(--ink-soft);
}

.site-footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 2.5rem;
    color: rgba(255, 248, 240, 0.45);
    font-size: 0.85rem;
}

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

@media (max-width: 640px) {
    .site-header {
        padding-top: 2.5rem;
    }

    .member-list {
        grid-template-columns: 1fr;
    }

    .category-nav {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
