:root {
    --neon-green: #0f0;
    --dim-green: #003300;
    --bg-color: #050505;
    --card-bg: rgba(0, 20, 0, 0.7);
    --text-highlight: #ccffcc;
}

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

body {
    font-family: 'VT323', monospace;
    background-color: var(--bg-color);
    color: var(--neon-green);
    overflow-x: hidden;
    font-size: 18px;
    line-height: 1.6;
}

/* 核心特效：掃描線 */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

/* 3D 背景容器 */
#canvas-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.5;
}

/* 開場覆蓋層 */
#intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease-out;
}

.glitch-text {
    font-size: 3rem;
    text-shadow: 2px 2px var(--dim-green);
    animation: glitch 1s infinite alternate;
}

.user-id {
    margin: 10px 0 30px;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.glitch-btn {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    padding: 10px 30px;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.glitch-btn:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px var(--neon-green);
}

/* 導覽列 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid var(--dim-green);
    padding: 10px 0;
    z-index: 100;
    display: none;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav li { margin: 0 20px; }

nav a {
    color: var(--neon-green);
    text-decoration: none;
    font-size: 1.3rem;
}

nav a:hover {
    text-shadow: 0 0 5px var(--neon-green);
    text-decoration: underline;
}

/* 主要容器 */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    display: none;
    opacity: 0;
    transition: opacity 1s;
}

section {
    border: 1px solid var(--dim-green);
    background: var(--card-bg);
    padding: 30px;
    margin-bottom: 50px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 50, 0, 0.3);
}

/* 裝飾性角落 */
section::before {
    content: ''; position: absolute; top: -1px; left: -1px;
    width: 15px; height: 15px;
    border-top: 2px solid var(--neon-green);
    border-left: 2px solid var(--neon-green);
}
section::after {
    content: ''; position: absolute; bottom: -1px; right: -1px;
    width: 15px; height: 15px;
    border-bottom: 2px solid var(--neon-green);
    border-right: 2px solid var(--neon-green);
}

h2 {
    border-bottom: 1px dashed var(--dim-green);
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 2rem;
}

/* Profile 樣式 */
.profile-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.avatar-box {
    width: 180px;
    height: 180px;
    border: 2px solid var(--dim-green);
    padding: 5px;
    flex-shrink: 0;
}

.avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) contrast(1.2) sepia(20%) hue-rotate(50deg); /* 駭客綠濾鏡 */
}

.role-badge {
    display: inline-block;
    background: var(--dim-green);
    color: var(--neon-green);
    padding: 2px 8px;
    font-size: 0.9rem;
    margin-right: 5px;
    margin-bottom: 10px;
}

.bio-text {
    color: #ddd;
    margin-bottom: 15px;
}

.contact-info {
    list-style: none;
    font-size: 1rem;
    border-top: 1px solid var(--dim-green);
    padding-top: 10px;
}

.contact-info a { color: var(--neon-green); }

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.progress-bg {
    width: 100%;
    height: 15px;
    background: #111;
    border: 1px solid #333;
}

.progress-fill {
    height: 100%;
    background: var(--neon-green);
    width: 0;
    transition: width 1.5s ease-out;
    box-shadow: 0 0 5px var(--neon-green);
}

.tech-stack-list h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-highlight);
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-card {
    border: 1px solid var(--dim-green);
    padding: 20px;
    background: rgba(0, 10, 0, 0.4);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateX(5px);
    border-color: var(--neon-green);
    background: rgba(0, 30, 0, 0.6);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #111;
    padding-bottom: 5px;
}

.status-tag {
    font-size: 0.8rem;
    padding: 2px 6px;
    border: 1px solid;
}
.status-tag.online { color: cyan; border-color: cyan; }
.status-tag.hardware { color: orange; border-color: orange; }
.status-tag.bot { color: violet; border-color: violet; }
.status-tag.server { color: yellow; border-color: yellow; }

.project-details {
    margin: 15px 0;
    list-style: none;
    color: #ccc;
    font-size: 0.95rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    font-size: 0.8rem;
    background: var(--dim-green);
    padding: 3px 8px;
    color: var(--text-highlight);
}

/* Log / Achievements */
.log-terminal {
    font-family: 'Courier New', monospace;
    background: #000;
    padding: 15px;
    border: 1px solid #333;
}

.log-entry {
    margin-bottom: 8px;
    border-bottom: 1px solid #111;
    padding-bottom: 4px;
}

.log-date {
    color: #666;
    margin-right: 10px;
}

.log-content.highlight {
    color: yellow;
    text-shadow: 0 0 2px orange;
}

/* RWD */
@media (max-width: 768px) {
    .profile-content { flex-direction: column; text-align: center; }
    .avatar-box { margin: 0 auto; }
    nav ul { flex-wrap: wrap; }
}