/* ==================== 基礎設定 ==================== */
:root {
    /* Mobile viewport fix - fallback value, will be updated by JavaScript */
    --vh: 1vh;
}

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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('picture/DSCF3636.JPG') no-repeat center center;
    background-size: cover;
    z-index: -1;
    /* GPU 加速優化 */
    transform: translateZ(0);
    will-change: transform;
}

/* ==================== 容器設定 ==================== */
#container {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--vh, 1vh) * 100);
    font-family: Arial, sans-serif;
    /* 背景由 body::before 處理，避免 fixed attachment 造成性能問題 */
}

#web {
    width: 100%;
    max-width: auto;
    margin: 0 auto;
    padding: 0 18px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    /* 硬體加速優化 */
    transform: translateZ(0);
    will-change: transform;
}

/* ==================== ?��? ==================== */
header {
    background-color: #000000c0;
    color: white;
    padding: 20px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: left;
    margin-left: 5%;
    gap: 20px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    text-align: center;
}

/* ==================== 主要內容 ==================== */
main {
    flex: 1;
    width: 100%;
    margin-top: 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.page-content {
    width: 100%;
    max-width: 100%;
    padding: 10px 20px 40px 20px;
    text-align: center;
    z-index: 2;
    position: relative;
    min-height: calc(var(--vh, 1vh) * 100);
    box-sizing: border-box;
    display: block;
    scroll-margin-top: 90px;

}

.hidden {
    display: none;
}

/* ==================== 統�?標�?�?? ==================== */
.section-title {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
    color: white;
    font-size: 70px;
    font-weight: bold;
}

/* ==================== Home Page ==================== */
#home {
    padding: 80px 0 50px 0;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(var(--vh, 1vh) * 100);
    height: calc(var(--vh, 1vh) * 100);
}

.home-name {
    margin-top: -5%;
}

.name-title {
    font-size: clamp(40px, 10vw, 150px);
    font-weight: bold;
    margin-bottom: 20px;
    -webkit-text-stroke: 2px #f4f4f4;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: url('picture/DSCF3636.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    font-family: Arial, Helvetica, sans-serif;
}

.hero-subtitle {
    font-size: 24px;
    color: #f4f4f4;
    letter-spacing: 2px;
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    animation: pulse 2s ease-in-out infinite;
}

.scroll-down-indicator svg {
    width: 40px;
    height: 40px;
    color: #f4f4f4;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transform: scaleY(70%);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==================== About Page ==================== */
#about {
    color: #f4f4f4;
    padding: 0;
    text-align: center;
    /* min-height: calc(var(--vh, 1vh) * 100); */
    height: auto;
}

.about-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 0 1%;
    box-sizing: border-box;
    gap: 20px;
    flex-wrap: wrap;
}


.left, .center, .right {
    padding: 18px;
    border-radius: 10px;
    color: #eaeaea;
    line-height: 1.6;
    box-sizing: border-box;
    min-width: 0;
}

/* 左側欄 */
.left {
    flex: 0 0 40%;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0, 0, 0, 0.126);
    text-align: left;
}

.left-header {
    width: 100%;
}

.left-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.profile-photo-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex: 0 0 auto;
    padding-bottom: 10px;
}

.left .profile-photo {
    width: auto;
    max-width: 220px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    margin-right: 12px;
}

.left-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}

.left-content > * {
    min-width: 0;
}

.text_about_me {
    padding-top: 10px;
}

/* Icon Box */
#icon_box {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex-wrap: wrap;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#icon_box .icon {
    flex: 0 1 auto;
    min-width: 0;
    width: clamp(40px, 8vw, 72px);
    height: auto;
}

#icon_box .icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-width: 100%;
}

/* 中�?欄�? */
.center {
    flex: 1 1 100%;
    max-width: 100%;
    background: transparent;
    text-align: justify;
}

/* ?�側欄�? */
.right {
    flex: 0 0 30%;
    max-width: 30%;
    text-align: left;
}

.right .work-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    box-sizing: border-box;
}

.right .work-menu .list {
    text-align: right;
}

.right .work-menu .list h3 {
    color: #ffd54f;
    margin-top: 30px;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 30px;
    line-height: 1.15;
}

.list {
    text-align: left;
    margin-top: 10px;
}

.list h3 {
    font-size: 15px;
}


/* about-1  */
.about-wrapper-1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 0 1%;
    box-sizing: border-box;
    gap: 20px;
    flex-wrap: wrap;
}

/* work-exp */
.work-exp {
    padding: 18px;
    margin-top: 50px;
    text-align: left;
    flex: 0 0 50%;
    max-width: 50%;
    line-height: 2;
}

/* awards 欄�? */
.awards {
    padding: 18px;
    margin-top: 50px;
    text-align: right;
    
}

.awards h2 {
    margin-bottom: 20px;
}

.awards ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.awards ul li {
    margin-bottom: 10px;
}

.awards p {
    margin-bottom: 10px; 
}

/* ==================== Skills Section ==================== */
.skills-section {
    position: relative;
    height: calc(var(--vh, 1vh) * 500);
    margin-top: 100px;
}

.skills-container {
    position: sticky;
    
    top: 0;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.skills-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.skill-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.skill-item.active {
    opacity: 1;
    visibility: visible;
}

.skill-text {
    flex: 0 0 45%;
    color: #f4f4f4;
}

.skill-text h2 {
    font-size: clamp(36px, 5vw, 72px);
    margin-bottom: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #fff, #f4f4f4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-text p {
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.skill-image {
    flex: 0 0 45%;
    height: calc(var(--vh, 1vh) * 60);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.skill-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Skill Indicators */
.skill-indicators {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    transform: scale(1.3);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ==================== Portfolio Page ==================== */
#portfolio {
    color: #f4f4f4;
    margin-top: 50px;
    min-height: calc(var(--vh, 1vh) * 100);
    height: auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    justify-items: center;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.project {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
    cursor: pointer;
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.project::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 10px;
    pointer-events: none;
}

.project:hover::after {
    opacity: 1;
}

.work-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
    white-space: nowrap;
}

.project:hover .work-name {
    opacity: 1;
}

/* ==================== Project View ==================== */
.project-view {
    position: relative;
    width: 100%;
    min-height: calc(var(--vh, 1vh) * 100);
}


.project-content {
    background-color: #00000025;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    min-height: calc(var(--vh, 1vh) * 100);
    padding: 20px;
    box-sizing: border-box;
}

.back-icon {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: auto;
    padding: 10px 0;
    cursor: pointer;
    font-size: 2rem;
    color: #333;
    background: rgba(0, 0, 0, 0.144);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    text-align: center;
}

.back-icon:hover {
    background: rgba(234, 255, 0, 0.85);
    color: #ffffff;
    width: 60px;
    height: auto;
    box-shadow: 
        0 0 5px rgba(234, 255, 0, 0.95),
        0 0 15px rgba(234, 255, 0, 0.8),
        0 0 30px rgba(234, 255, 0, 0.6),
        0 0 50px rgba(234, 255, 0, 0.4),
        0 0 80px rgba(234, 255, 0, 0.2),
        2px 0 12px rgba(0,0,0,0.2);
}

.back-icon svg {
    display: none;
}

/* Back Button - 電腦版 */
.back-button {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    gap: 8px;
}

.back-button svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.back-button .back-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    padding-right: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
}

.back-button:hover svg {
    transform: translateX(-3px);
}

.back-button:hover .back-text {
    color: #ffffff;
}

.project-title {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 30%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-title h1 {
    font-size: 50px;
    color: #eaff00;
    font-family: Arial, Helvetica, sans-serif;
    transform-origin: left center;
    font-weight: 1000;
    margin: 0;
    line-height: 1;
}

.project-title h2 {
    font-size: 20px;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

.project-description {
    font-size: 16px;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    display: block;
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    max-height: calc(var(--vh, 1vh) * 80);
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    line-height: 1.8;
    border-radius: 15px;
    scrollbar-width: thin;
    scrollbar-color: #eaff00 rgba(255, 255, 255, 0.1);
}

.project-description p {
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.8;
}

.project-description::-webkit-scrollbar {
    width: 8px;
}

.project-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.project-description::-webkit-scrollbar-thumb {
    background: #eaff00;
    border-radius: 4px;
}

.project-description::-webkit-scrollbar-thumb:hover {
    background: #d4e600;
}

.project-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ==================== Photography Section ==================== */
/* Photography styles are in photography-carousel.css */

/* ==================== Contact Page ==================== */
#contact {
    width: 100%;
    height: auto;
    margin-bottom: 50px;
}

.contact-bg {
    background-color: rgba(0, 0, 0, 0.44);
    width: 100%;
    height: 200px;
    backdrop-filter: blur(5px);
    margin-top: 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
}

#contact h2 {
    margin: 0;
    color: #f4f4f4;
}

#contact p {
    color: #f4f4f4;
    margin: 5px 0;
    text-align: center;
}

/* ==================== Footer ==================== */
footer {
    color: white;
    text-align: center;
    width: 100%;
    background-color: #000000;
    font-family: Arial;
}

footer p {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.social-links a {
    color: #f4f4f4;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: #ffd54f;
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==================== 3D Model Gallery ==================== */
.model-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.model-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.model-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #eaff00;
}

.model-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #2a2a2a;
}

.model-info {
    padding: 15px;
}

.model-info h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.model-info p {
    margin: 0;
    color: #aaa;
    font-size: 0.9rem;
}

#model-viewer-wrapper {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.back-btn {
    background: transparent;
    border: 1px solid #eaff00;
    color: #eaff00;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    background: #eaff00;
    color: #000;
}



/* ==================== Responsive Design ==================== */

/* Tablet & Smaller Desktop (1500px) */
@media (max-width: 1500px) {
    header {
        padding: 12px 0;
    }

    .page-content {
        padding: 100px 14px 40px;
        min-height: auto;
    }

    .left, .center, .right {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* work-exp */
    .work-exp {
        padding: 18px;
        margin-top: 50px;
        text-align: left;
        flex: 0 0 100%;
        max-width: 100%;
        line-height: 2;
    }

    /* awards 欄位 */
    .awards {
        padding: 18px;
        margin-top: 50px;
        text-align: right;
        flex: 0 0 100%;
        max-width: 100%;
        line-height: 2;
    }

    .left, .right {
        background: rgba(0,0,0,0.25);
    }

    #about {
        min-height: calc(var(--vh, 1vh) * 120);
        height: auto;
    }

    .left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .left-body {
        flex-direction: column;
        align-items: center;
    }

    .left .profile-photo {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .left-content {
        align-items: center;
    }

    .left-content .text_about_me,
    .left-content .text_title {
        text-align: center;
    }

    #icon_box {
        justify-content: center;
    }

    .right .work-menu {
        align-items: center;
    }

    .right .work-menu .list {
        text-align: center;
    }

    .right .work-menu .list h3 {
        font-size: 20px;
    }

    /* Skills Section Adjustments for < 1500px */
    .skill-item {
        flex-direction: column;
        justify-content: center;
        padding: 0 5%;
    }

    .skill-text {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
        flex: 0 0 auto;
    }

    .skill-image {
        width: 80%;
        max-width: 800px;
        height: auto;
        max-height: 50vh;
        flex: 0 1 auto;
    }
}

/* Medium Screens (901px - 1500px) */
@media (min-width: 901px) and (max-width: 1500px) {
    .left, .right {
        background: rgba(0,0,0,0.35);
    }

    .center {
        width: 100%;
    }
}

/* Mobile & Tablet (900px) */
@media (max-width: 900px) {
    /* --- 導航觸控優化 --- */
    nav ul {
        justify-content: center;
        margin-left: 0;
        padding: 0 10px;
    }
    
    nav li {
        flex: 0 1 auto;
    }
    
    nav a {
        padding: 10px 8px;
        display: flex;
        font-size: 14px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
        touch-action: manipulation;
    }

    /* --- 背景修正 (固定背景避免跳動) --- */
    body::before {
        position: fixed;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    /* --- 防止橫向溢出 --- */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        position: relative;
    }
    
    #container {
        background-image: none;
        background-attachment: scroll;
        overflow: visible;
    }
    
    #web {
        background: rgba(255,255,255,0.02);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        position: relative;
        z-index: 1;
        overflow: visible;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .page-content {
        overflow: visible;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .name-title {
        background-attachment: scroll;
    }
    
    /* --- 字體大小修正 --- */
    .section-title {
        font-size: clamp(28px, 8vw, 40px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ==================================================
        Skills 區塊（滿版滑動修正）
    ================================================== */
    
    /* 整區塊高度：4頁 x 100vh → 改成安全高度 */
    .skills-section {
        position: relative;
        margin-top: 50px;
        height: calc(var(--vh) * 400); /* 4 個滿版 */
        overflow: visible;
    }
    
    #skills .section-title {
        position: relative;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    /* Sticky 容器固定在一個安全高度內 */
    .skills-container {
        position: sticky;
        top: 0;
        height: calc(var(--vh) * 100);
        margin-top: 0;
        padding-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .skills-content {
        position: relative;
        width: 100%;
        height: 100%;
    }
    
    .skill-item { 
        padding: 0 5%;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(var(--vh) * 100);
        flex-direction: column;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease, visibility 0.6s ease;
    }
    
    .skill-item.active {
        opacity: 1;
        visibility: visible;
    }
    
    .skill-text {
        margin-bottom: 20px;
        margin-top: 0;
        width: 100%;
        text-align: center;
        flex: 0 0 auto;
    }
    
    /* 圖片高度：40vh → 安全高度 */
    .skill-image {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        height: calc(var(--vh) * 40);
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .skill-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* 右側導航指示點 */
    .skill-indicators { 
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    /* ==================================================
        作品集詳細頁面
    ================================================== */
    
    .back-button {
        position: fixed;
        top: 20px;
        left: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        background: rgba(234, 255, 0, 0.9);
        border: none;
        border-radius: 25px;
        color: #000;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        transform: translateY(0);
    }
    
    .back-button:active {
        transform: translateY(2px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .back-icon {
        display: none;
    }
    
    .project-content {
        padding: 80px 20px 40px;
        position: relative;
        min-height: calc(var(--vh) * 100);
    }
    
    .project-title {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
        padding: 0;
    }
    
    .project-title h1 {
        font-size: clamp(32px, 8vw, 48px);
        margin-bottom: 10px;
    }
    
    .project-title h2 {
        font-size: clamp(16px, 4vw, 20px);
    }
    
    .project-description {
        position: static;
        transform: none;
        width: 100%;
        max-height: none;
        padding: 0;
    }
    
    .project-description h1 {
        font-size: clamp(20px, 5vw, 28px);
        margin-top: 20px;
        margin-bottom: 15px;
    }
    
    .project-description h2 {
        font-size: clamp(18px, 4.5vw, 24px);
        margin-top: 20px;
        margin-bottom: 12px;
    }
    
    .project-description p {
        font-size: clamp(14px, 3.5vw, 16px);
        line-height: 1.8;
        margin-bottom: 20px;
    }
    
    .project-description img {
        margin: 20px 0;
        border-radius: 10px;
    }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    .model-gallery {
        grid-template-columns: 1fr;
    }
}

/* Mobile Small (520px) */
@media (max-width: 520px) {
    #icon_box {
        flex-wrap: wrap;
        gap: 8px;
    }

    #icon_box .icon {
        width: clamp(36px, 12vw, 56px);
    }

    .left .profile-photo {
        max-width: 160px;
    }
}
