:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.95);
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-muted: #7d8590;
    --accent: #58a6ff;
    --accent-secondary: #a371f7;
    --accent-green: #3fb950;
    --accent-gradient: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    --border: rgba(48, 54, 61, 0.8);
    --border-accent: rgba(88, 166, 255, 0.25);
    --glow: rgba(88, 166, 255, 0.12);
    --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg-primary); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Landing Section ===== */
.landing-section {
    width: 100%;
    height: 100vh;
}
#ink-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}
.wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    color: #fff;
    pointer-events: none;
    text-align: center;
    mix-blend-mode: difference;
    z-index: 2;
    transition: opacity 0.5s ease;
}
.main {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
}
.wrap h1 {
    color: #fff;
    text-align: center;
    font-family: 'ZCOOL XiaoWei', 'Noto Sans SC', 'PingFang SC', sans-serif;
    font-size: 8em;
    font-weight: 400;
    animation: animate 0.5s linear infinite;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 12px;
}
.wrap h2 {
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 2px;
    margin-top: 0.8rem;
    font-weight: 400;
}
@keyframes animate {
    0%, 100% { text-shadow: -1.5px -1.5px 0 #0ff, 1.5px 1.5px 0 #f00; }
    25% { text-shadow: 1.5px 1.5px 0 #0ff, -1.5px -1.5px 0 #f00; }
    50% { text-shadow: 1.5px -1.5px 0 #0ff, 1.5px -1.5px 0 #f00; }
    75% { text-shadow: -1.5px 1.5px 0 #0ff, -1.5px 1.5px 0 #f00; }
}
.landing-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    pointer-events: auto;
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
}
.landing-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s;
}
.landing-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.4);
}
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(88, 166, 255, 0.4);
}
@keyframes bounceArrow {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(15px); opacity: 1; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== App ===== */
.app-container {
    position: relative;
    z-index: 10;
    background: transparent;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2.5rem;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
.navbar.visible { transform: translateY(0); }
.nav-brand { font-weight: 600; font-size: 1rem; color: var(--accent); font-family: 'SF Mono', monospace; }
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* ===== Main ===== */
.main-content { max-width: 960px; margin: 0 auto; padding: 1.5rem; }

/* ===== Section ===== */
.section {
    max-width: 960px;
    margin: 0 auto 3rem;
    padding: 2rem 1.8rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.5s;
}
.section.visible { opacity: 1; transform: translateY(0); }
.section.visible::before { opacity: 1; }
.section-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.5rem; }
.section-header i { color: var(--accent); font-size: 1.3rem; }
.section-header h2 { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-accent), transparent); }

/* ===== About ===== */
.about-intro {
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(163, 113, 247, 0.05));
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}
.about-intro p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.about-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.about-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 20px rgba(88, 166, 255, 0.1);
}
.about-card:hover::after { transform: scaleX(1); }
.about-icon { color: var(--accent); font-size: 1.5rem; margin-bottom: 0.6rem; }
.about-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.about-card p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.6; }

.quote-box {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.06), rgba(163, 113, 247, 0.04));
    border-left: 3px solid var(--accent);
    padding: 0.85rem 1.1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.quote-box i { color: var(--accent); opacity: 0.4; font-size: 1.1rem; flex-shrink: 0; }
.quote-center {
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== Tech Stack ===== */
.tech-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.tech-category h3 { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.tech-category h3 i { color: var(--accent-secondary); font-size: 1rem; }
.tech-items { display: flex; flex-direction: column; gap: 0.6rem; }
.tech-item { display: grid; grid-template-columns: 130px 1fr 45px; align-items: center; gap: 0.8rem; }
.tech-name { font-size: 0.88rem; color: var(--text-primary); }
.tech-bar { height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.tech-progress { height: 100%; width: 0; background: var(--accent-gradient); border-radius: 3px; transition: width 0.8s ease-out; }
.tech-level { font-size: 0.75rem; color: var(--accent-green); text-align: right; font-weight: 500; }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 30px rgba(88, 166, 255, 0.15);
}
.project-card:hover::before { opacity: 1; }
.project-header { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.6rem; position: relative; }
.project-header i { color: var(--accent-secondary); font-size: 1.2rem; }
.project-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); flex: 1; }
.project-stars {
    font-size: 0.78rem;
    color: #f0c040;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: rgba(240, 192, 64, 0.1);
    border-radius: 12px;
}
.project-stars i { font-size: 0.85rem; }
.project-desc { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.8rem; line-height: 1.65; position: relative; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; position: relative; }
.project-tags span {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    background: rgba(88, 166, 255, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.project-tags span:hover {
    background: rgba(88, 166, 255, 0.25);
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--accent-secondary), transparent); }
.timeline-item { position: relative; padding-bottom: 1.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -2rem; top: 6px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--accent); border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.2), 0 0 15px rgba(88, 166, 255, 0.3);
    transition: all 0.3s;
}
.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(88, 166, 255, 0.3), 0 0 25px rgba(88, 166, 255, 0.5);
}
.timeline-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.2rem; transition: all 0.3s;
}
.timeline-content:hover { border-color: var(--accent); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.timeline-date { font-size: 0.8rem; color: var(--accent); margin-bottom: 0.3rem; font-weight: 600; letter-spacing: 0.5px; }
.timeline-content h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.timeline-company { font-size: 0.85rem; color: var(--accent-secondary); margin-bottom: 0.4rem; font-weight: 500; }
.timeline-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ===== Awards ===== */
.awards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-bottom: 1.2rem; }
.award-item {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.8rem 1.1rem; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.award-item:hover {
    border-color: var(--accent);
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.award-item.national {
    border-left: 3px solid #f0c040;
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.05), transparent);
}
.award-item.provincial {
    border-left: 3px solid var(--accent);
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.05), transparent);
}
.award-badge { font-size: 0.85rem; white-space: nowrap; }
.award-name { font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.cert-box {
    display: flex; flex-wrap: wrap; gap: 1rem;
    padding: 1rem 1.2rem; border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.08), rgba(163, 113, 247, 0.05));
    border: 1px solid var(--border-accent);
}
.cert-item {
    font-size: 0.85rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    transition: all 0.2s;
}
.cert-item:hover { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.cert-item i { color: var(--accent); font-size: 1rem; }

/* ===== Research ===== */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: all 0.3s;
}
.research-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.research-icon {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}
.research-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.research-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Goals ===== */
.goals-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.goal-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
}
.goal-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.goal-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 8px;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.goal-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.goal-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Stats ===== */
.section-stats {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.8), rgba(13, 17, 23, 0.9));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; text-align: center; }
.stat-item {
    padding: 1rem 0.6rem;
    border-radius: 8px;
    transition: all 0.3s;
}
.stat-item:hover {
    background: rgba(88, 166, 255, 0.1);
    transform: scale(1.05);
}
.stat-number { font-size: 1.8rem; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ===== Poetry ===== */
.section-poetry { text-align: center; }
.poetry-box {
    display: flex; align-items: center; justify-content: center; gap: 0.8rem;
    width: 100%; padding: 1.2rem 1.5rem;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.poetry-box i { color: var(--accent-secondary); font-size: 1.1rem; opacity: 0.5; flex-shrink: 0; }
.poetry-box p { font-size: 0.92rem; color: var(--text-secondary); font-style: italic; }

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
    padding: 2rem 1.5rem 1.5rem;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.footer-content { display: flex; justify-content: space-between; max-width: 960px; margin: 0 auto 1.5rem; }
.footer-info h3 { font-size: 1rem; color: var(--accent); margin-bottom: 0.3rem; }
.footer-info p { font-size: 0.82rem; color: var(--text-muted); }
.footer-goal {
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--accent);
    display: inline-block;
}
.footer-contact h4 { font-size: 0.88rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.contact-items { display: flex; gap: 1.2rem; }
.contact-items a { color: var(--text-muted); text-decoration: none; font-size: 0.82rem; display: flex; align-items: center; gap: 0.35rem; transition: color 0.2s; }
.contact-items a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 1rem; border-top: 1px solid var(--border); }
.copyright-main { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.copyright-sub { font-size: 0.72rem; color: var(--text-muted); display: flex; justify-content: center; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.copyright-sub .divider { opacity: 0.3; }
.copyright-sub a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.copyright-sub a:hover { color: var(--accent); }
.copyright-sub i { color: #f85149; font-size: 0.7rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-categories { grid-template-columns: 1fr; }
    .awards-grid { grid-template-columns: 1fr; }
    .research-grid { grid-template-columns: 1fr; }
    .goals-content { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    html { font-size: 14px; }
    .wrap h1 { font-size: 4.5rem; }
    .landing-subtitle { font-size: 1rem; }
    .navbar { padding: 0.7rem 1.2rem; }
    .nav-links { display: none; }
    .section { padding: 3rem 1.2rem 0; }
    .about-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; gap: 1rem; text-align: center; }
    .contact-items { justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 480px) {
    html { font-size: 13px; }
    .wrap h1 { font-size: 3rem; }
    .tech-item { grid-template-columns: 110px 1fr 40px; }
}
