@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --bg-color: #050508;
    --primary: #00ffcc; /* Cyan/Neon Green */
    --primary-dim: rgba(0, 255, 204, 0.3);
    --secondary: #ff0055; /* Alert Red */
    --text-main: #e0ffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 背景動畫畫布 --- */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.6;
}

/* --- CRT 掃描線與螢幕特效 --- */
.scanlines {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 999;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

.scanlines.active {
    display: block;
}

/* --- 佈局 --- */
.hud-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* --- 面板共用樣式 (HUD 邊框) --- */
.panel {
    background: rgba(5, 5, 10, 0.75);
    border: 1px solid var(--primary-dim);
    position: relative;
    padding: 30px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.1);
}

.panel::before, .panel::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    transition: all 0.3s;
}

.panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.panel:hover { box-shadow: 0 0 25px rgba(0, 255, 204, 0.2); border-color: var(--primary); }

/* --- 左側 Profile --- */
.sys-header {
    color: var(--secondary);
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--secondary);
    padding-bottom: 5px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    margin-bottom: 5px;
}

.title-badge {
    background: var(--primary);
    color: var(--bg-color);
    display: inline-block;
    padding: 3px 10px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.status-box {
    border-left: 3px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 40px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.status-row .label { color: #888; }
.status-row .value { color: var(--text-main); }
.blink { animation: blinker 2s linear infinite; color: var(--primary) !important; text-shadow: 0 0 5px var(--primary); }

@keyframes blinker { 50% { opacity: 0.3; } }

/* --- 按鈕 --- */
.links { display: flex; flex-direction: column; gap: 15px; }
.cyber-button {
    text-decoration: none;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.2s;
    background: linear-gradient(90deg, var(--primary-dim) 0%, transparent 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
}
.cyber-button:hover {
    background-position: 0 0;
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary);
}

/* --- 右側 Data Core --- */
.data-core { display: flex; flex-direction: column; gap: 30px; }
.section-title {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--primary-dim);
    padding-bottom: 10px;
}

.tech-list { list-style: none; }
.tech-list li { margin-bottom: 25px; position: relative; padding-left: 20px; }
.tech-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--secondary);
    animation: blinker 1.5s infinite;
}
.highlight { color: var(--primary); font-size: 1.2rem; font-weight: bold; display: block; margin-bottom: 5px;}
.tech-list p { color: #aaa; font-size: 0.95rem; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.project-card {
    border: 1px dashed var(--primary-dim);
    padding: 20px;
    background: rgba(0, 255, 204, 0.02);
    transition: 0.3s;
}
.project-card:hover {
    border: 1px solid var(--primary);
    background: rgba(0, 255, 204, 0.05);
    transform: translateY(-5px);
}
.project-card h3 { color: var(--text-main); font-size: 1.1rem; margin-bottom: 10px; }
.project-card p { color: #999; font-size: 0.85rem; }

/* --- 故障特效 (Glitch) --- */
.glitch { position: relative; }
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 83px, 0); }
    20% { clip: rect(65px, 9999px, 98px, 0); }
    40% { clip: rect(4px, 9999px, 13px, 0); }
    60% { clip: rect(81px, 9999px, 33px, 0); }
    80% { clip: rect(12px, 9999px, 69px, 0); }
    100% { clip: rect(54px, 9999px, 7px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(3px, 9999px, 20px, 0); }
    40% { clip: rect(89px, 9999px, 90px, 0); }
    60% { clip: rect(22px, 9999px, 45px, 0); }
    80% { clip: rect(15px, 9999px, 76px, 0); }
    100% { clip: rect(33px, 9999px, 18px, 0); }
}

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