* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lora', 'Merriweather', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: #fbfcf8;
    color: #0F172A;
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    color: #0f1f2a;
    text-decoration: none;
    letter-spacing: 0.5px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6B7280;
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: #1E293B;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: #5b7785;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #0F172A;
    cursor: pointer;
}

/* Hero */
.hero {
    background: linear-gradient(to bottom, #F8FAFC 0%, #F3F4F6 100%);
    color: #0f2a21;
    padding: 160px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(243, 244, 246, 0.2));
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { transform: translateX(0); }
    50% { transform: translateX(-10%); }
    100% { transform: translateX(0); }
}

.profile-img {
    width: 220px;
    height: 220px;
    border-radius: 10%;
    object-fit: cover;
    margin-bottom: 24px;
    border: 3px solid #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s ease;
}

/* .personal-info {
    list-style: none;
    padding: 0;
    margin-top: 1.5em;
    font-size: 1rem;
    color: #1E293B;
    line-height: 1.8;
}

.personal-info li {
    margin-bottom: 8px;
}

.personal-info a {
    color: #2563EB;
    text-decoration: none;
}

.personal-info a:hover {
    text-decoration: underline;
}
 */
 .personal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 2em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.personal-info-grid p {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: #1E293B;
}

.personal-info-grid p > strong {
    flex: 0 0 130px; /* giữ cứng chiều rộng label */
    font-weight: 600;
    color: #0F172A;
}

.personal-info-grid a {
    color: #2563EB;
    text-decoration: none;
    word-break: break-word;
}

.personal-info-grid a:hover {
    text-decoration: underline;
    color: #1D4ED8;
}



.profile-img:hover {
    transform: scale(1.05);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 span {
    color: #6B7280;
}

.hero h2 {
    font-size: 1.6rem;
    font-weight: 400;
    color: #1E293B;
    margin-bottom: 24px;
    animation: fadeInUp 1.2s ease-out;
}

#typed-cursor {
    font-size: 1.6rem;
    color: #4B5563;
    opacity: 1;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: #6B7280;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn:hover {
    background: #4B5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn:hover i {
    transform: translateX(4px);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}

.project-card a {
    text-decoration: none;
    color: inherit;
}

.project-card a:hover {
    text-decoration: underline;
    color: #4B5563; /* màu xám đậm nhẹ khi hover, tinh tế */
}


/* Sections */
.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 48px;
    text-align: center;
    color: #0F172A;
    letter-spacing: -0.3px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: #6B7280;
    transform: translateX(-50%);
}

.section-text {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    text-align: center;
    color: #1E293B;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out;
}

.card {
    background: #FFFFFF;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 12px;
}

.card p, .card ul {
    font-size: 1rem;
    color: #1E293B;
    line-height: 1.7;
}

.card ul {
    list-style: disc;
    margin-left: 20px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #E5E7EB;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 1.3rem;
    padding: 16px 20px 8px;
    color: #0F172A;
}

.project-card p {
    padding: 0 20px 20px;
    font-size: 0.95rem;
    color: #1E293B;
}


/* Certificates */
.certificates a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.certificates a:hover {
    color: #4B5563;
    text-decoration: underline;
}


/* Skills */
.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.1em;
}

.skill-list li {
    margin: 0.5em 0;
    display: flex;
    align-items: center;
}

.skill-list li i {
    color: #00d1b2;
    margin-right: 10px;
    min-width: 20px;
}


.skill-item {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.skill-item span {
    flex: 0 0 150px;
    font-size: 1rem;
    color: #0F172A;
}

.progress-bar {
    flex: 1;
    background: #E5E7EB;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}

.progress {
    background: #6B7280;
    height: 100%;
    border-radius: 8px;
    transition: width 1s ease-out;
}

/* Contact Form */
form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

form input, form textarea {
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    background: #FFFFFF;
    color: #0F172A;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: #6B7280;
    box-shadow: 0 0 8px rgba(107, 114, 128, 0.2);
}

form textarea {
    resize: vertical;
    min-height: 120px;
}

form button {
    align-self: flex-start;
}

/* Footer */
footer {
    background: #0F172A;
    color: #FFFFFF;
    padding: 48px 0;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(31, 39, 58, 0.2));
    z-index: -1;
}

footer p {
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.social-links a {
    color: #FFFFFF;
    font-size: 1.4rem;
    margin: 0 12px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #6B7280;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #FFFFFF;
        padding: 24px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .skill-item span {
        flex: none;
        margin-bottom: 8px;
    }
}

/* Fade-in effect */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}