/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Apple design language */
    --bg-primary: #fbfbfd;
    --bg-secondary: #f5f5f7;
    --bg-dark: #161617;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --text-faint: #d2d2d7;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --border: #d2d2d7;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.14), 0 6px 16px rgba(0,0,0,0.08);

    /* Spacing */
    --container-max: 1080px;
    --nav-height: 52px;

    /* Transitions - Apple-like curves */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Cover gradients - restrained dark tones */
    --grad-video: linear-gradient(150deg, #1d1d1f 0%, #48484a 100%);
    --grad-graphics: linear-gradient(150deg, #232327 0%, #4a4a50 100%);
    --grad-news: linear-gradient(150deg, #0a1f44 0%, #1c3f7d 100%);
    --grad-article: linear-gradient(150deg, #0c3d2e 0%, #1f7a5c 100%);
    --grad-activity: linear-gradient(150deg, #4a1d2c 0%, #83324a 100%);
    --grad-paper: linear-gradient(150deg, #3a3720 0%, #6f6a30 100%);
    --grad-code: linear-gradient(150deg, #1d2a52 0%, #3d56a8 100%);
    --grad-photo: linear-gradient(150deg, #2a1f30 0%, #523b63 100%);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 17px;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== Scroll Progress ==================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    z-index: 10000;
    border-radius: 0 2px 2px 0;
    transition: width 0.1s linear;
}

/* ==================== Container ==================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 22px;
}

/* ==================== Navigation ==================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 9999;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.scrolled {
    background: rgba(251, 251, 253, 0.68);
    border-bottom-color: rgba(0, 0, 0, 0.12);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 22px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.85;
    position: relative;
    transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transition: right 0.35s var(--ease-smooth);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--text-primary);
}

.nav-links a:hover::after {
    right: 0;
}

.nav-cta {
    padding: 6px 16px;
    background: var(--text-primary);
    color: #fff !important;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    opacity: 1 !important;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease-spring);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: #000;
    color: #fff !important;
    transform: scale(1.04);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==================== Hero ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 22px 40px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 130%;
    max-width: 1400px;
    height: 90%;
    background:
        radial-gradient(ellipse 55% 55% at 50% 40%, rgba(0, 113, 227, 0.06), transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 60%, rgba(0, 113, 227, 0.035), transparent 70%);
    pointer-events: none;
    animation: glowBreath 8s var(--ease) infinite alternate;
}

@keyframes glowBreath {
    from { opacity: 0.75; transform: translateX(-50%) scale(1); }
    to { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-eyebrow {
    font-size: 15px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0;
    animation: heroReveal 1s var(--ease-out) 0.1s both;
}

.hero-title {
    font-size: clamp(56px, 11vw, 104px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #1d1d1f 0%, #515154 60%, #1d1d1f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroScaleIn 1.2s var(--ease-out) 0.15s both;
}

.hero-subtitle {
    font-size: clamp(19px, 3vw, 26px);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 14px;
    animation: heroReveal 1s var(--ease-out) 0.35s both;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 38px;
    animation: heroReveal 1s var(--ease-out) 0.45s both;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    animation: heroReveal 1s var(--ease-out) 0.55s both;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-faint);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
    animation: fadeIn 1s var(--ease-out) 1.2s both;
}

.hero-scroll span {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scrollHint 1.8s var(--ease) infinite;
}

@keyframes scrollHint {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(8px); }
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroScaleIn {
    from { opacity: 0; transform: scale(0.92); filter: blur(12px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.35s var(--ease), transform 0.35s var(--ease-spring);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), rgba(255,255,255,0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-secondary::after {
    background: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), rgba(0, 113, 227, 0.2), transparent 60%);
}

.btn-secondary:hover {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent);
    transform: translateY(-2px) scale(1.02);
}

/* ==================== Sections ==================== */
.section {
    padding: 110px 0;
}

.section-gray {
    background: var(--bg-secondary);
}

.section-dark {
    background: var(--bg-dark);
    color: #f5f5f7;
}

.section-title {
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    text-align: center;
}

.section-title-light {
    color: #f5f5f7;
}

.section-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 620px;
    margin: 0 auto 60px;
}

.section-subtitle-light {
    color: #a1a1a6;
}

/* ==================== About ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 44px;
}

.about-text p {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.75;
}

.about-text p:last-child {
    color: var(--text-secondary);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease);
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== Timeline (Experience) ==================== */
.exp-block {
    margin-top: 44px;
    margin-bottom: 64px;
}

.exp-block:last-child {
    margin-bottom: 0;
}

.exp-block-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.exp-block-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-primary);
    position: relative;
}

.exp-block-dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: var(--text-primary);
    opacity: 0.18;
    animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.18; }
    50% { transform: scale(1.6); opacity: 0; }
}

.exp-block-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.exp-block-meta {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-weight: 500;
}

.timeline {
    position: relative;
    margin-top: 0;
    padding-left: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 44px;
}

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

.timeline-marker {
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent);
    z-index: 1;
    animation: markerPulse 3s var(--ease) infinite;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 0 rgba(0,113,227,0.3); }
    50% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 8px rgba(0,113,227,0); }
}

.section-gray .timeline-marker {
    border-color: var(--bg-secondary);
}

.timeline-date {
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    padding: 3px 12px;
    background: rgba(0, 113, 227, 0.08);
    border-radius: 980px;
}

.timeline-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.timeline-org {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-detail {
    list-style: none;
    padding: 0;
}

.timeline-detail li {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.timeline-detail li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
}

.timeline-detail li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== Skills ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 44px;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease);
}

.skill-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(0, 113, 227, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    transition: transform 0.5s var(--ease-spring);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(-4deg);
}

.skill-icon svg {
    width: 26px;
    height: 26px;
}

.skill-card h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.55;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: 980px;
    font-weight: 500;
    transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.skill-tags span:hover {
    color: var(--accent);
    background: rgba(0, 113, 227, 0.08);
}

/* ==================== Education ==================== */
.edu-card {
    display: flex;
    gap: 32px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    margin-top: 44px;
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease);
}

.edu-card:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: var(--shadow-md);
}

.edu-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(0, 113, 227, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: transform 0.5s var(--ease-spring);
}

.edu-card:hover .edu-icon {
    transform: scale(1.08) rotate(-4deg);
}

.edu-icon svg {
    width: 30px;
    height: 30px;
}

.edu-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.edu-meta {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.edu-time {
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.edu-courses {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-group {
    font-size: 15px;
    color: var(--text-secondary);
}

.course-label {
    display: inline-block;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    padding: 2px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-right: 8px;
}

/* ==================== Portfolio: Featured ==================== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.featured-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 34px;
    color: #f5f5f7;
    cursor: pointer;
    transition: transform 0.6s var(--ease-spring), box-shadow 0.6s var(--ease);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.featured-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.16), transparent 45%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    pointer-events: none;
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 32px 80px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.1);
}

.featured-video { background: var(--grad-video); }
.featured-article { background: var(--grad-article); }
.featured-news { background: var(--grad-news); }

.featured-icon {
    position: absolute;
    top: 34px;
    left: 34px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.6s var(--ease-spring), background 0.4s var(--ease);
}

.featured-card:hover .featured-icon {
    transform: scale(1.1) rotate(-4deg);
    background: rgba(255, 255, 255, 0.2);
}

.featured-icon svg {
    width: 30px;
    height: 30px;
}

.featured-body {
    position: relative;
    z-index: 1;
}

.featured-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 10px;
}

.featured-body h3 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.featured-body p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: gap 0.35s var(--ease);
}

.featured-card:hover .featured-link {
    gap: 10px;
}

.featured-link .link-icon {
    font-size: 15px;
    color: inherit;
    transition: transform 0.35s var(--ease);
}

/* ==================== Portfolio: Category Browser ==================== */
.category-browser {
    margin-top: 80px;
}

.category-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 36px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.category-btn {
    background: var(--card-bg);
    border: none;
    border-radius: 22px;
    padding: 28px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease);
    font-family: inherit;
}

.category-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.category-btn:active {
    transform: translateY(-2px) scale(0.99);
}

.category-btn.active {
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
    transform: translateY(-3px);
}

.category-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.6s var(--ease-spring);
}

.category-btn:hover .category-icon {
    transform: scale(1.12) rotate(-5deg);
}

.category-icon svg {
    width: 26px;
    height: 26px;
}

.category-icon-video { background: var(--grad-video); }
.category-icon-graphics { background: var(--grad-graphics); }
.category-icon-news { background: var(--grad-news); }
.category-icon-article { background: var(--grad-article); }
.category-icon-activity { background: var(--grad-activity); }
.category-icon-paper { background: var(--grad-paper); }
.category-icon-code { background: var(--grad-code); }
.category-icon-photo { background: var(--grad-photo); }

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==================== Portfolio: Category Works ==================== */
.category-works {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.6s var(--ease-out) both;
}

.category-works-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.category-works-head h3 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.category-works-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.category-close {
    flex-shrink: 0;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 980px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    font-family: inherit;
}

.category-close:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.category-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.work-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: cardIn 0.55s var(--ease-out) forwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); filter: blur(6px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.work-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: var(--shadow-lg);
}

.work-cover {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.work-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(300px circle at 50% 120%, rgba(255,255,255,0.14), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

.work-card:hover .work-cover::after {
    opacity: 1;
}

.work-cover svg {
    width: 44px;
    height: 44px;
    transition: transform 0.6s var(--ease-spring);
}

/* 图片封面（用户上传的 cover_image） */
.work-cover-image {
    background: var(--bg-secondary);
    padding: 0;
}

.work-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.work-card:hover .work-cover-image img {
    transform: scale(1.04);
}

.work-card:hover .work-cover svg {
    transform: scale(1.15);
}

.work-cover-video { background: var(--grad-video); }
.work-cover-graphics { background: var(--grad-graphics); }
.work-cover-news { background: var(--grad-news); }
.work-cover-article { background: var(--grad-article); }
.work-cover-activity { background: var(--grad-activity); }
.work-cover-paper { background: var(--grad-paper); }
.work-cover-code { background: var(--grad-code); }
.work-cover-photo { background: var(--grad-photo); }

.work-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-tag {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.work-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.link-icon {
    font-size: 16px;
    color: var(--text-faint);
    font-weight: 400;
    transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.work-card:hover .link-icon {
    transform: translate(3px, -3px);
    color: var(--accent);
}

.work-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
}

/* ==================== Photo Works (摄影卡片) ==================== */
.photo-grid {    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* 空分类占位 */
.works-empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-3);
    font-size: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 18px;
}

.photo-card .work-cover {
    height: 230px;
}

.photo-card .work-body h3 {
    justify-content: space-between;
}

.zoom-icon {
    font-size: 15px;
    color: var(--text-faint);
    font-weight: 400;
    transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}

.photo-card:hover .zoom-icon {
    transform: scale(1.25);
    color: var(--accent);
}

.photo-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.meta-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    font-size: 11px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.meta-chip strong {
    font-weight: 500;
    font-size: 10px;
    color: var(--text-faint);
}

/* ==================== Photo Lightbox (照片灯箱) ==================== */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(12, 12, 14, 0.92);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    opacity: 0;
    transition: opacity 0.28s var(--ease);
}

.photo-lightbox.open {
    opacity: 1;
}

/* 显式声明，避免 display:flex 覆盖 hidden 属性 */
.photo-lightbox[hidden],
.photo-lightbox [hidden] {
    display: none;
}

.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: min(1100px, 92vw);
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
    transition: opacity 0.3s var(--ease);
}

.lightbox-caption {
    text-align: center;
    color: #f5f5f7;
    max-width: 720px;
}

.lightbox-caption h3 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 6px;
}

.lightbox-caption p {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(245, 245, 247, 0.65);
}

.lightbox-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.lightbox-meta .meta-chip {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(245, 245, 247, 0.92);
}

.lightbox-meta .meta-chip strong {
    color: rgba(245, 245, 247, 0.55);
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(245, 245, 247, 0.9);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease-spring);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
}

.lightbox-close {
    top: 22px;
    right: 26px;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
}

.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.08);
}

/* ==================== Contact ==================== */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 44px;
    flex-wrap: wrap;
}

.contact-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 32px 44px;
    text-align: center;
    transition: transform 0.5s var(--ease-spring), background 0.4s var(--ease), border-color 0.4s var(--ease);
    min-width: 230px;
}

.contact-card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
}

.contact-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #a1a1a6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s var(--ease-spring), color 0.3s var(--ease);
}

.contact-card:hover .contact-icon {
    color: #fff;
    transform: scale(1.12);
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-label {
    display: block;
    font-size: 13px;
    color: #a1a1a6;
    margin-bottom: 6px;
}

.contact-value {
    display: block;
    font-size: 16px;
    color: #f5f5f7;
    font-weight: 500;
}

.contact-card:hover .contact-value {
    color: #fff;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-dark);
    color: #86868b;
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
}

/* ==================== Scroll Reveal (Apple-style blur reveal) ==================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(10px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
    will-change: opacity, transform, filter;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

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

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .featured-card {
        min-height: 360px;
    }
}

@media (max-width: 834px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(251, 251, 253, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        padding: 20px 22px 32px;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .nav-links a {
        display: block;
        padding: 14px 0;
        font-size: 17px;
    }

    .nav-cta {
        display: inline-block;
        margin: 16px 0;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 80px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .edu-card {
        flex-direction: column;
        gap: 16px;
        padding: 28px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-works-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card {
        min-width: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    /* 摄影灯箱：小屏适配 */
    .photo-lightbox {
        padding: 16px;
    }

    .lightbox-figure img {
        max-height: 58vh;
    }

    .lightbox-caption h3 {
        font-size: 16px;
    }

    .lightbox-close {
        top: 14px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    .lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .photo-card .work-cover {
        height: 200px;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 34px;
    }

    .hero-eyebrow {
        font-size: 14px;
    }

    .featured-card {
        min-height: 320px;
        padding: 26px;
    }

    .featured-icon {
        top: 26px;
        left: 26px;
    }

    .featured-body h3 {
        font-size: 24px;
    }

    .stat-card {
        padding: 20px 14px;
    }

    .stat-num {
        font-size: 28px;
    }

    .timeline-item {
        padding-left: 32px;
    }

    .work-body {
        padding: 20px;
    }

    .edu-card {
        padding: 24px;
    }

    .category-works-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 0 16px;
    }

    .nav-inner {
        padding: 0 16px;
    }
}
