/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    z-index: 2000;
    transition: width 0.05s linear;
    pointer-events: none;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s, color 0.2s;
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== TOAST ========== */
.toast-wrap {
    position: fixed;
    top: 84px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastIn 0.3s ease;
    color: var(--text);
}

.toast.toast-success { border-left-color: #22c55e; }
.toast.toast-error { border-left-color: #ef4444; }
.toast.toast-info { border-left-color: var(--primary); }

.toast.hiding {
    animation: toastOut 0.25s ease forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    font-size: 0.92rem;
    line-height: 1.45;
}

.toast-body strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 2px;
}

.toast-close:hover { color: var(--text); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(24px); }
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-year {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.timeline-content h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ========== PRODUCT FILTERS ========== */
.product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.filter-chip {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.filter-chip:active {
    transform: scale(0.97);
}

.products-empty {
    text-align: center;
    color: var(--text-light);
    padding: 24px 0;
    font-size: 0.95rem;
}

/* Card hover nâng cấp */
.project-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
    .toast-wrap {
        left: 16px;
        right: 16px;
        max-width: none;
    }
    .back-to-top {
        right: 14px;
        bottom: 18px;
    }
}

/* ========== ĐẶC SẮC: Social & Contact polish ========== */

/* Social links dạng pill có gradient hover */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.social-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #cbd5e1 !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.25);
    text-decoration: none;
    overflow: hidden;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.social-links a:hover {
    color: #fff !important;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.social-links a:hover::before {
    opacity: 1;
}

.social-links a > * ,
.social-links a {
    z-index: 1;
}

/* Contact channel cards nổi bật hơn */
.contact-channels li {
    position: relative;
    overflow: hidden;
}

.contact-channels li::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contact-channels li:hover {
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.contact-channels li:hover::after {
    opacity: 1;
}

.contact-ch-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.12));
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-channels li:hover .contact-ch-icon {
    transform: scale(1.08);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(139, 92, 246, 0.2));
}

.contact-ch-value {
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity 0.2s;
}

.contact-ch-value:hover {
    opacity: 0.85;
}

/* Contact panel glow nhẹ */
.contact-panel {
    position: relative;
}

.contact-panel::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.45), rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.2));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.contact-panel:hover::before {
    opacity: 0.55;
}

/* Nút submit contact có gradient */
.contact-submit,
.btn-primary.contact-submit {
    background: linear-gradient(135deg, #3b82f6, #6366f1 55%, #8b5cf6);
    border: none;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contact-submit:hover,
.btn-primary.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.45);
    filter: brightness(1.05);
}

/* Footer social trên nền tối */
.footer .social-links a {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer .social-links a {
    background: rgba(255, 255, 255, 0.04);
}

/* About CTA + info link polish */
.about-cta {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

.about-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.4);
}

.info-link.about-v {
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s, letter-spacing 0.2s;
}

.info-link.about-v:hover {
    color: #8b5cf6;
    letter-spacing: 0.02em;
}
