/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --accent-color: #0ea5e9;
    --accent-light: #38bdf8;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 68px;
    --border-radius: 1rem;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', '微軟正黑體', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 { font-size: 2.5rem; color: var(--primary-color); }
h3 { font-size: 1.5rem; color: var(--text-dark); }

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

a:hover { color: var(--accent-color); }

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

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1001;
    background: var(--bg-white);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   Hamburger Button
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    flex-shrink: 0;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburger → X animation */
.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

/* Mobile Menu Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.is-active {
    opacity: 1;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    min-height: 48px; /* iOS touch target */
    white-space: nowrap;
}

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

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

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

.btn-secondary:hover {
    background: var(--primary-light);
    color: white;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a2e6e 50%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 1.5rem 4rem;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Decorative background circles */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.25);
    border: 1px solid rgba(14, 165, 233, 0.5);
    color: var(--accent-light);
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    transition: var(--transition);
    margin: 0 auto;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    animation: fadeInUp 1s ease 1.5s both;
}

.scroll-hint-text {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.1em;
}

.scroll-hint-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255,255,255,0.8);
    border-bottom: 2px solid rgba(255,255,255,0.8);
    transform: rotate(45deg);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(4px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 0.6; transform: translateX(-50%) translateY(0); }
}

/* ============================================
   Section Shared Styles
   ============================================ */
.section-title {
    text-align: center;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 5rem 1.5rem;
    background: var(--bg-light);
}

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

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.85;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: var(--primary-light);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 44px;
}

.social-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

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

/* ============================================
   Expertise Section
   ============================================ */
.expertise {
    padding: 5rem 1.5rem;
    background: var(--bg-white);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.expertise-card {
    background: var(--bg-light);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.expertise-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.expertise-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.expertise-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.expertise-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ============================================
   Achievements Section
   ============================================ */
.achievements {
    padding: 5rem 1.5rem;
    background: var(--bg-light);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.achievement-item {
    background: var(--bg-white);
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.achievement-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.achievement-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.achievement-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.75rem;
}

.achievement-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   Books Showcase
   ============================================ */
.books-showcase {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.books-showcase h3,
.media-features h3,
.teaching-gallery h3 {
    text-align: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Scroll wrapper for mobile horizontal scroll */
.books-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.books-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.book-item {
    text-align: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.book-item img {
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    aspect-ratio: 3/4;
    object-fit: cover;
}

.book-item:hover img {
    box-shadow: var(--shadow-xl);
    transform: scale(1.04) translateY(-4px);
}

.book-item p {
    margin-top: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* ============================================
   Media Features
   ============================================ */
.media-features {
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.media-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.media-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.media-item img {
    width: 100%;
    height: auto;
}

/* ============================================
   Teaching Gallery
   ============================================ */
.teaching-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Caption: always visible on mobile, hover on desktop */
.gallery-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: white;
    padding: 1.5rem 0.75rem 0.75rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover p {
    transform: translateY(0);
}

/* ============================================
   Courses Section
   ============================================ */
.courses {
    padding: 5rem 1.5rem;
    background: var(--bg-white);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.course-card {
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.course-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.course-badge--advanced {
    background: var(--primary-color);
}

.course-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.course-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.course-details {
    background: var(--bg-white);
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.detail-item span:last-child {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-topics h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.course-topics ul {
    list-style: none;
    padding-left: 0;
}

.course-topics li {
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.course-topics li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
    padding: 5rem 1.5rem;
    background: var(--bg-light);
}

.pricing-table {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.pricing-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row:hover {
    background: var(--bg-light);
}

.pricing-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    min-width: 80px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.pricing-body {
    flex: 1;
}

.pricing-value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pricing-note {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 5rem 1.5rem;
    background: var(--bg-white);
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.contact-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    font-size: 1.35rem;
}

.contact-form-container h3:not(:first-child) {
    margin-top: 2rem;
}

.contact-info {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.info-item a {
    color: var(--accent-color);
    font-weight: 500;
    word-break: break-all;
}

.collaboration-steps {
    background: var(--bg-light);
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.collaboration-steps li {
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
}

.collaboration-steps li:last-child {
    margin-bottom: 0;
}

.collaboration-steps strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.2rem;
}

.collaboration-steps p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.contact-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-image img {
    width: 100%;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3.5rem 1.5rem 1.5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.7;
}

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

.footer-section ul li { margin-bottom: 0.5rem; }

.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section a:hover { color: white; }

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   Animations
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE: Tablet (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.5rem; }

    .expertise-grid,
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ============================================
   RESPONSIVE: Mobile (≤ 768px)
   ============================================ */
@media (max-width: 768px) {

    /* --- Navigation --- */
    .hamburger {
        display: flex;
    }

    .nav-overlay {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100dvh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 0;
        padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.is-open {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        color: var(--text-dark);
    }

    .nav-link::after { display: none; }

    .nav-link:hover,
    .nav-link.active {
        color: var(--accent-color);
        padding-left: 0.5rem;
    }

    /* --- Hero --- */
    .hero {
        padding: 5rem 1.25rem 4rem;
        /* 手機版改為 auto，避免內容被截斷 */
        min-height: unset;
        height: auto;
        /* 保留 overflow: hidden 防裝飾圓圈溢出，但確保內容不被截斷 */
        overflow: hidden;
        /* 關鍵：給內容區善足夠的底部 padding 避免按鈕被截斷 */
        padding-bottom: 5rem;
    }

    /* 確保按鈕區善具備足夠 z-index 可被點擊 */
    .hero-cta {
        position: relative;
        z-index: 2;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    /* Image first on mobile for visual impact */
    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 240px;
        border-radius: 50%;
        aspect-ratio: 1;
        object-fit: cover;
        object-position: top;
        box-shadow: 0 0 0 6px rgba(255,255,255,0.15), 0 20px 40px rgba(0,0,0,0.4);
        margin: 0 auto;
    }

    .hero-badge {
        display: inline-block;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-cta {
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        flex: 1;
        min-width: 130px;
        max-width: 200px;
    }

    /* --- Sections padding --- */
    .about,
    .expertise,
    .achievements,
    .courses,
    .pricing,
    .contact {
        padding: 3.5rem 1.25rem;
    }

    .section-title { font-size: 1.75rem; }
    .section-subtitle { font-size: 0.95rem; margin-bottom: 2rem; }

    /* --- Expertise: 1 column --- */
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* 擅長領域卡片：第一列 icon+標題，第二列說明文字 */
    .expertise-card {
        padding: 1.75rem 1.5rem;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.5rem;
        text-align: left;
        align-items: center;
    }

    .expertise-icon {
        font-size: 2rem;
        margin-bottom: 0;
        flex-shrink: 0;
        grid-column: 1;
        grid-row: 1;
        line-height: 1.2;
    }

    .expertise-card h3 {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
        font-size: 1.1rem;
        align-self: center;
    }

    .expertise-card p {
        grid-column: 1 / -1;  /* 占滿全寬 */
        grid-row: 2;
        margin-top: 0.25rem;
    }

    /* --- Achievements: 3 columns compact --- */
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .achievement-item {
        padding: 1.5rem 1rem;
    }

    .achievement-number {
        font-size: 2rem;
    }

    .achievement-label {
        font-size: 0.8rem;
    }

    .achievement-item p {
        display: none; /* Hide description on mobile to keep compact */
    }

    /* --- Books: horizontal scroll on mobile --- */
    .books-scroll-wrapper {
        margin: 0 -1.25rem;
        padding: 0 1.25rem 1rem;
    }

    .books-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.25rem;
        width: max-content;
    }

    .book-item {
        width: 150px;
    }

    .book-item img {
        height: 200px;
        width: 150px;
        object-fit: cover;
    }

    /* --- Media grid: 1 column --- */
    .media-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* --- Gallery: 2 columns --- */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item img {
        height: 160px;
    }

    /* Always show caption on mobile (no hover) */
    .gallery-item p {
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0,0,0,0.65));
        font-size: 0.75rem;
        padding: 1.25rem 0.5rem 0.5rem;
    }

    /* --- Courses: 1 column --- */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* --- Pricing: stacked layout --- */
    .pricing-row {
        flex-direction: column;
        gap: 0.4rem;
        padding: 1.25rem 1.5rem;
    }

    .pricing-label {
        font-size: 0.85rem;
        color: var(--accent-color);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        min-width: unset;
    }

    .pricing-value {
        font-size: 1rem;
    }

    /* --- Contact: 1 column --- */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-image {
        order: -1;
    }

    .contact-image img {
        max-width: 280px;
        margin: 0 auto;
        border-radius: 50%;
        aspect-ratio: 1;
        object-fit: cover;
        object-position: top;
    }

    .contact-cta {
        flex-direction: column;
    }

    .contact-cta .btn {
        width: 100%;
    }

    /* --- Footer: 2 columns --- */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-content .footer-section:first-child {
        grid-column: 1 / -1;
    }

    /* --- Scroll to top: avoid overlap with mobile nav --- */
    .scroll-top-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   RESPONSIVE: Small Mobile (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
    :root {
        --nav-height: 60px;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4.5rem 1rem 5rem;
        min-height: unset;
        height: auto;
        overflow: hidden;
    }

    .hero-image img {
        max-width: 200px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }

    .section-title { font-size: 1.5rem; }

    /* Achievements: 1 column on very small screens */
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 成就數字：第一列 數字+標題，第二列說明文字 */
    .achievement-item {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.5rem;
        text-align: left;
        padding: 1.25rem 1.5rem;
        align-items: center;
    }

    .achievement-number {
        font-size: 2.5rem;
        min-width: unset;
        text-align: center;
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
        line-height: 1;
    }

    .achievement-label {
        font-size: 1rem;
        margin-bottom: 0;
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .achievement-item p {
        display: block;
        font-size: 0.85rem;
        grid-column: 1 / -1;  /* 占滿全寬 */
        grid-row: 2;
        margin-top: 0.25rem;
        color: var(--text-light);
        line-height: 1.6;
    }

    /* Gallery: 2 columns, smaller */
    .gallery-item img {
        height: 130px;
    }

    /* Footer: 1 column */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content .footer-section:first-child {
        grid-column: unset;
    }

    .about,
    .expertise,
    .achievements,
    .courses,
    .pricing,
    .contact {
        padding: 3rem 1rem;
    }
}

/* ============================================
   Touch device optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .expertise-card:hover,
    .achievement-item:hover,
    .course-card:hover,
    .book-item:hover img,
    .media-item:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    /* Always show gallery caption on touch */
    .gallery-item p {
        transform: translateY(0);
    }

    /* Larger touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .social-link {
        min-height: 44px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    .footer,
    .scroll-top-btn,
    .scroll-hint,
    .hamburger {
        display: none !important;
    }

    body { font-size: 12pt; }
    .hero { min-height: auto; padding: 2rem; }
}
