/* ==========================================
   SECTIONS - Styling cho từng phần
   ========================================== */

/* ==========================================
   NAVIGATION BAR
   ========================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.navbar-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-gradient);
    text-shadow: 0 0 15px var(--primary-gradient)
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    border-radius: 3px;
    transition: var(--transition);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.3),
        inset 0 0 30px rgba(255, 0, 110, 0.1);
    animation: floatAvatar 3s ease-in-out infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.gradient-text {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 0, 110, 0.3);
    filter: drop-shadow(0 0 20px rgba(255, 0, 110, 0.2));
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 400;
    max-width: 800px;
    letter-spacing: 0.5px;
    text-shadow: #000000 0px 0px 3px;
}

/* ==========================================
   SECTION COMMON STYLES
   ========================================== */

section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    color: #fff;
    position: relative;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-gradient);
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */

.about {
    background: rgba(0, 0, 0, 0.2);
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-card p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.about-card p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */

.projects {
    background: rgba(0, 0, 0, 0.1);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    text-decoration: none;
    color: inherit;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 4s infinite;
}

.project-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.project-card p {
    margin-bottom: 1.5rem;
    color: var(--text-lighter);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(58, 134, 255, 0.2);
    color: var(--glow-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(58, 134, 255, 0.3);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(58, 134, 255, 0.4);
    box-shadow: 0 0 15px rgba(58, 134, 255, 0.3);
}

/* ==========================================
   HIGHLIGHTS / TIMELINE SECTION
   ========================================== */

.highlights {
    background: rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* `.timeline::before` removed to avoid glass-card blur; handled by `.timeline-item::before` */

.timeline-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
    animation: fadeInUp 0.8s ease backwards;
    opacity: 0;
    z-index: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: -3rem;
    /* Spans the gap to the next item */
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    background: rgb(0, 94, 255);
    z-index: -1;
}

.timeline-item:last-child::before {
    bottom: 0;
    /* No connection beyond the last item */
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: -3rem;
    /* Spans the gap to the next item */
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    background: rgb(0, 94, 255);
    z-index: -1;
}

.timeline-item:last-child::before {
    bottom: 0;
    /* No connection beyond the last item */
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.5s;
}

.timeline-item:nth-child(6) {
    animation-delay: 0.6s;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
    text-align: right;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    animation: pulse-white 2s ease-in-out infinite;
    top: 40px;
    transition: var(--transition);
}

.timeline-marker:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 1);
    filter: brightness(1.2);
}

@keyframes pulse-white {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
    }
}

.timeline-content {
    width: calc(50% - 40px);
    padding: 1.5rem;
}

.timeline-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-subtitle {
    font-size: 1rem;
    color: #2f7ffe;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================
   SKILLS SECTION
   ========================================== */

.skills {
    background: rgba(0, 0, 0, 0.2);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-group {
    border-radius: 15px;
}

.skill-category {
    color: var(--glow-blue);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-badge {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.1), rgba(51, 56, 236, 0.1));
    color: var(--text-light);
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 110, 0.2);
    transition: var(--transition);
    display: inline-block;
}

.skill-badge:hover {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(51, 56, 236, 0.2));
    border-color: rgba(255, 0, 110, 0.4);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.2);
    transform: translateY(-3px);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

.contact {
    background: rgba(0, 0, 0, 0.1);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-form {
    border-radius: 15px;
}

.contact-form h3,
.contact-links h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition);
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-lighter);
}

.contact-links {
    border-radius: 15px;
}

.contact-links p {
    line-height: 2;
    color: var(--text-light);
}

.contact-qr {
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.contact-qr h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.contact-qr img.qr-code {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0);
    padding: 10px;
    transition: var(--transition);
}

.contact-qr img.qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.contact-qr p {
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    text-align: center;
    color: var(--text-lighter);
    font-size: 0.95rem;
}