/* =========================================
   CORE SYSTEM SETTINGS
========================================= */
body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6; /* Tối ưu hóa độ giãn dòng để dễ đọc hơn */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased; /* Làm font chữ sắc nét hơn trên màn hình sắc nét */
}

.container {
    max-width: 900px;
    margin: auto;
    padding: 40px 20px; /* Thêm padding 20px hai bên để không bị sát lề trên mobile */
}

/* =========================================
   TYPOGRAPHY & LINKS
========================================= */
h1 {
    font-size: 48px; /* Tăng size tên lên một chút để tạo sự áp đảo */
    margin-bottom: 5px;
    letter-spacing: -1px; /* Khoảng cách chữ thu hẹp lại trông hiện đại hơn */
}

h2 {
    font-size: 28px;
    border-bottom: 1px solid #334155; /* Thêm gạch chân mờ để phân tách các Section rõ ràng */
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: #f8fafc;
}

.tagline {
    color: #94a3b8;
    font-size: 18px;
    margin: 0;
}

.focus {
    margin-top: 5px;
    color: #38bdf8;
    font-weight: 500;
}

/* Tối ưu hóa hiệu ứng Hover cho Link */
a {
    color: #38bdf8;
    text-decoration: none;
    transition: all 0.3s ease; /* Thêm độ trễ mượt mà khi di chuột */
}

a:hover {
    color: #7dd3fc; /* Sáng lên khi di chuột vào */
}

.links {
    margin-top: 15px;
}

.links a {
    margin-right: 20px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.links a:hover {
    border-bottom: 1px solid #7dd3fc; /* Gạch chân mượt mà khi hover */
}

section {
    margin-top: 80px; /* Tăng khoảng cách các phần để UI thở (Breathing room) */
}

/* =========================================
   GRID & CARDS (INTERACTIVE MODULES)
========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Card Kỹ năng */
.card {
    background: #1e293b;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #334155; /* Đóng khung mờ tạo cảm giác 3D */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Kích hoạt thuật toán chuyển động */
}

.card:hover {
    transform: translateY(-5px); /* Nổi lên khi di chuột */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: #38bdf8; /* Sáng viền màu xanh công nghệ */
}

.card h3 {
    margin-top: 0;
    color: #f1f5f9;
}

/* =========================================
   PROJECTS SHOWCASE
========================================= */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #334155;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Giúp đẩy nút Github xuống dưới cùng đồng đều */
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.project img {
    width: 100%;
    aspect-ratio: 16/9; /* Ép tỷ lệ ảnh đồng đều, không bị lệch Grid nếu ảnh to nhỏ khác nhau */
    object-fit: cover; /* Cắt ảnh gọn gàng vào khung */
    border-radius: 8px;
    margin-bottom: 15px;
}

.project h3 {
    margin-top: 0;
    color: #f1f5f9;
}

.tech {
    color: #94a3b8;
    font-size: 13px;
    font-family: monospace; /* Chữ monospace đúng chất code */
    background: #0f172a;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 15px;
}

.project a {
    margin-top: auto; /* Đẩy link chốt xuống đáy Card */
    font-weight: bold;
}

/* =========================================
   FOOTER
========================================= */
footer {
    margin-top: 80px;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #64748b;
    text-align: center;
}
