/* ==================== 基礎 ==================== */
:root {
    --accent-color: #0099ff;
    --accent-glow: rgba(0, 153, 255, 0.4);
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-dim: #6e6e73;
    --white: #ffffff;
    --radius-xl: 2rem;
    --radius-lg: 1.5rem;
}

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

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
    display: none;
}

::selection {
    background: rgba(0, 153, 255, 0.3);
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==================== Loading Screen ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-logo {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: -0.05em;
    animation: logoPulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 40px var(--accent-glow);
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.loader-bar-track {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #66ccff);
    border-radius: 4px;
    animation: loaderFill 1.8s ease-in-out forwards;
}

@keyframes loaderFill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loader-text {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ==================== 導航欄 ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.65rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        order: 3;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .nav-links li {
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a {
        font-size: 1rem;
    }
}

.language-selector {
    position: relative;
}

.selected-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.selected-lang:hover {
    background: rgba(255, 255, 255, 0.08);
}

.flag-icon {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

.selected-lang span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.selected-lang i {
    font-size: 0.65rem;
    color: var(--text-dim);
    transition: transform 0.3s ease;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 170px;
    list-style: none;
    overflow: hidden;
    z-index: 100;
}

.language-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-selector.active .selected-lang i {
    transform: rotate(180deg);
}

.lang-dropdown li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-dropdown li:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-dropdown li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-dropdown span {
    color: var(--text-primary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .selected-lang span {
        display: none;
    }
}

/* ==================== Hero ==================== */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 50, 100, 0.15) 0%, transparent 60%);
    overflow: hidden;
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 12px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    opacity: 0;
}

.hero-name {
    font-size: clamp(4.5rem, 15vw, 11rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 1rem;
}

.text-reveal-mask {
    background: linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0.2) 50%, #ffffff 70%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-container {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    min-height: 3rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 400;
}

.typing-cursor {
    display: inline-block;
    font-weight: 100;
    animation: cursorBlink 1s infinite;
    color: var(--accent-color);
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.hero-description p {
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.8;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(20px);
}

.hero-description p.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 2.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.scroll-hint-text {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 4px;
    animation: hintPulse 2s ease-in-out infinite;
}

.scroll-hint-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    animation: lineGrow 2s ease-in-out infinite;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes lineGrow {
    0% {
        transform: scaleY(0);
        transform-origin: top;
        opacity: 0;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
        opacity: 0;
    }
}

/* ==================== 專長區：星座佈局 ==================== */
.skills-constellation {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 60, 120, 0.08) 0%, transparent 60%);
}

/* SVG 連線層 */
.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.constellation-lines line {
    stroke: rgba(0, 153, 255, 0.15);
    stroke-width: 1;
    stroke-dasharray: 6, 6;
    filter: drop-shadow(0 0 4px rgba(0, 153, 255, 0.1));
}

/* 中央主體 */
.constellation-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
    opacity: 0;
}

.center-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(0, 153, 255, 0.12);
}

.ring-1 {
    width: 140px;
    height: 140px;
    animation: ringPulse1 4s ease-in-out infinite;
}

.ring-2 {
    width: 220px;
    height: 220px;
    border-color: rgba(0, 153, 255, 0.07);
    animation: ringPulse2 5s ease-in-out infinite 0.5s;
}

.ring-3 {
    width: 310px;
    height: 310px;
    border-color: rgba(0, 153, 255, 0.04);
    animation: ringPulse3 6s ease-in-out infinite 1s;
}

@keyframes ringPulse1 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes ringPulse2 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.7;
    }
}

@keyframes ringPulse3 {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.03);
        opacity: 0.4;
    }
}

.center-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.15), rgba(0, 80, 160, 0.05));
    border: 1px solid rgba(0, 153, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 153, 255, 0.1);
}

.center-icon i {
    font-size: 2rem;
    color: var(--accent-color);
}

.center-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.center-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
}

/* 技能節點 */
.skill-node {
    position: absolute;
    padding: 1.2rem 1.8rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    text-align: center;
    opacity: 0;
    z-index: 3;
    transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
    cursor: default;
}

.skill-node:hover {
    border-color: rgba(0, 153, 255, 0.4);
    transform: scale(1.06) !important;
    box-shadow: 0 8px 30px rgba(0, 153, 255, 0.12);
}

.node-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.6rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.12), transparent);
    border: 1px solid rgba(0, 153, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.skill-node:hover .node-icon {
    transform: scale(1.1) rotate(5deg);
}

.node-icon i {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.node-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

.node-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.4;
    white-space: nowrap;
}

/* 8 個節點的最終位置：圍繞中心 360° 分佈 */
/* 0: 正上方 */
.skill-node-0 {
    top: 12%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 1: 右上 */
.skill-node-1 {
    top: 25%;
    left: 80%;
    transform: translate(-50%, -50%);
}

/* 2: 正右 */
.skill-node-2 {
    top: 50%;
    left: 88%;
    transform: translate(-50%, -50%);
}

/* 3: 右下 */
.skill-node-3 {
    top: 75%;
    left: 80%;
    transform: translate(-50%, -50%);
}

/* 4: 正下方 */
.skill-node-4 {
    top: 88%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 5: 左下 */
.skill-node-5 {
    top: 75%;
    left: 20%;
    transform: translate(-50%, -50%);
}

/* 6: 正左 */
.skill-node-6 {
    top: 50%;
    left: 12%;
    transform: translate(-50%, -50%);
}

/* 7: 左上 */
.skill-node-7 {
    top: 25%;
    left: 20%;
    transform: translate(-50%, -50%);
}

/* 平板版 (769-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .skill-node {
        padding: 0.9rem 1.2rem;
    }

    .node-icon {
        width: 40px;
        height: 40px;
    }

    .node-icon i {
        font-size: 1rem;
    }

    .node-title {
        font-size: 0.9rem;
    }

    .node-desc {
        font-size: 0.7rem;
    }

    .center-title {
        font-size: 1.7rem;
    }

    .ring-1 {
        width: 120px;
        height: 120px;
    }

    .ring-2 {
        width: 190px;
        height: 190px;
    }

    .ring-3 {
        width: 260px;
        height: 260px;
    }

    .skill-node-0 {
        top: 8%;
        left: 50%;
    }

    .skill-node-1 {
        top: 20%;
        left: 85%;
    }

    .skill-node-2 {
        top: 50%;
        left: 92%;
    }

    .skill-node-3 {
        top: 80%;
        left: 85%;
    }

    .skill-node-4 {
        top: 92%;
        left: 50%;
    }

    .skill-node-5 {
        top: 80%;
        left: 15%;
    }

    .skill-node-6 {
        top: 50%;
        left: 8%;
    }

    .skill-node-7 {
        top: 20%;
        left: 15%;
    }
}

/* 手機版 (≤768px)：從星座改為垂直佈局 */
@media (max-width: 768px) {
    .skills-constellation {
        height: auto;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 5rem 1.2rem 3rem;
        gap: 2rem;
        overflow: visible;
    }

    .constellation-lines {
        display: none;
    }

    .constellation-center {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        z-index: 5;
        margin-bottom: 0.5rem;
    }

    .center-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        margin-bottom: 0.8rem;
    }

    .center-icon i {
        font-size: 1.4rem;
    }

    .center-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    .center-subtitle {
        font-size: 0.8rem;
    }

    .center-ring {
        display: none;
    }

    .skill-node {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        padding: 1rem 1.2rem;
        border-radius: 14px;
        width: 100%;
    }

    .node-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        margin-bottom: 0.4rem;
    }

    .node-icon i {
        font-size: 1rem;
    }

    .node-title {
        font-size: 0.9rem;
        white-space: normal;
    }

    .node-desc {
        font-size: 0.72rem;
        white-space: normal;
    }

    /* 2 列網格 */
    .skills-constellation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
        padding: 5rem 1rem 3rem;
    }

    .constellation-center {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* ==================== 作品引導過渡區 ==================== */
.works-bridge {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 45vh;
    padding: 4rem 2rem 3rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

.works-bridge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0, 153, 255, 0.4), transparent);
}

.bridge-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    transform: translateY(30px);
}

.bridge-label {
    font-size: 0.75rem;
    letter-spacing: 6px;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
}

.bridge-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.bridge-desc {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.bridge-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 0.5rem;
}

.bridge-arrow i {
    font-size: 1.2rem;
    color: var(--accent-color);
    opacity: 0.5;
    animation: bounceDown 2s ease-in-out infinite;
}

.bridge-arrow i:first-child {
    opacity: 0.8;
    animation-delay: 0s;
}

.bridge-arrow i:last-child {
    opacity: 0.4;
    animation-delay: 0.15s;
    margin-top: -6px;
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.bridge-scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    animation: lineGrow 2s ease-in-out infinite;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .works-bridge {
        min-height: 50vh;
        padding: 5rem 1.5rem 3rem;
    }

    .bridge-label {
        font-size: 0.7rem;
        letter-spacing: 5px;
    }

    .bridge-arrow i {
        font-size: 1.5rem;
    }

    .bridge-desc {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* ==================== 水平滾動 ==================== */
.horizontal-section {
    height: 100vh;
    background: var(--bg-secondary);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.horizontal-container {
    display: flex;
    width: 500vw;
    height: 100%;
}

.h-panel {
    width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 2rem 4rem;
    gap: 4rem;
}

.h-panel-intro {
    flex-direction: column;
    gap: 1.5rem;
}

.h-panel-intro .section-subtitle {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.h-panel-hint {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    font-weight: 400;
    animation: hintPulse 2s infinite;
}

.h-panel-scroll-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.h-panel-scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.h-panel-scroll-arrow i {
    font-size: 1.3rem;
    color: var(--accent-color);
    animation: scrollArrowBounce 2s ease-in-out infinite;
    line-height: 1;
    margin-top: -4px;
}

.h-panel-scroll-arrow i:nth-child(1) {
    animation-delay: 0.3s;
    opacity: 0.3;
}

.h-panel-scroll-arrow i:nth-child(2) {
    animation-delay: 0.15s;
    opacity: 0.6;
}

.h-panel-scroll-arrow i:nth-child(3) {
    animation-delay: 0s;
    opacity: 0.9;
}

@keyframes scrollArrowBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

.h-panel-reverse {
    flex-direction: row-reverse;
}

.h-panel-text {
    flex: 0 0 40%;
}

.h-panel-text h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.h-panel-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.h-panel-tags {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.example-tag {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 153, 255, 0.3);
    color: var(--accent-color);
    background: rgba(0, 153, 255, 0.05);
}

.h-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.h-panel-link:hover {
    gap: 1rem;
}

.h-panel-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.h-panel-link:hover i {
    transform: translateX(4px);
}

.h-panel-visual {
    flex: 0 0 45%;
    aspect-ratio: 16/10;
    max-height: 65vh;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

/* Skeleton loading */
.h-panel-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 100%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skeleton-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.04) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.h-panel-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.h-panel-visual:hover .h-panel-preview-img {
    transform: scale(1.05);
}

.h-panel-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 3;
}

.h-panel-url {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.h-panel-cta {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.h-panel-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.12), transparent);
    border: 1px solid rgba(0, 153, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.h-panel-icon-large i {
    font-size: 3rem;
    color: var(--text-dim);
}

.h-panel-cta h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.h-panel-cta p {
    font-size: 1.1rem;
    color: var(--text-dim);
}

@media (max-width: 768px) {
    .h-panel {
        flex-direction: column !important;
        padding: 2rem;
        gap: 2rem;
    }

    .h-panel-text,
    .h-panel-visual {
        flex: none;
        width: 100%;
    }

    .h-panel-text h3 {
        font-size: 1.8rem;
    }

    .h-panel-visual {
        aspect-ratio: 16/9;
        max-height: 35vh;
    }

    .h-panel-scroll-arrow i {
        font-size: 1.8rem;
    }

    .h-panel-hint {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .h-panel-scroll-guide {
        gap: 1.2rem;
        margin-top: 1.5rem;
    }
}

/* ==================== 關於我 ==================== */
.about-section {
    padding: 8rem 2rem;
    background: var(--bg-secondary);
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}

.about-intro {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(15px);
    max-width: 550px;
    width: 100%;
    transition: all 0.4s ease;
}

.about-intro:hover {
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 153, 255, 0.1);
    transform: translateY(-4px);
}

.about-avatar {
    position: relative;
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.25), rgba(0, 100, 200, 0.08));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 153, 255, 0.3);
}

.about-avatar i {
    font-size: 2rem;
    color: var(--accent-color);
    z-index: 1;
}

.avatar-glow {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.25) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.about-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.about-alias {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 400;
}

.about-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.terminal-wrapper {
    width: 100%;
    max-width: 800px;
}

.terminal-window {
    background: rgba(10, 10, 15, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: all 0.4s ease;
}

.terminal-window:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 153, 255, 0.08);
    transform: translateY(-4px);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.terminal-buttons {
    display: flex;
    gap: 7px;
}

.btn-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.btn-dot.red {
    background: #ff5f56;
}

.btn-dot.yellow {
    background: #ffbd2e;
}

.btn-dot.green {
    background: #27c93f;
}

.terminal-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    pointer-events: none;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #d4d4d4;
    min-height: 300px;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(5, 5, 10, 0.98) 100%);
}

.log-entry {
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInLog 0.5s forwards;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.log-entry:hover {
    border-left-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
}

@keyframes fadeInLog {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.log-time {
    color: var(--accent-color);
    margin-right: 0.8rem;
    font-weight: bold;
}

.log-command {
    color: #27c93f;
    display: block;
    margin-bottom: 0.3rem;
}

.log-output {
    color: #808080;
    line-height: 1.6;
    margin: 0;
    padding-left: 1.5rem;
    position: relative;
}

.log-output::before {
    content: '>>';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.2);
}

.command-line {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    padding-left: 1rem;
    color: #27c93f;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

.prompt {
    margin-right: 0.8rem;
    font-weight: bold;
}

.cursor-blink {
    display: inline-block;
    width: 9px;
    height: 1.1rem;
    background: #d4d4d4;
    animation: cursorBlink 1s infinite;
}

@media (max-width: 768px) {
    .about-intro {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .terminal-body {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* ==================== 聯絡 ==================== */
.contact-section {
    padding: 8rem 2rem;
    background: var(--bg-secondary);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.social-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Spotlight hover effect */
.spotlight-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 153, 255, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card > * {
    position: relative;
    z-index: 1;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.contact-card i {
    font-size: 1.5rem;
    color: var(--accent-color);
    min-width: 35px;
    text-align: center;
}

.contact-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.contact-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.contact-card.instagram:hover {
    border-color: #E1306C;
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.08), transparent);
}

.contact-card.instagram:hover i {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-card.line:hover {
    border-color: #00B900;
    background: rgba(0, 185, 0, 0.06);
}

.contact-card.line:hover i {
    color: #00B900;
}

.contact-card.wechat:hover {
    border-color: #09B83E;
    background: rgba(9, 184, 62, 0.06);
}

.contact-card.wechat:hover i {
    color: #09B83E;
}

@media (max-width: 768px) {

    .contact-grid,
    .social-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 頁尾 ==================== */
footer {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: rgba(0, 153, 255, 0.1);
    border-color: rgba(0, 153, 255, 0.3);
    color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ==================== 回到頂部按鈕 ==================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 153, 255, 0.15);
    border: 1px solid rgba(0, 153, 255, 0.3);
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(0, 153, 255, 0.25);
    box-shadow: 0 8px 30px rgba(0, 153, 255, 0.2);
    transform: translateY(-4px);
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
}

.close-modal {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.qr-code {
    width: 100%;
    border-radius: 12px;
}

.gs-fade-up {
    opacity: 0;
    transform: translateY(50px);
}