:root {
    /* 暗色主题变量 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-card: #333333;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --accent-color: #4f9aff;
    --accent-hover: #6bb6ff;
    --border-color: #555555;
    --shadow-color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] {
    /* 浅色主题变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-color: #0066cc;
    --accent-hover: #004499;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px; /* LINMOHAN */
    margin: 0 auto;
    padding: 0;
    display: flex;
    gap: 0;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    position: fixed;
    top: 20px;
    left: 20px;
    height: calc(100vh - 40px);
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 25px 50px var(--shadow-color);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 10;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-profile {
    padding: 40px 30px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 30px;
}

.main-content {
    margin-left: 300px; /* LINMOHAN */
    flex: 1;
    min-height: 100vh;
    padding: 20px;
    width: auto; /* 去掉 calc(100vw - 320px)，LINMOHAN */
}

.card {
    background: var(--bg-card);
    border-radius: 24px;
    box-shadow: 0 25px 50px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
}

.hero {
    background: var(--bg-secondary);
    padding: 60px 40px;
    text-align: center;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(79,154,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.sidebar-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--accent-color);
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.sidebar-avatar:hover {
    transform: scale(1.05);
}

.sidebar-name {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.sidebar-title {
    font-size: 1em;
    color: var(--text-secondary);
    margin-bottom: 30px;
    opacity: 0.9;
    transition: color 0.3s ease;
}

.sidebar-nav-item {
    width: 100%;
    margin-bottom: 10px;
}

.sidebar-nav-link {
    display: block;
    width: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
}

.sidebar-nav-link:hover {
    color: var(--accent-color);
    background: rgba(79, 154, 255, 0.1);
}

.sidebar-nav-link.active {
    color: var(--accent-color);
    background: rgba(79, 154, 255, 0.15);
}
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.9em;
}
.theme-toggle:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
.theme-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

.hero p {
    font-size: 1.2em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 10px;
    transition: color 0.3s ease;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.intro-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.skill-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 20px 15px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(79, 154, 255, 0.15);
    border-color: var(--accent-color);
}

.skill-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
    display: block;
}

.skill-card h3 {
    font-size: 1em;
    margin: 0;
}

.skill-card p {
    display: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.contact-item:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 154, 255, 0.25);
}

.contact-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.contact-item:hover .contact-icon {
    color: white;
}

.contact-item h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.contact-item p {
    font-size: 0.9em;
    opacity: 0.8;
}

.footer {
    text-align: center;
    padding: 30px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.9em;
    transition: all 0.3s ease;
}
.footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer a:hover {
    color: var(--accent-hover);
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        left: 0;
        height: auto;
        margin-bottom: 20px;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    .container {
        flex-direction: column;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h1 {
        font-size: 2.2em;
    }
    
    .content {
        padding: 30px 20px;
    }
    
    .skills-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float-shapes 15s infinite linear;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.shape:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: -5s;
}

.shape:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float-shapes {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}