/* ============================================
   Glassmorphism Design System
   Modern, beautiful glass UI theme
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #a78bfa;
    --primary-rgb: 167, 139, 250;
    --primary-dark: #7c3aed;
    --secondary: #67e8f9;
    --secondary-rgb: 103, 232, 249;
    --accent: #fda4af;
    --accent-rgb: 253, 164, 175;
    --bg-deep: #0a0a1a;
    --bg-surface: #111127;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-active: rgba(167, 139, 250, 0.12);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(167, 139, 250, 0.15);
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Animated Background Blobs --- */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -2;
    background:
        radial-gradient(ellipse 600px 400px at 20% 20%, rgba(167, 139, 250, 0.15), transparent),
        radial-gradient(ellipse 500px 500px at 75% 25%, rgba(103, 232, 249, 0.1), transparent),
        radial-gradient(ellipse 400px 500px at 60% 80%, rgba(253, 164, 175, 0.12), transparent),
        radial-gradient(ellipse 500px 300px at 15% 70%, rgba(167, 139, 250, 0.08), transparent),
        radial-gradient(ellipse 300px 400px at 85% 60%, rgba(103, 232, 249, 0.08), transparent);
    animation: bgRotate 20s ease-in-out infinite alternate;
}

@keyframes bgRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(2deg) scale(1.05); }
    100% { transform: rotate(-1deg) scale(1.02); }
}

/* --- Grid Background Overlay --- */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Section Titles --- */
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    margin: 16px auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    margin-top: -1.5rem;
}

/* ============================================
   Navigation - Frosted Glass
   ============================================ */
.nav-glass {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1160px;
    z-index: 1000;
    background: rgba(17, 17, 39, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

.nav-glass.scrolled {
    background: rgba(17, 17, 39, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

.nav-logo:hover {
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

.nav-link.active {
    color: var(--primary);
    background: var(--glass-active);
    font-weight: 600;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--primary);
    background: var(--glass-hover);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 50px;
    transition: all var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--primary);
    background: var(--glass-active);
}

/* ============================================
   Glass Cards
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.glass-card-interactive {
    cursor: pointer;
}

/* Card variants */
.glass-card-primary {
    background: rgba(167, 139, 250, 0.06);
    border-color: rgba(167, 139, 250, 0.15);
}

.glass-card-primary:hover {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.25);
    box-shadow: 0 0 48px rgba(167, 139, 250, 0.12);
}

.glass-card-secondary {
    background: rgba(103, 232, 249, 0.05);
    border-color: rgba(103, 232, 249, 0.12);
}

.glass-card-secondary:hover {
    background: rgba(103, 232, 249, 0.08);
    border-color: rgba(103, 232, 249, 0.2);
}

/* Card glass shine effect */
.glass-card-shine {
    overflow: hidden;
}

.glass-card-shine::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.6s ease;
}

.glass-card-shine:hover::after {
    left: 100%;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary i,
.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 27px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(167, 139, 250, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.2);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* ============================================
   Form Elements
   ============================================ */
.input-field {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
    backdrop-filter: blur(8px);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--primary);
    background: rgba(167, 139, 250, 0.06);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

textarea.input-field {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   Tags / Pills
   ============================================ */
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
}

.tag-pill:hover {
    background: rgba(167, 139, 250, 0.18);
    border-color: rgba(167, 139, 250, 0.35);
}

.tag-pill-cyan {
    background: rgba(103, 232, 249, 0.1);
    border-color: rgba(103, 232, 249, 0.2);
    color: var(--secondary);
}

.tag-pill-pink {
    background: rgba(253, 164, 175, 0.1);
    border-color: rgba(253, 164, 175, 0.2);
    color: var(--accent);
}

/* ============================================
   Hero Section (Homepage)
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(167, 139, 250, 0.4);
    padding: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.2);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-deep);
}

.hero-name {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero-tagline {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 480px;
}

/* ============================================
   Stats / Numbers
   ============================================ */
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ============================================
   Timeline (Experience)
   ============================================ */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(167,139,250,0.5), rgba(103,232,249,0.3), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 8px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    border: 3px solid var(--bg-deep);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.6;
}

/* ============================================
   Skill Bars
   ============================================ */
.skill-bar-wrapper {
    margin-bottom: 16px;
}

.skill-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Certificate Cards
   ============================================ */
.cert-card {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cert-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cert-card:hover img {
    transform: scale(1.08);
}

.cert-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition);
}

.cert-card:hover .cert-overlay {
    opacity: 1;
}

.cert-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================
   Service Cards
   ============================================ */
.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(167,139,250,0.1), rgba(103,232,249,0.1));
    border: 1px solid rgba(167,139,250,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin: 0 auto 20px;
    transition: all var(--transition);
}

.glass-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(103,232,249,0.2));
    border-color: rgba(167,139,250,0.35);
    transform: scale(1.05);
}

/* ============================================
   Contact Info
   ============================================ */
.contact-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    backdrop-filter: blur(12px);
    background: rgba(17, 17, 39, 0.3);
}

.footer-copyright {
    margin: 0 0 0.5rem 0;
}

.footer-records {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

.record-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.record-item:hover {
    color: var(--text-color);
}

.record-item i {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease both;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease both;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease both;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ============================================
   Back to Top & Visitor Counter
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 900;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: rgba(167, 139, 250, 0.25);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.3);
}

.visitor-counter {
    position: fixed;
    bottom: 32px;
    left: 32px;
    background: rgba(17, 17, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 8px 18px;
    z-index: 900;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 24px;
        right: 24px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .visitor-counter {
        bottom: 24px;
        left: 16px;
        padding: 6px 14px;
        font-size: 0.75rem;
    }
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(167, 139, 250, 0.15);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(12px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .container { max-width: 100%; padding: 0 20px; }
    .hero-name { font-size: 2.4rem; }
    .section-title { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }

    .nav-glass {
        width: calc(100% - 24px);
        padding: 10px 20px;
        border-radius: 40px;
        top: 8px;
    }

    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-menu { display: none; }
    .mobile-menu.show { display: flex; }

    .hero-name { font-size: 2rem; }
    .hero-avatar { width: 90px; height: 90px; }
    .section-title { font-size: 1.6rem; }

    .grid-cols-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-name { font-size: 1.7rem; }
    .section-title { font-size: 1.4rem; }
    .stat-number { font-size: 2rem; }
}
