:root {
    --bg: #f8f8f8;
    --text: #111111;
    --text-light: #777777;
    --accent: #d3d3d3;
    --black: #000000;
    --white: #ffffff;
    --gray-mid: #e2e2e2;

    --sans: 'Inter', 'Noto Sans TC', sans-serif;
    --serif: 'Playfair Display', 'Noto Serif TC', serif;

    --transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --fast: 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: -1;
    pointer-events: none;
}

/* Typography Tools */
.serif {
    font-family: var(--serif);
}

.serif-italic {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    color: var(--text-light);
}

.dot {
    color: var(--accent);
}

.text-white {
    color: var(--white);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

.section {
    padding: 150px 0;
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(248, 248, 248, 0.95) 0%, rgba(248, 248, 248, 0) 100%);
    backdrop-filter: blur(4px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
}

.logo {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    transition: var(--fast);
}

.nav-links a:hover {
    color: var(--text-light);
}

.nav-links a.nav-cta {
    border: 1px solid var(--text);
    padding: 8px 16px;
}

.nav-links a.nav-cta:hover {
    background: var(--black);
    color: var(--white);
}

/* 手機漢堡選單 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    transition: var(--fast);
}

.nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Marquee */
.marquee-container {
    position: absolute;
    top: 20vh;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    z-index: -1;
    opacity: 0.05;
    pointer-events: none;
}

.marquee {
    display: inline-block;
    animation: scroll 40s linear infinite;
    font-size: 10vw;
    font-weight: 900;
    letter-spacing: -0.02em;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: center;
    padding: 0 5vw;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.title-main {
    font-size: 7vw;
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 1.1rem;
    max-width: 400px;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.hero-actions {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--text);
    padding-bottom: 5px;
    transition: var(--fast);
}

.explore-btn.ghost {
    color: var(--text-light);
    border-bottom-color: var(--accent);
}

.explore-btn:hover {
    padding-bottom: 10px;
    gap: 20px;
}

/* Hero Image */
.hero-visual {
    position: relative;
    height: 75vh;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: 1.5s ease;
    transform: scale(1.05);
}

.hero-visual:hover .main-img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1);
}

/* Section Headers */
.section-header {
    margin-bottom: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: end;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 400px;
}

/* ───────── Works ───────── */
.works-list {
    border-top: 1px solid var(--text);
}

.work-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 1.6fr) 170px;
    gap: 30px;
    align-items: start;
    padding: 48px 0;
    border-bottom: 1px solid var(--gray-mid);
    transition: var(--transition);
    position: relative;
}

.work-row:hover {
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.02);
}

.work-num {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-light);
    padding-top: 10px;
}

.work-title-box h3 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 10px;
}

.work-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-light);
}

.work-desc {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 560px;
}

.work-highlights {
    list-style: none;
    margin-top: 18px;
}

.work-highlights li {
    font-size: 0.85rem;
    padding: 6px 0;
    border-top: 1px solid var(--gray-mid);
    color: var(--text);
}

.work-meta {
    text-align: right;
    padding-top: 10px;
}

.work-status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    border: 1px solid var(--text);
    padding: 7px 12px;
    white-space: nowrap;
}

.work-status.live {
    background: var(--black);
    color: var(--white);
}

.work-year {
    display: block;
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.1em;
}

/* Teaching / Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--gray-mid);
    border: 1px solid var(--gray-mid);
}

.course-card {
    background: var(--bg);
    padding: 60px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
}

.course-card:hover {
    background: var(--black);
    color: var(--white);
}

.card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.course-card:hover .card-top {
    color: var(--white);
    opacity: 0.5;
}

.course-card h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.course-card p {
    font-size: 0.95rem;
}

.card-arrow {
    position: absolute;
    bottom: 40px;
    right: 40px;
    font-size: 2rem;
    font-weight: 300;
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
}

.course-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Lectures */
.dark-section {
    background-color: var(--black);
    color: var(--white);
}

.timeline-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    padding: 60px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.timeline-row:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-row:hover {
    padding-left: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.time-date {
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

.time-content h3 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.time-location {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-large-text h2 {
    font-size: 5vw;
    line-height: 1;
    font-weight: 400;
}

.about-details p {
    font-size: 1.2rem;
    margin-bottom: 60px;
}

.stats-box {
    display: flex;
    gap: 60px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-light);
}

/* ───────── Contact ───────── */
.contact-desc {
    color: rgba(255, 255, 255, 0.6);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-headline {
    font-size: 4vw;
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 50px;
}

.contact-headline .serif-italic {
    color: rgba(255, 255, 255, 0.5);
}

.contact-mail {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid var(--white);
    padding-bottom: 8px;
    transition: var(--fast);
}

.contact-mail:hover {
    gap: 24px;
}

.contact-form {
    display: grid;
    gap: 28px;
}

.form-field {
    display: grid;
    gap: 10px;
}

.form-field span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.5);
}

.form-field input,
.form-field textarea {
    font: inherit;
    color: var(--white);
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 2px;
    outline: none;
    transition: var(--fast);
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--white);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.submit-btn {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--white);
    padding: 16px 28px;
    cursor: pointer;
    transition: var(--fast);
}

.submit-btn:hover {
    background: transparent;
    color: var(--white);
}

.submit-btn:disabled {
    opacity: 0.4;
    cursor: wait;
}

.form-status {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    min-height: 1.4em;
}

/* Footer */
.footer {
    padding: 60px 0;
    border-top: 1px solid var(--gray-mid);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 0 5vw;
    max-width: 1600px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.footer-copy {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-light);
    text-align: right;
}

/* Animation Classes */
.gsap-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gsap-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* 尊重使用者的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {

    .gsap-reveal,
    .main-img,
    .work-row,
    .timeline-row,
    .course-card {
        transition: none;
    }

    .gsap-reveal {
        opacity: 1;
        transform: none;
    }

    .marquee {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .work-row {
        grid-template-columns: 60px minmax(0, 1fr) 150px;
    }

    .work-desc-box {
        grid-column: 2 / 3;
    }
}

@media (max-width: 900px) {

    .hero-grid,
    .section-header,
    .card-grid,
    .timeline-row,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 100px 0;
    }

    .hero-visual {
        height: 50vh;
        order: -1;
        margin-bottom: 40px;
    }

    .marquee-container {
        display: none;
    }

    .title-main {
        font-size: 15vw;
    }

    .about-large-text h2 {
        font-size: 10vw;
    }

    .contact-headline {
        font-size: 9vw;
    }

    .work-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .work-meta {
        text-align: left;
    }

    .work-year {
        display: inline;
        margin-left: 14px;
    }

    /* 手機導航 */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--gray-mid);
        padding: 10px 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 16px 5vw;
    }

    .nav-links a.nav-cta {
        border: 0;
        padding: 16px 5vw;
    }
}

/* ───────── 分頁版（v2.1 多頁架構）───────── */
.nav-links a.active {
    border-bottom: 1px solid var(--text);
    padding-bottom: 3px;
}

.page-hero {
    padding-top: 180px;
    padding-bottom: 60px;
}

.page-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 30px;
}

.page-lead {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 620px;
}

.page-banner {
    margin-top: 60px;
}

.page-banner img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
    border: 1px solid var(--gray-mid);
}

.page-banner.square {
    margin-top: 40px;
    max-width: 420px;
}

.page-banner.square img {
    max-height: 420px;
}

.section-more {
    margin-top: 50px;
    text-align: right;
}

/* 作品列是連結 */
.work-row {
    text-decoration: none;
    color: inherit;
}

/* CTA 帶 */
.cta-band {
    padding: 110px 0;
}

.cta-band.dark-section .cta-line {
    color: var(--white);
}

.cta-band-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-line {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 400;
}

.explore-btn.text-white {
    color: var(--white);
    border-bottom-color: var(--white);
}

/* 課程完整頁 */
.course-full {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 60px;
    padding: 70px 0;
    border-top: 1px solid var(--text);
}

.course-full-head .card-num {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--text-light);
}

.course-full-head h2 {
    font-size: 2.6rem;
    font-weight: 400;
    margin-top: 16px;
}

.course-full-body p {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* 作品內頁 */
.detail-title {
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.05;
    margin: 20px 0 26px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 60px;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 60px;
    padding: 60px 0;
    border-top: 1px solid var(--text);
}

.detail-desc {
    font-size: 1.3rem;
    line-height: 1.8;
}

.detail-sub {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 18px;
}

.detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    padding-top: 50px;
    border-top: 1px solid var(--gray-mid);
}

/* 頁尾導航 */
.footer-nav {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

.footer-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    transition: var(--fast);
}

.footer-nav a:hover {
    color: var(--text);
}

@media (max-width: 900px) {

    .course-full,
    .detail-body {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .footer-copy {
        text-align: left;
    }

    .page-hero {
        padding-top: 140px;
    }
}

/* ───────── v2.2 動畫層：人文科技感 ───────── */
/* hero 標題逐行顯現 */
.line-reveal {
    display: block;
    overflow: hidden;
}

.line-reveal>span {
    display: inline-block;
    transform: translateY(110%);
    animation: lineUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.line-reveal.d2>span {
    animation-delay: 0.15s;
}

.line-reveal.d3>span {
    animation-delay: 0.3s;
}

@keyframes lineUp {
    to {
        transform: translateY(0);
    }
}

/* 神經網路背景（canvas 疊在 hero 後面、極淡） */
#neuralBg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.hero {
    position: relative;
}

/* 頂部閱讀進度細線 */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--text);
    z-index: 200;
}

/* 作品標題底線拉出 */
.work-title-box h3 {
    display: inline-block;
    background-image: linear-gradient(var(--text), var(--text));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: 4px;
}

.work-row:hover .work-title-box h3 {
    background-size: 100% 1px;
}

/* 課程卡箭頭已有；卡片編號緩移 */
.course-card .card-num {
    transition: letter-spacing 0.5s ease;
}

.course-card:hover .card-num {
    letter-spacing: 0.3em;
}

/* 圖片進場：淡入＋輕微上移（配 reveal） */
.page-banner img {
    animation: bannerIn 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bannerIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .line-reveal>span {
        transform: none;
        animation: none;
    }

    #neuralBg,
    .scroll-progress {
        display: none;
    }

    .work-title-box h3 {
        transition: none;
    }

    .page-banner img {
        animation: none;
    }
}

/* ───────── v2.2 排版精修：加大層級對比、拉開留白 ───────── */
.section-title {
    font-size: clamp(3rem, 5vw, 4.2rem);
}

/* 課程頁：超大幽靈編號＋大標＋窄欄正文 */
.course-full {
    grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(30px, 5vw, 80px);
    padding: 110px 0;
    align-items: start;
    position: relative;
}

.course-ghost-num {
    font-size: clamp(5rem, 9vw, 8.5rem);
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 1px var(--accent);
    letter-spacing: -0.04em;
}

.course-full-head .card-num {
    display: block;
    margin-bottom: 14px;
}

.course-full-head h2 {
    font-size: clamp(2.2rem, 3.6vw, 3.4rem);
    line-height: 1.15;
    margin-top: 0;
}

.course-full-body {
    max-width: 560px;
}

.course-full-body p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 30px;
}

.course-full-body .work-highlights li {
    font-size: 0.92rem;
    padding: 12px 0;
}

/* 作品列：更多呼吸、標題加大 */
.work-row {
    padding: 64px 0;
}

.work-title-box h3 {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.work-desc {
    line-height: 1.85;
}

/* 頁首引言窄欄、行距拉開 */
.page-lead {
    font-size: 1.2rem;
    line-height: 1.9;
    max-width: 560px;
}

/* 講座列標題加大 */
.time-content h3 {
    font-size: clamp(1.7rem, 2.4vw, 2.3rem);
}

@media (max-width: 900px) {
    .course-full {
        grid-template-columns: 1fr;
        padding: 70px 0;
    }

    .course-ghost-num {
        font-size: 4rem;
    }
}

/* ───────── v2.3 工藝層：轉場/游標/視差/逐字 ───────── */
/* 跨頁轉場（自控版：離場淡出、進場淡入——行為可預期、不用引擎魔法） */
body {
    animation: pageIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-leave {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

/* 自訂游標（桌機） */
@media (hover: hover) and (pointer: fine) {
    .cursor-dot,
    .cursor-ring {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none;
        z-index: 300;
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    .cursor-dot {
        width: 6px;
        height: 6px;
        background: var(--text);
    }

    .cursor-ring {
        width: 34px;
        height: 34px;
        border: 1px solid rgba(17, 17, 17, 0.35);
        transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
    }

    body.cursor-hover .cursor-ring {
        width: 56px;
        height: 56px;
        border-color: rgba(17, 17, 17, 0.7);
    }

    .dark-section~* .cursor-ring {
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* 標題逐字浮現 */
.char-split .char {
    display: inline-block;
    transform: translateY(0.6em);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    transition-delay: calc(var(--ci) * 40ms);
}

.char-split.visible .char {
    transform: translateY(0);
    opacity: 1;
}

/* 能力跑馬燈帶 */
.cap-band {
    border-top: 1px solid var(--gray-mid);
    border-bottom: 1px solid var(--gray-mid);
    overflow: hidden;
    white-space: nowrap;
    padding: 26px 0;
    background: var(--bg);
}

.cap-band .cap-track {
    display: inline-block;
    animation: scroll 36s linear infinite;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--text-light);
}

.cap-band .cap-track b {
    color: var(--text);
    font-weight: 700;
}

/* 作品列瀑布交錯由 JS 設 delay、這裡拿掉舊 delay 類的干擾 */
.works-list .work-row.gsap-reveal {
    transition-delay: var(--stagger, 0s);
}

@media (prefers-reduced-motion: reduce) {

    body {
        animation: none;
    }

    body.page-leave {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    .char-split .char {
        transform: none;
        opacity: 1;
        transition: none;
    }

    .cap-band .cap-track {
        animation: none;
    }
}

/* ───────── v2.5 終修：可及性與細節 ───────── */
:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.dark-section :focus-visible,
.dark-section *:focus-visible {
    outline-color: var(--white);
}

::selection {
    background: var(--text);
    color: var(--bg);
}

@media (max-width: 900px) {
    .detail-title {
        font-size: 11vw;
    }

    .detail-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .cta-band {
        padding: 70px 0;
    }

    .cta-band-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ───────── v2.7 前台進化：截圖廊/成績帶/案例三段 ───────── */
/* 作品截圖廊（有圖才出現、橫向滑動） */
.shot-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 50px 0 20px;
    -webkit-overflow-scrolling: touch;
}

.shot-strip img {
    scroll-snap-align: start;
    height: 380px;
    max-width: 82vw;
    object-fit: cover;
    border: 1px solid var(--gray-mid);
    filter: grayscale(30%);
    transition: filter 0.5s ease;
}

.shot-strip img:hover {
    filter: grayscale(0%);
}

/* 首頁成績帶（黑底、數字爬升） */
.stats-band {
    background: var(--black);
    color: var(--white);
    padding: 90px 0;
}

.stats-band-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stats-band .stat-num {
    font-size: clamp(3.4rem, 6vw, 5.5rem);
}

.stats-band .stat-label {
    color: rgba(255, 255, 255, 0.55);
}

/* 案例三段式 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    background: var(--gray-mid);
    border: 1px solid var(--gray-mid);
    margin-top: 50px;
}

.case-cell {
    background: var(--bg);
    padding: 36px 30px;
}

.case-cell .detail-sub {
    color: var(--text-light);
}

.case-cell p {
    font-size: 1rem;
    line-height: 1.85;
}

@media (max-width: 900px) {
    .case-grid {
        grid-template-columns: 1fr;
    }

    .shot-strip img {
        height: 250px;
    }
}

/* ───────── v2.8 黑幕擦拭轉場＋標題平衡換行 ───────── */
.page-veil {
    position: fixed;
    inset: 0;
    background: var(--black);
    transform: translateY(101%);
    z-index: 500;
    pointer-events: none;
}

.page-veil.cover {
    transform: translateY(0);
    transition: transform 0.34s cubic-bezier(0.65, 0, 0.35, 1);
}

/* 進場：黑幕從蓋住往上掀（取代原本的淡入） */
body {
    animation: none;
}

.page-reveal {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 500;
    pointer-events: none;
    animation: revealUp 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes revealUp {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-101%);
    }
}

/* 中文大標平衡斷行（支援的瀏覽器自動漂亮換行） */
.course-card h3,
.course-full-head h2,
.work-title-box h3,
.cta-line,
.time-content h3 {
    text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {

    .page-veil,
    .page-reveal {
        display: none;
    }
}

/* ───────── v2.9 轉場後台化：六種模式 ───────── */
/* 離場幕變體 */
.page-veil.cover.t-wipe-lr {
    transform: translateX(0);
    transition: transform 0.34s cubic-bezier(0.65, 0, 0.35, 1);
}

.page-veil.t-wipe-lr {
    transform: translateX(-101%);
}

.page-veil.t-theater {
    transform: none;
    background: none;
    pointer-events: none;
}

.page-veil.t-theater::before,
.page-veil.t-theater::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--black);
    transition: height 0.36s cubic-bezier(0.65, 0, 0.35, 1);
}

.page-veil.t-theater::before {
    top: 0;
}

.page-veil.t-theater::after {
    bottom: 0;
}

.page-veil.cover.t-theater::before,
.page-veil.cover.t-theater::after {
    height: 51%;
}

.page-veil.t-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    font-weight: 900;
    letter-spacing: 0.22em;
    font-size: clamp(1.6rem, 4vw, 3.2rem);
}

.page-veil.t-brand .veil-brand {
    opacity: 0;
    letter-spacing: 0.06em;
    transform: translateY(6px);
    transition: opacity 0.28s ease 0.16s, letter-spacing 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.16s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.16s;
}

.page-veil.cover.t-brand .veil-brand {
    opacity: 1;
    letter-spacing: 0.22em;
    transform: translateY(0);
}

/* 縮放淡切：離場作用在 body */
body.t-zoom-leave {
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.26s ease, transform 0.26s ease;
}
