/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* Tránh cuộn ngang do slide */
}

.bg-light { background-color: #f9f9f9; }

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent; /* Mặc định trong suốt trên slide */
    z-index: 1000;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1200px;
    margin: auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.6rem; color: #fff; transition: color 0.4s; }
.logo span { color: #3498db; }

#navbar.scrolled .logo { color: #2c3e50; }

.nav-links { list-style: none; display: flex; }
.nav-links li { margin-left: 2rem; }
.nav-links a {
    text-decoration: none;
    color: #fff; 
    font-weight: 500;
    transition: all 0.3s;
    font-size: 1.05rem;
}

#navbar.scrolled .nav-links a { color: #333; }
#navbar.scrolled .nav-links a:hover { color: #3498db; }

/* Hero Slider Section (Tự động chuyển liên tục) */
.hero-slider {
    height: 100vh; 
    width: 100%;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    /* Hiệu ứng chuyển động mượt mà hơn */
    transition-timing-function: linear; 
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 10;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 10px;
    opacity: 0.9;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin: 10px 0 20px 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.typing-text {
    font-size: 1.4rem;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 1px;
}

.btn {
    display: inline-block;
    padding: 12px 35px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid #3498db;
}

.btn:hover {
    background: transparent;
    color: #3498db;
    transform: translateY(-3px);
}

/* Tùy chỉnh Swiper */
.swiper-button-next, .swiper-button-prev { color: #fff; opacity: 0.5; transition: 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { opacity: 1; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.5rem; }

.swiper-pagination-bullet { background: #fff; opacity: 0.5; }
.swiper-pagination-bullet-active { background: #3498db; opacity: 1; }

/* Giới thiệu về Alan Turing (Tiểu sử Thiên tài) */
.about-container {
    max-width: 1000px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 50px;
    text-align: left;
}

.about-profile {
    flex: 0 0 250px; /* Cố định chiều rộng ảnh */
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%; /* Khung tròn */
    object-fit: cover; /* Giữ tỷ lệ ảnh */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 5px solid #fff;
}

.about-info {
    flex: 1;
}

.about-info p {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 20px;
    text-align: justify;
}

/* Sections chung */
.section { padding: 100px 20px; text-align: center; }
.section-title {
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: #2c3e50;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: #3498db;
    bottom: -15px;
    left: calc(50% - 30px);
    border-radius: 2px;
}

/* Kỹ năng */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: auto;
}
.skill-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}
.skill-card:hover { transform: translateY(-10px); border-bottom: 3px solid #3498db; }
.skill-card i { font-size: 3rem; color: #3498db; margin-bottom: 20px; }
.skill-card h3 { font-size: 1.4rem; margin-bottom: 10px; color: #2c3e50; }

/* Dự án (Có hình ảnh sinh động) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}
.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: left;
    transition: 0.3s;
    display: flex;
    flex-direction: column; /* Sắp xếp theo cột */
}
.project-card:hover { transform: scale(1.02); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }

.project-img {
    width: 100%;
    height: 220px; /* Cố định chiều cao ảnh dự án */
    object-fit: cover; /* Giữ tỷ lệ ảnh */
    border-bottom: 1px solid #eee;
}

.project-info { padding: 25px; flex-grow: 1; /* Chiếm không gian còn lại */ }
.project-info h3 { margin-bottom: 12px; color: #2c3e50; font-size: 1.3rem; }
.project-info p { margin-bottom: 20px; color: #666; font-size: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
    background: #e1f0fa;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #3498db;
    font-weight: 600;
}

/* Liên hệ (Nhiều phương thức) */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: auto;
}

.contact-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.contact-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.contact-item i { font-size: 2.5rem; color: #3498db; margin-bottom: 15px; }
.contact-item h4 { font-size: 1.2rem; margin-bottom: 5px; color: #2c3e50; }
.contact-item p a { text-decoration: none; color: #555; font-size: 1rem; transition: 0.3s; }
.contact-item p a:hover { color: #3498db; }

/* Footer */
footer { background: #2c3e50; color: #fff; text-align: center; padding: 20px; }

/* Responsive */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 3.2rem; }
    .about-container { flex-direction: column; text-align: center; gap: 30px; }
    .about-info p { text-align: center; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content h2 { font-size: 1.4rem; }
    .typing-text { font-size: 1.1rem; }
    .section-title { font-size: 2.2rem; }
    .profile-img { width: 200px; height: 200px; }
}