:root {
    --primary-color: #82689d; /* Match the exact purple from the mockup */
    --primary-light: #a38fbb;
    --primary-bg: #f5f2f8; /* Very light purple/gray for backgrounds */
    --accent-color: #d8b579; /* Match the gold/brass from the mockup */
    --text-main: #5a5a5a;
    --text-muted: #828282;
    --text-light: #a9a9a9;
    --white: #ffffff;
    --border-color: #e6dfea;
    --shadow-sm: 0 4px 6px rgba(130, 104, 157, 0.05);
    --shadow-md: 0 8px 15px rgba(130, 104, 157, 0.08);
    --shadow-lg: 0 15px 30px rgba(130, 104, 157, 0.1);
    
    --font-heading: 'Outfit', 'Chiron Hei HK', 'Noto Sans TC', sans-serif;
    --font-body: 'Outfit', 'Chiron Hei HK', 'Noto Sans TC', sans-serif;
    --font-signature: 'Pinyon Script', cursive;
    --font-display-serif: 'Playfair Display', 'Cormorant Garamond', 'Cactus Classical Serif', 'Noto Serif TC', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(16px, 2vw, 24px);
}

/* Background Decorations */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(216,181,121,0.2) 0%, rgba(255,255,255,0) 70%);
}

.blob-2 {
    bottom: 10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(130,104,157,0.15) 0%, rgba(255,255,255,0) 70%);
}

.dots {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(var(--border-color) 2px, transparent 2px);
    background-size: 15px 15px;
}

.dots-1 {
    top: 20%;
    right: 15%;
}

.dots-2 {
    bottom: 30%;
    left: 10%;
}

.lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Navigation */
.navbar {
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(10px, 1.5vw, 24px);
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: clamp(48px, 4vw, 70px);
    max-height: 70px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: clamp(4px, 0.7vw, 10px);
    align-items: center;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.nav-item {
    position: relative;
    list-style: none;
    flex-shrink: 0;
    white-space: nowrap !important;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.5vw, 8px);
    padding: 7px clamp(6px, 0.7vw, 12px);
    color: var(--text-main);
    font-size: clamp(12.5px, 0.9vw, 14px);
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.nav-btn span {
    white-space: nowrap !important;
    display: inline-block;
}

.nav-btn:hover {
    background-color: var(--primary-bg);
    color: var(--primary-color);
}

.nav-icon {
    width: clamp(17px, 1.2vw, 20px);
    height: clamp(17px, 1.2vw, 20px);
    object-fit: contain;
    mix-blend-mode: multiply;
    flex-shrink: 0;
}

.nav-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-item.dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 260px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(130, 104, 157, 0.1);
    border: 1px solid var(--border-color);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-item.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-links a {
    font-size: 13px;
    color: var(--text-main);
    text-decoration: none;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.dropdown-links a:hover {
    color: var(--primary-color);
    border-left-color: var(--accent-color);
}

.nav-links a.active::after {
    content: '✦';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--accent-color);
}

/* Navigation Admin & Mobile Quick Entry */
.nav-actions-mobile {
    display: none;
    align-items: center;
    gap: 12px;
}

.mobile-quick-admin-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(130, 104, 157, 0.32);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(130, 104, 157, 0.08);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.mobile-quick-admin-btn i {
    font-size: 12px;
    color: var(--accent-color);
    transition: transform 0.25s ease;
}

.mobile-quick-admin-btn:hover,
.mobile-quick-admin-btn:active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(130, 104, 157, 0.22);
}

.mobile-quick-admin-btn:hover i,
.mobile-quick-admin-btn:active i {
    color: #ffffff;
    transform: scale(1.1);
}

.nav-admin-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 243, 251, 0.92));
    border: 1px solid rgba(130, 104, 157, 0.35);
    color: var(--primary-color) !important;
    font-weight: 600;
    padding: 7px clamp(8px, 0.9vw, 15px);
    font-size: clamp(12.5px, 0.9vw, 14px);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(130, 104, 157, 0.06);
    transition: all 0.25s ease;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.nav-admin-btn span {
    white-space: nowrap !important;
    display: inline-block;
}

.nav-admin-btn i {
    flex-shrink: 0;
}

.nav-admin-btn:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(130, 104, 157, 0.24);
    transform: translateY(-1px);
}

.nav-admin-btn:hover i {
    color: #ffffff !important;
}

/* Typography & Utilities */
.signature-font {
    font-family: var(--font-signature);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

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

.btn-primary i {
    color: var(--accent-color);
}

.btn-outline {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

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

.btn-outline i {
    color: var(--accent-color);
}

.btn-sm {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-sm:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 100px 0 120px;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1.15;
    max-width: 680px;
}

.hero-title {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.1;
}

.hero-title::after {
    content: '';
    display: block;
    width: 200px;
    height: 1px;
    background-color: var(--accent-color);
    margin: 20px 0;
    opacity: 0.6;
}

.hero-subtitle {
    font-family: var(--font-display-serif);
    font-size: clamp(17px, 1.85vw, 22.5px);
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 0.6px;
    white-space: nowrap;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.hero-subtitle .amp {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--accent-color);
    margin: 0 4px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.hero-subtitle:hover .amp {
    transform: scale(1.15) rotate(3deg);
}

.hero-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.graphic-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.main-graphic {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(106, 74, 130, 0.15));
    animation: float 6s ease-in-out infinite;
}

.placeholder-main-graphic {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.diamond-shape {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    transform: rotate(45deg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.diamond-shape::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

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

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 60px;
}

.section-header .line {
    height: 1px;
    background-color: var(--accent-color);
    width: 120px;
    opacity: 0.5;
    position: relative;
}

.section-header .line::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: var(--accent-color);
}

.section-title {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    font-family: var(--font-heading);
    text-align: center;
}

.section-title span {
    display: block;
    font-size: 24px;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Main Layout Section */
.main-layout-section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.layout-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* Sidebar was removed */

/* Main Content: Featured List */
.main-content {
    flex: 1;
    min-width: 0;
}

.section-header.align-left {
    justify-content: flex-start;
    margin-bottom: 40px;
}

.section-header.align-left .line {
    flex: 1;
}

/* Project Filter Bar */
.project-filter-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 35px;
}

.project-filter-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top: 1.5px solid rgba(255, 255, 255, 0.98);
    border-radius: 40px;
    box-shadow: 
        0 10px 28px -6px rgba(130, 104, 157, 0.08),
        0 2px 6px rgba(216, 181, 121, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    color: var(--primary-color);
    background: rgba(130, 104, 157, 0.06);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(130, 104, 157, 0.28);
}

.filter-btn.active i {
    color: var(--accent-color);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    border-radius: 10px;
    background: rgba(130, 104, 157, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Glassmorphism Featured Card */
.featured-item {
    display: flex;
    gap: 40px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-top: 1.5px solid rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 16px 38px -8px rgba(130, 104, 157, 0.09),
        0 4px 12px rgba(216, 181, 121, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
    align-items: stretch;
    position: relative;
}

.featured-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.95) 20%, rgba(216, 181, 121, 0.45) 50%, rgba(255, 255, 255, 0.95) 80%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.featured-item:hover {
    transform: translateY(-7px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 
        0 24px 50px -10px rgba(130, 104, 157, 0.16),
        0 8px 22px rgba(216, 181, 121, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    border-color: rgba(216, 181, 121, 0.55);
}

.featured-img-wrapper {
    flex: 0 0 40%;
    background: linear-gradient(135deg, rgba(250, 249, 251, 0.65) 0%, rgba(243, 239, 247, 0.4) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(230, 223, 234, 0.5);
}

.featured-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 0%, rgba(216, 181, 121, 0.05) 50%, rgba(130, 104, 157, 0.05) 100%);
    pointer-events: none;
}

.featured-img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    transition: transform 0.5s ease;
    mix-blend-mode: multiply;
}

.featured-item:hover .featured-img {
    transform: scale(1.05);
}

.featured-details {
    flex: 1;
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Category Badges */
.featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.featured-tag.tag-teaching {
    background: rgba(130, 104, 157, 0.09);
    color: #685081;
    border: 1px solid rgba(130, 104, 157, 0.22);
}

.featured-tag.tag-teaching i {
    color: var(--primary-color);
}

.featured-tag.tag-counseling {
    background: rgba(216, 181, 121, 0.16);
    color: #94712e;
    border: 1px solid rgba(216, 181, 121, 0.35);
}

.featured-tag.tag-counseling i {
    color: #a67c2e;
}

.featured-tag.tag-tools {
    background: rgba(104, 128, 152, 0.12);
    color: #425b74;
    border: 1px solid rgba(104, 128, 152, 0.25);
}

.featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.featured-meta-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.featured-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-family: var(--font-body);
    color: #7d728e;
    background: rgba(130, 104, 157, 0.07);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(220, 212, 226, 0.6);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.featured-date i {
    color: var(--accent-color);
    font-size: 11px;
}

/* 14-Day Update / New Badges */
.badge-updated {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: #8c5717;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.85));
    border: 1px solid rgba(217, 119, 6, 0.35);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
    transition: all 0.3s ease;
    animation: gentlePulse 2.8s ease-in-out infinite;
}

.badge-updated i {
    color: #d97706;
    font-size: 10px;
}

.badge-updated.badge-new {
    color: #3b2066;
    background: linear-gradient(135deg, rgba(243, 232, 255, 0.95), rgba(216, 181, 121, 0.35));
    border: 1px solid rgba(130, 104, 157, 0.45);
    box-shadow: 0 2px 10px rgba(130, 104, 157, 0.22);
}

.badge-updated.badge-new i {
    color: #7b4ec2;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.18);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
    }
}

.featured-title {
    font-size: 21px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

.featured-desc {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 25px;
    text-align: justify;
}

.featured-details .btn {
    align-self: flex-start;
}

/* Filter Hide/Show Transitions */
.featured-item.is-hidden {
    display: none !important;
}

.featured-item.is-visible {
    animation: cardGlassFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardGlassFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Footer */
footer {
    background: linear-gradient(90deg, #f2ecf8 0%, #f6f4f8 50%, #f1ebf6 100%);
    padding: 30px 0;
    border-top: 1px solid rgba(216, 181, 121, 0.25);
    border-bottom: 1px solid rgba(216, 181, 121, 0.15);
    position: relative;
    overflow: hidden;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo img {
    height: 65px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.footer-slogan {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 14px;
    color: #726585;
    letter-spacing: 1.5px;
}

.footer-star {
    font-size: 10px;
    color: var(--accent-color);
    margin-bottom: 5px;
    text-align: center;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-email {
    font-size: 13px;
    color: #726585;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.footer-email:hover {
    color: var(--primary-color);
}

.footer-divider {
    color: rgba(114, 101, 133, 0.3);
    font-size: 14px;
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-socials a {
    color: #726585;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-crystal {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.footer-crystal img {
    height: 60px;
    object-fit: contain;
    mix-blend-mode: multiply;
    animation: float 4s ease-in-out infinite;
}

/* Footer Live Online & Analytics Indicator */
.footer-live-stats {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: #726585;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(216, 181, 121, 0.45);
    padding: 4px 14px;
    border-radius: 20px;
    margin-top: 8px;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.footer-live-stats:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(130, 104, 157, 0.18);
}

.footer-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.footer-admin-link {
    color: #726585;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    opacity: 0.75;
}

.footer-admin-link:hover {
    color: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
}

/* About Section */
.about-section {
    padding: 120px 0;
    min-height: calc(100vh - 180px);
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-content {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 50px 60px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-top: 1.5px solid rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 16px 40px -10px rgba(130, 104, 157, 0.10),
        0 4px 14px rgba(216, 181, 121, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    position: relative;
}

/* About Me Portrait Showcase */
.about-profile-hero {
    display: flex;
    justify-content: center;
    margin-bottom: 45px;
    padding-top: 10px;
}

.about-portrait-card {
    position: relative;
    max-width: 330px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portrait-glow {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(216, 181, 121, 0.32) 0%, rgba(130, 104, 157, 0.22) 50%, transparent 72%);
    filter: blur(28px);
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
}

.about-portrait-picture {
    display: block;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    position: relative;
    z-index: 1;
    border-radius: 24px;
    overflow: hidden;
}

.about-portrait-img {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
    z-index: 1;
    border: none !important;
    outline: none !important;
    box-shadow: 0 10px 30px -6px rgba(130, 104, 157, 0.16);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.about-portrait-card:hover .about-portrait-img {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -6px rgba(130, 104, 157, 0.22);
}

.about-portrait-badge {
    position: relative;
    z-index: 2;
    margin-top: -18px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 20px;
    border-radius: 24px;
    border: 1px solid rgba(216, 181, 121, 0.55);
    box-shadow: 0 6px 20px rgba(130, 104, 157, 0.14);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.about-portrait-badge .portrait-sparkle {
    color: var(--accent-color);
    font-size: 12px;
}

/* Fallback legacy wrapper */
.about-img-wrapper {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-heading {
    font-size: 22px;
    color: var(--primary-color);
    margin: 30px 0 15px;
    font-family: var(--font-heading);
}

.about-content p {
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content strong {
    color: var(--primary-color);
    font-weight: 500;
}

.about-list {
    margin: 20px 0 30px 20px;
}

.about-list li {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.about-list i {
    color: var(--accent-color);
    margin-top: 4px;
    font-size: 14px;
}

.about-divider {
    width: 100px;
    height: 1px;
    background-color: var(--accent-color);
    margin: 40px auto;
    opacity: 0.3;
}

.about-feature-box {
    background-color: var(--primary-bg);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 4px solid var(--primary-color);
}

.about-numbered-list {
    padding-left: 20px;
}

.about-numbered-list li {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-numbered-list li:last-child {
    margin-bottom: 0;
}

.about-conclusion {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 18px !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 1080px) {
    .nav-actions-mobile {
        display: flex;
    }
    
    .mobile-quick-admin-btn {
        display: inline-flex;
    }

    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        box-shadow: 0 10px 30px rgba(130, 104, 157, 0.1);
        border-top: 1px solid var(--border-color);
        transition: all 0.3s ease-in-out;
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }

    .nav-admin-item {
        margin-top: 10px;
        padding: 0 24px;
        width: 100%;
        max-width: 320px;
    }

    .nav-admin-item .nav-admin-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14.5px;
        background: linear-gradient(135deg, rgba(130, 104, 157, 0.08), rgba(216, 181, 121, 0.14));
        border: 1.5px solid rgba(130, 104, 157, 0.32);
        box-shadow: 0 4px 14px rgba(130, 104, 157, 0.1);
    }
    
    .nav-btn {
        justify-content: center;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding: 10px 20px;
        min-width: 100%;
        background-color: var(--primary-bg);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .nav-item.dropdown.active .dropdown-content {
        display: block;
    }
    
    .nav-item.dropdown:hover .dropdown-content {
        display: none;
    }
    .nav-item.dropdown.active:hover .dropdown-content {
        display: block;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        font-size: clamp(15px, 2.3vw, 20px);
        white-space: nowrap;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: clamp(12.5px, 3.8vw, 16.5px);
        letter-spacing: 0.3px;
        white-space: nowrap;
    }
    
    .layout-container {
        flex-direction: column;
        gap: 40px;
    }

    .about-content {
        padding: 36px 24px;
    }

    .about-portrait-card {
        max-width: 260px;
    }

    .about-portrait-picture {
        max-width: 260px;
    }

    .about-portrait-img {
        border-radius: 22px;
    }

    .about-portrait-badge {
        font-size: 13px;
        padding: 6px 16px;
    }
    

    .featured-item {
        flex-direction: column;
        gap: 0;
    }
    
    .featured-img-wrapper {
        padding: 40px;
        border-bottom: 1px solid rgba(230, 223, 234, 0.5);
        border-right: none;
    }
    
    .featured-details {
        padding: 30px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-divider {
        display: none;
    }
    
    .footer-crystal {
        margin-left: 0;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: clamp(10.5px, 3.4vw, 13px);
        letter-spacing: 0;
        white-space: nowrap;
    }
}

/* ── Teaching Hub Interactive Modal ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 22, 42, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-glass-container {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-top: 2px solid rgba(255, 255, 255, 1);
    border-radius: 28px;
    box-shadow: 
        0 30px 70px -15px rgba(84, 58, 110, 0.30),
        0 10px 25px rgba(216, 181, 121, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 1);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 45px 50px;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-glass-container {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(130, 104, 157, 0.08);
    border: 1px solid rgba(130, 104, 157, 0.15);
    color: var(--primary-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
    background: rgba(130, 104, 157, 0.1);
    border: 1px solid rgba(130, 104, 157, 0.2);
    margin-bottom: 12px;
}

.modal-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Featured Download Card */
.teaching-download-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 242, 250, 0.8) 100%);
    border: 1.5px solid rgba(216, 181, 121, 0.5);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 
        0 12px 30px -8px rgba(130, 104, 157, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.teaching-download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.download-card-icon {
    flex: 0 0 65px;
    height: 65px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(130, 104, 157, 0.15) 0%, rgba(216, 181, 121, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-color);
    border: 1px solid rgba(130, 104, 157, 0.2);
}

.download-card-info {
    flex: 1;
}

.download-card-tag {
    font-size: 11px;
    font-weight: 700;
    color: #9c7834;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.download-card-title {
    font-size: 18px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-family: var(--font-heading);
}

.download-card-desc {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 10px;
}

.download-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.download-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.download-meta i {
    color: var(--accent-color);
}

.download-card-action {
    flex-shrink: 0;
}

.download-btn {
    white-space: nowrap;
    padding: 12px 22px;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(130, 104, 157, 0.3);
}

.modal-section-title {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title i {
    color: var(--accent-color);
}

/* Teaching Grid */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.teaching-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(220, 212, 226, 0.65);
    border-radius: 18px;
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.teaching-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(216, 181, 121, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 25px -5px rgba(130, 104, 157, 0.15);
}

.teaching-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.teaching-card-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(130, 104, 157, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
}

.teaching-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.teaching-card-date {
    font-size: 11px;
    color: #92879c;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.teaching-card-date i {
    color: var(--accent-color);
    font-size: 10px;
}

.badge-updated-sm {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    color: #8c5717;
    background: rgba(254, 243, 199, 0.95);
    border: 1px solid rgba(217, 119, 6, 0.35);
}

.badge-updated-sm.badge-new {
    color: #3b2066;
    background: rgba(243, 232, 255, 0.95);
    border-color: rgba(130, 104, 157, 0.4);
}

.teaching-card h5 {
    font-size: 15.5px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-family: var(--font-heading);
    transition: color 0.2s ease;
}

.teaching-card:hover h5 {
    color: var(--primary-color);
}

.teaching-card p {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex: 1;
}

.teaching-card-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.teaching-card:hover .teaching-card-link {
    color: var(--accent-color);
}

.modal-footer-nav {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(220, 212, 226, 0.5);
}

.modal-switch-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.modal-switch-link:hover {
    color: var(--primary-color);
    transform: translateY(1px);
}

@media (max-width: 768px) {
    .modal-glass-container {
        padding: 30px 18px;
        max-height: 94vh;
    }
    .teaching-download-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .download-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    .teaching-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Projects Library — 分區 × 年段 Finder (2026-10)
   ========================================================= */
#projects, .zone, .grade-group { scroll-margin-top: 96px; }
#projects.main-content { min-width: 0; width: 100%; align-self: stretch; }
.zone-nav, .grade-tabs, .pcard, .pcard-body { min-width: 0; }

.pcard[hidden], .zone[hidden], .grade-group[hidden],
.grade-tabs[hidden], .finder-status[hidden], .finder-empty[hidden] { display: none !important; }

/* ---- Finder bar (sticky) ---- */
.finder {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    box-shadow: 0 12px 30px -10px rgba(130, 104, 157, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.95);
}

.zone-nav {
    display: flex;
    gap: 8px;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}
.zone-nav::-webkit-scrollbar { display: none; }

.zone-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    border-radius: 16px;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.zone-chip:hover { background: rgba(130, 104, 157, 0.06); }
.zone-chip.active {
    background: var(--primary-bg);
    border-color: var(--border-color);
    color: var(--primary-color);
}
.zone-chip-icon {
    width: 34px; height: 34px;
    border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(130, 104, 157, 0.1);
    color: var(--primary-color);
    font-size: 14px;
}
.zone-chip[data-zone-link="counseling"] .zone-chip-icon { background: rgba(216, 181, 121, 0.18); color: #a67c2e; }
.zone-chip[data-zone-link="tools"] .zone-chip-icon { background: rgba(104, 128, 152, 0.13); color: #425b74; }
.zone-chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.zone-chip-text b { font-size: 14px; font-weight: 600; }
.zone-chip-text small { font-size: 11px; color: var(--text-light); letter-spacing: 0.4px; }
.zone-chip-count {
    min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 600;
    background: rgba(130, 104, 157, 0.1);
    color: var(--primary-color);
}

.finder-search {
    flex: 0 1 340px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 46px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.finder-search:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(130, 104, 157, 0.12);
}
.finder-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--text-main);
}
.finder-search input::placeholder { color: var(--text-light); }

.finder-status {
    margin: 0 4px 10px;
    font-size: 13.5px;
    color: var(--primary-color);
}

/* ---- Zones ---- */
.zone { padding-top: 34px; }
.zone + .zone { margin-top: 30px; border-top: 1px dashed var(--border-color); }

.zone-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.zone-icon {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 8px 18px -6px rgba(130, 104, 157, 0.45);
}
.zone-icon.gold { background: linear-gradient(135deg, #e6c891, #c49a4f); box-shadow: 0 8px 18px -6px rgba(196, 154, 79, 0.45); }
.zone-icon.slate { background: linear-gradient(135deg, #8aa0b6, #5b738b); box-shadow: 0 8px 18px -6px rgba(91, 115, 139, 0.45); }
.zone-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    margin: 0;
}
.zone-title small {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 6px;
    letter-spacing: 0.6px;
}
.zone-desc { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---- Grade tabs ---- */
.grade-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 2px 6px;
    margin-bottom: 8px;
}
.grade-tabs::-webkit-scrollbar { display: none; }
.grade-tab {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-muted);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.grade-tab:hover { color: var(--primary-color); border-color: var(--primary-light); }
.grade-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 6px 16px -4px rgba(130, 104, 157, 0.45);
}
.grade-tab-count {
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    background: rgba(130, 104, 157, 0.1);
    color: var(--primary-color);
}
.grade-tab.active .grade-tab-count { background: rgba(255, 255, 255, 0.25); color: var(--white); }

/* ---- Grade pills (shared) ---- */
.grade-pill {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: rgba(130, 104, 157, 0.1);
    color: var(--primary-color);
}
.grade-pill.grade-g9 { background: rgba(216, 181, 121, 0.2); color: #8f6a24; }
.grade-pill.grade-g10 { background: rgba(126, 171, 160, 0.18); color: #3f7266; }
.grade-pill.grade-g11 { background: rgba(130, 104, 157, 0.13); color: #634a7d; }
.grade-pill.grade-all { background: rgba(104, 128, 152, 0.13); color: #425b74; }
.grade-pill.grade-teacher { background: rgba(104, 128, 152, 0.13); color: #425b74; }
.grade-pill.lg {
    min-width: 52px; height: 52px;
    border-radius: 16px;
    font-size: 15px;
    padding: 0 10px;
}

/* ---- Grade groups ---- */
.grade-group { margin-top: 26px; }
.grade-group-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.grade-group-head > div { flex: 1; min-width: 0; }
.grade-group-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}
.grade-group-title small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 6px;
    letter-spacing: 0.5px;
}
.grade-group-note { margin: 3px 0 0; font-size: 13px; color: var(--text-muted); }
.grade-group-count {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--text-muted);
}
.grade-group-count b { color: var(--primary-color); font-size: 16px; }

/* ---- Project cards ---- */
.pcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.pcard {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 32px -10px rgba(130, 104, 157, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    animation: cardGlassFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pcard:hover {
    transform: translateY(-5px);
    border-color: rgba(216, 181, 121, 0.55);
    box-shadow: 0 22px 44px -12px rgba(130, 104, 157, 0.22);
}
.pcard-media {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 18px;
    background: linear-gradient(135deg, #faf8fc 0%, #f1ecf6 100%);
    border-bottom: 1px solid rgba(230, 223, 234, 0.6);
}
.pcard-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.45s ease;
}
.pcard:hover .pcard-media img { transform: scale(1.04); }

.pcard-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 18px;
}
.pcard-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    min-width: 0;
}
.pcard-topic {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pcard-topic i { color: var(--accent-color); margin-right: 2px; }
.pcard-title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;
}
.pcard-title a { color: var(--primary-color); text-decoration: none; }
.pcard-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pcard-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pcard.is-open .pcard-desc { -webkit-line-clamp: unset; display: block; }
.pcard-more {
    align-self: flex-start;
    margin: 6px 0 0;
    padding: 2px 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12.5px;
    color: var(--primary-light);
    cursor: pointer;
}
.pcard-more:hover { color: var(--primary-color); }
.pcard-more i { font-size: 10px; margin-left: 2px; }
.pcard-foot {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pcard-date { font-size: 12px; color: var(--text-light); }
.pcard-date i { color: var(--accent-color); margin-right: 3px; }
.pcard-foot .badge-updated { animation: none; }
.pcard-link {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-bg);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.pcard-link:hover { background: var(--primary-color); color: var(--white); }

.finder-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.finder-empty i { font-size: 34px; color: var(--primary-light); margin-bottom: 10px; }
.finder-empty p { margin-bottom: 16px; }

/* ---- Nav dropdown grouped by grade ---- */
.dropdown-grouped .dropdown-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.dropdown-grouped .dropdown-group-label:first-child { margin-top: 0; }
.dropdown-grouped .grade-pill { font-size: 11px; padding: 2px 8px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .finder { top: 8px; padding: 8px; gap: 8px; }
    .finder-search { flex: 1 1 100%; height: 42px; }
    .zone-chip { padding: 6px 12px 6px 6px; }
    .zone-chip-icon { width: 30px; height: 30px; }
    .zone-chip-text small { display: none; }
}
@media (max-width: 600px) {
    .pcard-grid { grid-template-columns: 1fr; gap: 18px; }
    .zone-title { font-size: 21px; }
    .zone-title small { display: block; margin: 2px 0 0; }
    .zone-icon { width: 44px; height: 44px; border-radius: 14px; }
    .grade-pill.lg { min-width: 44px; height: 44px; border-radius: 14px; font-size: 13px; padding: 0 8px; }
    .grade-group-title small { display: none; }
    .finder { position: static; }
}
@media (prefers-reduced-motion: reduce) {
    .pcard, .pcard:hover, .pcard-media img { transition: none; animation: none; transform: none; }
}


/* =========================================================
   P0–P2 polish (2026-10)
   ========================================================= */
/* P1-4: tighten hero → library gap */
.hero { padding: 90px 0 40px; }
.main-layout-section { padding: 40px 0 80px; }
/* P1-10: natural line length for hero copy */
.hero-text { max-width: 34em; text-wrap: pretty; }

/* P2-14: clearer nav icons */
.nav-icon { width: 22px; height: 22px; }

/* P2-11: section headers */
.section-header.align-left { align-items: center; }
.section-header.align-left .section-title { text-align: left; }
.section-header:not(.align-left) { flex-direction: column; gap: 16px; }

/* P2-13: pull quote */
.about-quote {
    position: relative;
    margin: 8px 0 28px;
    padding: 26px 28px 26px 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245, 242, 248, 0.95), rgba(216, 181, 121, 0.12));
    border: 1px solid var(--border-color);
}
.about-quote-mark {
    position: absolute;
    left: 20px;
    top: 6px;
    font-family: var(--font-display-serif);
    font-size: 64px;
    line-height: 1;
    color: var(--accent-color);
}
.about-content .about-quote p {
    margin: 0;
    font-family: var(--font-display-serif);
    font-size: 21px;
    line-height: 1.7;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

/* P2-13: Vibe → Agentic comparison */
.about-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 14px;
    margin: 6px 0 30px;
}
.about-compare-card {
    padding: 22px 22px 20px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.about-compare-card.is-accent {
    background: linear-gradient(160deg, #ffffff 0%, var(--primary-bg) 100%);
    border-color: rgba(130, 104, 157, 0.3);
}
.about-compare-step {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-color);
}
.about-compare-card h4 {
    margin: 6px 0 2px;
    font-size: 19px;
    color: var(--primary-color);
}
.about-compare-card h4 i { font-size: 15px; margin-right: 4px; color: var(--accent-color); }
.about-content .about-compare-sub { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
.about-content .about-compare-card p:last-child { margin: 0; font-size: 14.5px; line-height: 1.8; }
.about-compare-arrow {
    display: flex;
    align-items: center;
    color: var(--primary-light);
    font-size: 18px;
}

/* P2-12: AI tool cards */
.ai-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 6px 0 30px;
}
.ai-tool-card {
    padding: 20px 18px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ai-tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ai-tool-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--white);
    font-size: 16px;
}
.ai-tool-role {
    display: block;
    margin-top: 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-color);
}
.ai-tool-card h4 { margin: 2px 0 8px; font-size: 16px; color: var(--primary-color); }
.about-content .ai-tool-card p { margin: 0; font-size: 13.5px; line-height: 1.75; }

@media (max-width: 768px) {
    .hero { padding: 50px 0 10px; }
    .graphic-wrapper { max-width: 320px; }
    .main-layout-section { padding: 30px 0 60px; }
    .about-compare { grid-template-columns: 1fr; }
    .about-compare-arrow { justify-content: center; transform: rotate(90deg); }
    .ai-tool-grid { grid-template-columns: 1fr; }
    .about-quote { padding: 22px 20px 22px 52px; }
    .about-quote-mark { left: 14px; font-size: 52px; }
    .about-content .about-quote p { font-size: 18px; }
}

/* Screenshot-style covers (full-bleed game screens) */
.pcard-media.is-screenshot { padding: 0; background: #1b1830; }
.pcard-media.is-screenshot img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
/* Keep every cover frame at the same 16:10 size */
.pcard-media { overflow: hidden; min-height: 0; }
.pcard-media img { width: 100%; height: 100%; object-fit: contain; }
.pcard-media.is-screenshot img { object-fit: cover; }
.pcard-media:not(.is-screenshot) { padding: 8px; }

/* =========================================================
   Typography: 標題思源宋體 + 內文思源黑體 (2026-10)
   ========================================================= */
:root {
    --font-title: 'Noto Serif TC', 'Cormorant Garamond', Georgia, 'PMingLiU', serif;
}
h1, h2, h3, h4, h5, h6,
.section-title span,
.zone-title,
.grade-group-title,
.pcard-title,
.featured-title,
.about-heading,
.about-compare-card h4,
.ai-tool-card h4,
.modal-title,
.modal-section-title,
.teaching-card h5,
.download-card-title,
.footer-slogan p,
.about-conclusion,
.about-content .about-quote p {
    font-family: var(--font-title);
}
.section-title span,
.zone-title,
.about-heading,
.modal-title { font-weight: 700; letter-spacing: 1px; }
.pcard-title,
.grade-group-title,
.featured-title,
.teaching-card h5,
.ai-tool-card h4,
.about-compare-card h4 { font-weight: 700; letter-spacing: 0.3px; }
/* small English captions inside serif titles stay in the UI sans */
.zone-title small,
.grade-group-title small { font-family: var(--font-body); }

/* 導覽列：中寬螢幕隱藏英文，避免最右邊被切掉 */
.nav-en { font-style: normal; }
@media (min-width: 1081px) {
    .nav-en { display: none; }
}

/* 手機：分區與年段按鈕改為換行排列，不再被切掉 */
@media (max-width: 760px) {
    .finder { flex-direction: column; align-items: stretch; }
    .zone-nav { flex-wrap: wrap; overflow: visible; justify-content: flex-start; }
    .zone-chip { flex: 1 1 calc(50% - 8px); min-width: 0; }
    .grade-tabs { flex-wrap: wrap; overflow: visible; }
    .grade-tab { padding: 8px 14px; font-size: 13.5px; }
}

/* 後台設為隱藏的作品 */
.vys-off { display: none !important; }
.zone-chip[hidden], .zone[hidden] { display: none !important; }
