/* 基礎設定 */
/* 讓中文呼吸感更好，不那麼擁擠 */
body {
    background-color: #050505;
    color: #E2E8F0;
    overflow-x: hidden;
    
    /* 新增這兩行 */
    letter-spacing: 0.025em; /* 字距微寬 */
    line-height: 1.7;        /* 行高拉開 */
    
    /* 讓字體渲染更清晰 (抗鋸齒) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 導覽列磨砂玻璃效果 */
.glass {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}


.bento-item, .project-card-vertical {
    position: relative;
    /* 1. 關鍵：背景設為透明，直接看見網頁底部的點點矩陣 */
    background: transparent !important; 
    /* 2. 徹底移除任何邊框 */
    border: none !important;
    /* 3. 移除陰影（只在懸停時出現） */
    box-shadow: none !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bento 卡片通用樣式 */
/* .bento-item {
    position: relative;
    background: #0A0A0A;
    border: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible; 
    border-radius: 1.5rem;
} */
/* 卡片懸停：朝外發光效果 */
/* .bento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px 2px rgba(191, 148, 255, 0.3); 
    background: #0F0F0F;
} */

/* 聯繫卡片專用懸停 */
.contact-card-bento {
    background: #0A0A0A;
    border: 1.5px solid rgba(191, 148, 255, 0); 
    transition: all 0.5s ease;
}

.contact-card-bento:hover {
    border-color: rgba(191, 148, 255, 0.6) !important;
    box-shadow: 0 0 30px 4px rgba(191, 148, 255, 0.25);
}

/* 垂直專案卡片樣式 */
.project-card-vertical {
    background: #0A0A0A;
    border: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    overflow: visible;
}

.project-card-vertical:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 40px 6px rgba(191, 148, 255, 0.2);
    background: #0A0A0A;
}

/* 漸層文字效果 */
.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 0%, #BF94FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 背景裝飾點點 */
.dot-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* 滾動條美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #333; }


/* --- 打字機游標動畫 (控制透明度) --- */
@keyframes blink-cursor {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* --- 打字機容器設定 (預設：手機版) --- */
.animate-typewriter {
    display: inline;       /* 手機版：讓文字自然流動 */
    white-space: pre-wrap; /* 手機版：允許自動換行 */
    overflow: visible;     /* 允許內容顯示 */
    border-right: none;    /* 移除舊版邊框游標 */
    position: relative;
    word-break: break-word; /* 確保長單字換行 */
}

/* --- 游標設定 (使用偽元素，手機電腦通用) --- */
.animate-typewriter::after {
    content: '';
    display: inline-block;
    width: 3px;            /* 游標寬度 */
    height: 1.2em;         /* 游標高度 */
    background-color: #BF94FF; /* 紫色 */
    margin-left: 4px;      /* 距離文字 */
    vertical-align: sub;   /* 對齊微調 */
    animation: blink-cursor 0.9s step-end infinite;
}

/* --- 電腦版覆寫 (螢幕大於 768px 時) --- */
@media (min-width: 768px) {
    .animate-typewriter {
        white-space: nowrap; /* 電腦版：強制不換行 */
    }
}


/* --- 標題閃爍特效 --- */
@keyframes title-flash {
    0% {
        color: inherit;
        text-shadow: none;
    }
    20% {
        color: #BF94FF; /* 變成亮紫色 */
        text-shadow: 0 0 15px rgba(191, 148, 255, 0.6); /* 發光 */
    }
    100% {
        color: inherit;
        text-shadow: none;
    }
}

.flash-active {
    /* 1秒內執行完畢，easeInOut讓效果柔和 */
    animation: title-flash 1s cubic-bezier(0.4, 0, 0.2, 1); 
}


