:root {
    --bg-surface: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Professional Accent Palette */
    --pomai-accent: #ef4444;
    /* Modern Red */
    --core-accent: #8b5cf6;
    /* Royal Purple */
    --utility-accent: #0ea5e9;
    /* Ocean Blue */
    --border-color: #e2e8f0;
}

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

body {
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Loại bỏ hiệu ứng cũ, thay bằng Header thanh lịch */
.terminal-header {
    background: white;
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

h1.glitch {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 10px;
    text-shadow: none;
    /* Bỏ phát sáng */
}

h1.glitch::after {
    display: none;
}

/* Bỏ hiệu ứng glitch cũ */

.system-stats {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.typewriter {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-right: 2px solid var(--text-main);
    animation: blink 0.8s infinite;
}

/* Portfolio Container */
#portfolio {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.category {
    margin-bottom: 50px;
}

.category h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category h2 i {
    opacity: 0.5;
}

/* Repo Grid & Modern Cards */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.repo-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.repo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -10px rgba(0, 0, 0, 0.1);
}

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

.id {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.version {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

.repo-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    display: inline-block;
    transition: color 0.2s;
}

/* Border Accent theo nhóm */
.repo-card[data-group="pomai"] {
    border-top: 4px solid var(--pomai-accent);
}

.repo-card[data-group="pomai"] .version {
    color: var(--pomai-accent);
}

.repo-card[data-group="pomai"]:hover .repo-link {
    color: var(--pomai-accent);
}

.repo-card[data-group="core"] {
    border-top: 4px solid var(--core-accent);
}

.repo-card[data-group="core"] .version {
    color: var(--core-accent);
}

.repo-card[data-group="core"]:hover .repo-link {
    color: var(--core-accent);
}

.repo-card[data-group="utility"] {
    border-top: 4px solid var(--utility-accent);
}

.repo-card[data-group="utility"] .version {
    color: var(--utility-accent);
}

.repo-card[data-group="utility"]:hover .repo-link {
    color: var(--utility-accent);
}

/* Remove CRT elements */
.crt-overlay::before,
.scanlines {
    display: none;
}

/* Responsive */
@media (max-width: 640px) {
    .repo-grid {
        grid-template-columns: 1fr;
    }

    .terminal-header {
        padding: 40px 20px;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Navigation styles */
.back-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-link {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-muted); /* Dùng màu nhạt của bản chuyên nghiệp */
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
}

.home-link:hover {
    color: var(--text-main);
    border-color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateX(-3px); /* Hiệu ứng nhích nhẹ sang trái khi hover */
}

/* Đảm bảo Header có position relative để nút tuyệt đối nằm đúng chỗ */
.terminal-header {
    position: relative;
    background: white;
    padding: 80px 20px 40px; /* Tăng padding top để không đè lên nút */
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}